Repository navigation
Allow narrowly gated Cloud Hypervisor agent acceptance fixture - #69777
Conversation
Preserve general primary-plus-agent rejection while admitting the manual official-repository static public Copilot acceptance workflow. Keep existing artifact, provider, runtime, and GitHub restrictions intact. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 37f16600-2538-40c8-90d4-5a3ac59ed162
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Commit pushed:
|
🏗️ Design Decision Gate — ADR RequiredThis PR adds 263 new lines in The PR adds a new compile-time exception: 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and check that the implementation matches the decision. ❓ Why ADRs MatterADRs create a searchable, permanent record of why the codebase looks the way it does. This matters most for decisions like this one, where fixture-specific values are hard-coded into the compiler. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
There was a problem hiding this comment.
Verdict
I did not find a changed-line bug here that I would block on.
Notes
I focused on the new acceptance gate in validateCloudHypervisorAgentAcceptance, the regression coverage, and the paired docs changes. The restrictions are intentionally narrow, and the negative tests cover the obvious escape hatches: ambient feature flags, trigger drift, repo drift, runtime/version drift, GitHub tool enablement, and AWF argument overrides.
Static review only: I did not execute the compiler or runtime in this pass.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 83.8 AIC · ⌖ 5.67 AIC · ⊞ 12.7K
Comment /review to run again
Compare the reusable-workflow condition as parsed YAML rather than rejecting valid scalar quoting. Supply fixture-local repository configuration and the missing dispatch target, then refresh the smoke snapshot previously skipped by the native runner. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 37f16600-2538-40c8-90d4-5a3ac59ed162
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design and /tdd (triage done directly; pr-triage agent was consulted and returned tests_only with the same files). One maintainability suggestion below; no correctness or security issues found.
📋 Key Themes & Highlights
Key Themes
- Literal duplication: the fixed acceptance values (workflow id,
ifcondition, repo, model, AWF version, numeric limits) are typed out independently invalidateCloudHypervisorAgentAcceptanceand again in the test fixturecloudHypervisorAgentAcceptanceData. Extracting them to shared constants would remove the risk of the validator and its test drifting apart when the fixture is updated.
Positive Highlights
- Excellent negative-path coverage -
TestValidateCloudHypervisorAgentAcceptanceexercises 30+ rejection scenarios (wrong workflow id, ambient GH_AW_FEATURES, wrong repo/sensitivity, profile override, dynamic enclave, GitHub tools, DinD, proxy disabled, etc.) plus exact boundary testing viaTestCloudHypervisorAgentAcceptanceExactLimits(+/-1 on every numeric limit). - The ambient-opt-in guard is well tested: t.Setenv(GH_AW_FEATURES, ...) combined with the no opt-in/false opt-in/string opt-in cases confirms GH_AW_FEATURES genuinely cannot enable the fixture, matching the PR's stated goal.
TestCompileCloudHypervisorAgentAcceptanceis a solid end-to-end check that also asserts step ordering in the generated lock file, not just presence of fragments.- Docs update clearly scopes the fixture as non-production and explains why branch-built AWF host code is still required even with the compiler opt-in.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 99.9 AIC · ⌖ 13.9 AIC · ⊞ 10.1K
Comment /matt to run again
| func validateCloudHypervisorAgentAcceptance(data *WorkflowData, enclave *EnclaveConfig) error { | ||
| // Require a checked-in boolean opt-in, not an ambient GH_AW_FEATURES override. | ||
| if enabled, ok := data.Features[cloudHypervisorAgentAcceptanceFeature].(bool); !ok || !enabled { | ||
| return errors.New("set features.cloud-hypervisor-agent-acceptance: true only for the official acceptance fixture") |
There was a problem hiding this comment.
[/codebase-design] validateCloudHypervisorAgentAcceptance inlines six independent exact-match literals (workflow id, if string, repo, engine, model, AWF version) and six numeric thresholds directly as string/number comparisons, and the test fixture (cloudHypervisorAgentAcceptanceData in enclaves_agent_acceptance_test.go) re-types the same values independently. There is no single source of truth linking them.
💡 Suggestion
Extract the fixed values into named constants (e.g. alongside cloudHypervisorAgentAcceptanceFeature):
const (
cloudHypervisorAgentAcceptanceWorkflowID = "smoke-enclave-cloud-hypervisor-copilot"
cloudHypervisorAgentAcceptanceCondition = "github.repository == 'github/gh-aw-firewall' && github.ref_type == 'branch'"
cloudHypervisorAgentAcceptanceRepo = "github/gh-aw-firewall"
cloudHypervisorAgentAcceptanceModel = "claude-sonnet-5"
cloudHypervisorAgentAcceptanceAWFVersion = "v0.28.62"
)and have the test helper reference the same constants instead of re-typing the literals. That way a future change (e.g. bumping the AWF version pin) touches one declaration instead of requiring synchronized edits across the validator and the test fixture, which is exactly the kind of drift this gate is designed to prevent.
@copilot please address this.
There was a problem hiding this comment.
Moved the fixture identity, condition, repository, engine, model, AWF version, and numeric limits into shared constants and reused them in the validator and test fixtures. Committed as ea00c14.
There was a problem hiding this comment.
🔵 Needs a closer look
The isolation-sensitive exception needs human verification against the companion runtime gate, and the compilation test still depends on live GitHub access.
1 open issue
What changed in this PR
Adds a compiler-only exception for the manual Cloud Hypervisor Copilot acceptance fixture, without enabling general runtime support.
Changes:
- Gates acceptance on exact workflow identity, configuration, limits, and AWF version.
- Adds compilation and negative regression tests.
- Documents experimental restrictions and host/guest requirements.
| File | Description |
|---|---|
pkg/workflow/enclaves_runtime.go |
Enforces the narrowly scoped acceptance gate. |
pkg/workflow/enclaves_agent_acceptance_test.go |
Tests compilation and gate boundaries. |
docs/src/content/docs/experimental/enclaves.md |
Explains acceptance requirements and limitations. |
Review effort: Max
| compiler := NewCompiler() | ||
| compiler.SetStrictMode(false) | ||
| require.NoError(t, compiler.CompileWorkflow(path)) |
There was a problem hiding this comment.
Seeded the compiler's test-local action cache with the expected setup-action SHA before compilation. The focused acceptance tests pass with GH_TOKEN and GITHUB_TOKEN unset. Committed as ea00c14.
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: 33bcc9e
|
Parse the activation condition as YAML so folded conditions retain their pre-activation gate, and assert that manual workflows without role checks have no pre-activation job or dangling dependency. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 37f16600-2538-40c8-90d4-5a3ac59ed162
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Assert the existing unavailable-context diagnostic at ParseWorkflowString, where validation now occurs, rather than requiring parsing to succeed first. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 37f16600-2538-40c8-90d4-5a3ac59ed162
|
@copilot address the following outstanding work in one pass:
Push the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved. Use the pr-finisher skill and stop when only human review or CI remains; do not trigger CI. Sous-chef head: ea00c14
|
|
🎉 This pull request is included in a new release. Release: |

Summary
Companion compiler prerequisite for github/gh-aw-firewall#10171. Admit a Cloud Hypervisor primary plus a Cloud Hypervisor Copilot agent enclave only through checked-in boolean
features.cloud-hypervisor-agent-acceptance: trueand the exact manual official-repository branch acceptance fixture. This is not general or production support.The gate fixes workflow identity
smoke-enclave-cloud-hypervisor-copilot, the official-repository/branch condition, one static publicgithub/gh-aw-firewallrepository, explicit Copilot /claude-sonnet-5, AWFv0.28.62, and the exact single-invocation/time/task/output/model settings. AmbientGH_AW_FEATUREScannot opt in. Existing no-mixed-runtime, no-image-override, no-dynamic, no-GitHub-tools, API-proxy/provider-route, and attested-artifact checks remain active. Model request/token settings remain advisory in the pinned guest.Adds positive compilation and negative/boundary regression tests plus directly related experimental documentation. No release/version bumps, runtime/setup-script changes, workflow dispatch, inference, or guest/artifact/credential bypass.
Validation
make buildandmake fmtpassed.go test ./pkg/workflow -run 'Test.*CloudHypervisor' -count=1passed.v0.92.3source backport.make agent-report-progresspassed, including change-scoped lint/tests and 344 workflows recompiled with no lock-file drift. The initial cold-cache Go-lint attempt timed out at five minutes; the repository-compatible linter subsequently passed with a bounded 15-minute allowance (0 issues), and the complete final gate passed on rerun.1.0.96, mcpgv0.4.33, and both Cloud Hypervisor runtimes. No live inference was run.Reproducible acceptance compiler
Main differs from
v0.92.3in 995 unrelated files. For generating only this acceptance workflow, use a source-built targeted backport, not main's compiler or an unchanged official release binary.Base:
v0.92.3commitaa629a8f04fc27f6024cc49d9935d3b882c37880. Companion patch commit:2b19ccffd0694750e8e2bdcb20bf882e9bb440f2. Onlypkg/workflow/enclaves_runtime.goandpkg/workflow/enclaves_agent_acceptance_test.goare required in the backport; documentation may also be applied unchanged. The backport needs no other compiler changes.In an isolated source directory, with this companion commit available locally, set
SOURCE_DIR,PATCH_PATH(absolute), andOUTPUT_BINARY(absolute):Built using
go1.26.9 darwin/arm64. Ordered compiler/test patch SHA256:c483bd2e10ac94aa1c9b37fd82e2c55e09f6b11ebc8e44f8c5b1950f644e57b9(verified against the public commit diff). Delivered darwin/arm64 binary SHA256:478142026cf767c53d5678a76bf511f4237468c2f662dd07117a3a4045e75239.From the AWF checkout, generate only the new workflow:
"$OUTPUT_BINARY" compile .github/workflows/smoke-enclave-cloud-hypervisor-copilot.md \ --action-mode action \ --action-tag 26e5d7e7d2345ae4c8dfa3d9017ca2ff9bbf2c82 \ --no-check-updateThe binary and lock metadata identify the experimental source build. Non-release runtime version emission stays
dev; it is not represented as officialv0.92.3. The explicit setup reference remains the officialgithub/gh-aw-actionsv0.92.3SHA. AWF owns its host-source-build postprocessing; attested primary/enclave guests remain pinned to checked-in compatibilityv0.28.62. No companion setup action/runtime script change is required.