Repository navigation
Gate generated admission outputs on admission opt-in - #71784
Conversation
Split the admission-output gating concern from #71711, including an admission-only compile lint regression. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: 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.
|
|
🧠 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.
|
|
✅ 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.
|
Document effective admission opt-in, component budget bindings, conclusion metadata, and focused regression evidence without adding a new threat identifier. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Review summary
One medium correctness issue found: conclusion usage generation does not apply the new dry-run admission-output gate, so dry-run workflows can reference admission outputs that are not produced. Inline comment posted.
Details
pkg/workflow/notify_comment.go:127: use the sameAdmissionEnabled && !DryRuncondition applied to evals, threat detection, and AWF environment wiring, with a regression test for the dry-run conclusion path.- No other actionable blocking issues were identified in the changed lines.
- Static review only; repository tests were not run.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd (per pr-triage: bug_fix). The fix is correct and well-tested; approving with two minor non-blocking suggestions.
📋 Key Themes & Highlights
Key Themes
- Root cause addressed, not just symptom: the bug was that admission output expressions (
needs.activation.outputs.admission-*) were emitted unconditionally in the conclusion usage step,awf_env.gocredits helper, evals job, and threat-detection job — even whenadmissionwas never opted into (or during dry-run, when the admission job is stripped). This PR gates every one of those emission sites onAdmissionEnabled(and!DryRunwhere the consumer is a child job), closing the whole class of bug rather than patching one call site. - Regression test quality:
TestAdmissionOutputGatingCompilesWithLintis a strong addition — it does a fullCompileWorkflow+ lint pass for bothadmission: true/falseand asserts on the compiled lock file content, which is exactly the kind of black-box regression test that would have caught this bug originally. - Minor duplication risk: the
AdmissionEnabled && !DryRuncondition is now repeated in three files; a tiny shared helper would make the invariant easier to maintain (see inline comment onawf_env.go). - Coverage gap: the new compile-level regression test checks the
admissionon/off axis but not thedry-runaxis directly; the dry-run half of the gate is only unit-tested viaapplyDefaultMaxAICreditsEnvToMap(see inline comment oncompiler_admission_test.go).
Positive Highlights
- ✅ Verified via trace:
data.DryRunis set totruebefore job-building inprepareDryRunWorkflowData/dryRunConclusionData, and the admission job itself is still built in dry-run (so its outputs exist) — only the consumers (evals, threat-detection, main-job credits env) are correctly gated off referencing them. This matches the design intent described in the PR body. - ✅
buildUsageActivityGenerationStepnow omits the entireenv:block when no env vars apply, avoiding a dangling empty YAML key — a nice defensive touch beyond the minimum fix. - ✅ Clean, scoped test updates (
compiler_admission_test.go,notify_comment_test.go) that assert both the positive and negative cases (assert.Contains/assert.NotContains).
No blocking issues found. The two inline comments are polish suggestions (reduce duplication, add one more test case) and do not need to hold up this PR.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · ~169 AIC · ⌖ ~16 AIC · ⊞ 10.2K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
Four fixture goldens still expect the removed admission bindings and must be regenerated to match the new compiler output.
1 open issue
What changed in this PR
Updates gh-aw’s workflow compiler so generated admission-output references follow admission opt-in, addressing the admission-related portion of #71710.
Changes:
- Gate agent, evals, and threat-detection admission bindings, excluding dry-run execution.
- Conditionally emit conclusion admission metadata while preserving independent environment bindings.
- Extend regression coverage and document the contract in specification version 1.0.70.
| File | Description |
|---|---|
specs/compiler-threat-detection-spec.md |
Defines admission-output gating requirements and evidence. |
specs/compiler-threat-detection-changelog.md |
Records version 1.0.70 and its mapping audit. |
pkg/workflow/threat_detection_external.go |
Propagates effective admission enablement into detection execution. |
pkg/workflow/notify_comment.go |
Gates conclusion admission metadata and omits empty environment blocks. |
pkg/workflow/notify_comment_test.go |
Verifies disabled admission and independent metadata bindings. |
pkg/workflow/evals_steps.go |
Propagates effective admission enablement into evals execution. |
pkg/workflow/compiler_admission_test.go |
Extends admission wiring and lint-enabled compilation regressions. |
pkg/workflow/awf_env.go |
Requires enabled admission and non-dry-run execution for admission bindings. |
Review effort: Max
Remove admission activation output references from fixtures without admission, matching the compiler's conditional emission. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Cover admission opt-in and dry-run compilation with detection and evals, retaining conclusion metadata from the existing admission jobs without applying admission budgets during dry-run. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Regarding #71784 (comment): No code change is requested by this status notice, and reported_no_action is not proof of completion or publication. The review batch was independently validated and pushed as 00d341a; no ADR change was needed for this admission-gating clarification. |
|
Regarding #71784 (comment): The completion notice itself requires no code change. The associated dry-run finding was assessed separately and answered inline, with behavior clarified and regression coverage pushed in 00d341a. |
|
Regarding #71784 (comment): The completion notice itself requires no code change. Both actionable skills-review suggestions were accepted in 00d341a: centralized execution-budget gating and expanded dry-run compilation coverage. |
|
Regarding #71784 (comment): This status notice contains no actionable change request, and reported_no_action alone is not evidence of completion or publication. The combined review changes were independently validated and pushed as 00d341a. |
|
Regarding #71784 (comment): The status notice itself requires no code change and is not being treated as independent test evidence. Focused admission, usage, formal-contract, and golden-fixture tests passed for the batch pushed as 00d341a, along with the no-test pre-PR gate. |
|
Regarding #71784 (comment): The managed memory summary is informational, so its contents were left unchanged. The dry-run theme was addressed in the associated inline thread with an explanation of retained admission metadata and regression coverage in 00d341a. |
|
🎉 This pull request is included in a new release. Release: |

Summary
Split from #71711 (source head
1476c568e699ea08bd9299592fab04e6a4609bfa). Addresses only the admission-output gating part of #71710; the issue remains partially addressed.The six assigned files preserve the source PR's net changes against its merge base, with only the narrow additional regression. No checkout lint exceptions, repository-memory changes, runtime authentication changes, or workflow source/lock changes are included. The original PR and other split PRs are untouched.
Validation
Passed:
make buildmake fmt(after restoring missing pinned dependencies withnpm ci --prefix actions/setup/js --no-audit --no-fund)go test ./pkg/workflow -run 'TestAdmission|TestUsageActivityGeneration' -count=1go vet ./pkg/workflowgolangci-lint run --allow-parallel-runners ./pkg/workflowusing the installed GOPATH binary: zero issuesmake check-workflow-driftgit diff --checkmake agent-report-progresswas run once with tests. Build, scoped custom linters, schema freshness, and sampled impacted Go tests passed, but the aggregate command exited nonzero because another golangci-lint process held the shared runner lock. The standard package lint and workflow drift stages were subsequently run independently and passed. Custom-linter diagnostics were limited to unchanged files and skipped by the change-scoped gate. No workflow runs were dispatched.Environment limitations
The requested branch rename was attempted three times but blocked by an existing shared
packed-refs.lock. No shared lock was removed; the changes were committed and pushed from this session's original dedicated branch instead.