Repository navigation
Deduplicate enclave credential and model-budget test fixtures - #11964
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 22, 2026 22:39
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are recorded for this test-only refactor that consolidates fixtures and environment cleanup.
No open issues 🎉
What changed in this PR
This test-only refactor addresses #11961 by reducing duplicated fixtures and centralizing environment cleanup in the Cloud Hypervisor enclave boundary tests.
Changes:
- Adds typed invocation-plan and agent-policy factories with optional overrides.
- Centralizes
GITHUB_PAThandling in an async-safe helper that restores its prior value infinally. - Adds restoration coverage for unset, empty, and populated values after success, synchronous throws, and promise rejection while preserving existing boundary assertions.
| File | Description |
|---|---|
src/cloud-hypervisor/host-enclave-executor.bounded-result.test.ts |
Deduplicates fixtures and token handling, and adds environment-restoration regression coverage. |
Review effort: Balanced (adaptive)
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three boundary tests repeated invocation-plan and policy fixtures; duplicated
GITHUB_PATsetup and cleanup risked drift that could weaken credential-isolation coverage.makeInvocationPlan(overrides)andmakeAgentPolicy(overrides)factories while preserving boundary assertions.withGithubPat, restoring the prior value infinally. Add regression coverage for unset, empty, and populated values after success, synchronous throws, and promise rejection.