Skip to content

Deduplicate host-enclave GitHub capability lifetime validation - #11839

Merged
lpcox merged 2 commits into
mainfrom
copilot/fix-duplicate-assertgithubcapabilitylifetime
Nov 19, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/fix-duplicate-assertgithubcapabilitylifetime

Conversation

@lpcox

@lpcox lpcox commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Two host-enclave modules duplicated security-critical GitHub capability lifetime validation, risking enforcement drift.

  • Implementation: Retain the executor-policy validator and re-export it from the workload-profile module, preserving existing imports and validation behavior.
  • Regression guard: Assert both exports reference the same function.

@lpcox lpcox changed the title [WIP] Fix duplicate assertGithubCapabilityLifetime across modules Deduplicate host-enclave GitHub capability lifetime validation Nov 19, 2026
@lpcox
lpcox marked this pull request as ready for review November 19, 2026 17:00
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 17:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues block the validator consolidation.

No open issues 🎉

What changed in this PR

Centralizes host-enclave GitHub capability lifetime validation in the executor-policy module, reducing enforcement drift while preserving existing imports and behavior.

Changes:

  • Replaces the workload-profile validator copy with a re-export.
  • Adds a regression test confirming both exports reference the same function.
File Description
src/​cloud-hypervisor/​host-enclave-workload-profile.ts Re-exports the shared validator and removes unused imports.
src/​cloud-hypervisor/​host-enclave-workload-profile.test.ts Verifies validator function identity across both exports.

Review effort: Max (adaptive)

@lpcox
lpcox merged commit 4432034 into main Nov 19, 2026
47 of 50 checks passed
@lpcox
lpcox deleted the copilot/fix-duplicate-assertgithubcapabilitylifetime branch November 19, 2026 18:45
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.

[Duplicate Code] assertGithubCapabilityLifetime duplicated across host-enclave modules

3 participants