Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 23, 2025

Summary of the Pull Request

Fixes two bugs introduced in the HCS debug logging PR:

  • GetSchemaVersion() computed but never stored the schema version, always returning {0, 0}
  • RevokeVmAccess() used wrong execution context (HNS instead of HCS)

PR Checklist

  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Changes

  • GetSchemaVersion(): Added missing assignment of computed majorVersion and minorVersion to static g_schemaVersion variable after calculation loop
  • RevokeVmAccess(): Changed ExecutionContext from Context::HNS to Context::HCS to match the HCS API being called (HcsRevokeVmAccess)

Both issues were logic errors - computed values not stored and incorrect context type for the API category.

Validation Steps Performed

  • Code formatting validated with clang-format
  • Automated code review completed with no issues

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 23, 2025 22:32
…ontext

Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve logging of HCS helper utilities on debug builds Fix missing assignment and incorrect context in hcs.cpp debug logging Dec 23, 2025
Copilot AI requested a review from benhillis December 23, 2025 22:33
@benhillis benhillis marked this pull request as ready for review December 23, 2025 22:35
@benhillis benhillis requested a review from a team as a code owner December 23, 2025 22:35
@benhillis benhillis requested review from OneBlue, craigloewen-msft and justus-camp-microsoft and removed request for a team December 23, 2025 22:35
@benhillis benhillis merged commit ae3ed0d into user/benhill/hcs_helper_logging Dec 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants