Fix agentic workflow detection job missing pat_pool dependency (stopgap; prefer gh-aw ≥ v0.82.6 recompile)#67749
Draft
DeagleGross wants to merge 1 commit into
Conversation
The threat-detection job in every gh-aw agentic workflow selects its COPILOT_GITHUB_TOKEN from the PAT pool via needs.pat_pool.outputs.pat_number, but the generated job only declared needs: [activation, agent]. Because pat_pool was not a dependency, the expression resolved to an empty string, the case() fell through to 'NO COPILOT PAT AVAILABLE', and the detection api-proxy returned 503 'Credentials for GitHub Copilot are not configured'. Detection then produced no THREAT_DETECTION_RESULT (conclusion: warning), which aborted all non-reviewable safe outputs (add_labels, set_issue_type, call_workflow). Add pat_pool to the detection job's needs in all six lock files as a stopgap. NOTE: these are generated (DO NOT EDIT) files; the real fix belongs in the gh-aw compiler so it is not reverted by 'gh aw compile'. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a1404cba-ce97-4635-9efe-98a4f2e8c906
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.
Warning
Stopgap on generated files — probably should NOT be merged as-is. These
*.lock.ymlfiles are compiler-generated bygh aw compile(see the# DO NOT EDITheaders). The durable fix is to regenerate them with gh-aw ≥ v0.82.6, which already contains the compiler fix (see below). This hand-edit just mirrors what that recompile produces, and any future recompile with an older CLI would revert it. Opened as draft for visibility/discussion.Symptom
Every agentic workflow's compiler-generated threat-detection (
detection) job fails at runtime with:The top-level run still reports green, so it fails silently. Because detection produces no
THREAT_DETECTION_RESULT, its conclusion becomeswarning, and the WTD3 warn policy aborts all non-reviewable safe outputs (add_labels,set_issue_type,call_workflow).Root cause
The
detectionjob selects its Copilot token via:but its generated
needs:list is[activation, agent]—pat_poolis missing. Soneeds.pat_pool.outputs.pat_numberresolves to an empty string, everycase()branch is false, and the token becomes the literal fallback'NO COPILOT PAT AVAILABLE', which the api-proxy sidecar rejects → 503. The siblingagentjob works because it correctly declaresneeds: [activation, pat_pool].This was a gh-aw compiler bug — already fixed upstream
needs:without scanning its effectiveengine.envforneeds.<importedJob>.outputs.*references.buildDetectionJobnow scans the detection engine env viagetReferencedCustomJobs(...)and appends referenced custom jobs (e.g.pat_pool) toneeds.Recommended durable fix (instead of / superseding this PR)
Upgrade the local
gh awCLI to ≥ v0.82.6 (latest v0.82.8) and recompile:then commit the regenerated
*.lock.yml. That produces the same- pat_pooladdition this PR makes by hand, but durably.Introduced by
#67411 "Adopt the PAT pool for agentic workflows" — broken continuously since (only surfaces when the
detectionjob actually runs, i.e. when the agent emits safe outputs / a patch).Affected workflows (all 6)
issue-triage-agent,browsertesting-deps-update,community-pr-issue-check,cswin32-update,test-quarantine,triage-comment-reviewer.This change
Adds
- pat_poolto eachdetectionjob'sneeds:list (6 files, one line each).