Repository navigation
Fix Dreaming workflow: repin gh-aw setup action to v0.79.8 so it can open its PR - #14363
jankratochvilcz wants to merge 1 commit into
Conversation
…piler
The lock body is generated by gh-aw v0.79.8, which emits
`require('extract_base_branch_from_agent_output.cjs')` in the safe_outputs
job. That script is staged by the `github/gh-aw-actions/setup` action, whose
bundle is version-coupled to the compiler. The body pin had drifted to
v0.82.8 (99d9d888), whose bundle no longer ships that file, so the
safe_outputs job crashed with MODULE_NOT_FOUND and the curated PR was never
created.
Repin `setup` to v0.79.8 (c0338fef), matching both the compiler version and
the canonical pin in .github/aw/actions-lock.json. This stages the expected
script and lets the workflow open its learning-atom PR.
Note: flaky-test-fixer and flaky-test-detector share the same drifted pin and
fail identically when they try to create a PR; they need the same fix.
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 1b63f3d4-d050-4905-9e00-bee816df8a94
|
Confirmed the root cause directly against the
The v0.79.8 compiler emits |
There was a problem hiding this comment.
Pull request overview
This PR fixes the Dreaming agentic workflow’s safe_outputs failure by repinning the github/gh-aw-actions/setup action in the compiled lock workflow so the staged helper scripts match the gh-aw compiler version that produced the workflow body.
Changes:
- Repin
github/gh-aw-actions/setupfrom v0.82.8 (99d9d888...) to v0.79.8 (c0338fef...) in all jobs within the compiled workflow. - Update the “Custom actions used” header comment to reflect the corrected setup action pin.
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Review: Fix Dreaming workflow — repin gh-aw setup action to v0.79.8
Correctness ✅
The root cause analysis is correct. The version mismatch between the lock body (generated by v0.79.8, which emits require('extract_base_branch_from_agent_output.cjs')) and the setup action (pinned to v0.82.8, which dropped that file) is a well-understood version skew problem. Repinning to v0.79.8 (c0338fef) is the right fix to restore consistency.
Consistency ✅
All 6 uses: occurrences are updated, and the comment block at the top is also updated to match. No stale references left behind.
Risk: Low (for this workflow)
Downgrading setup from v0.82.8 → v0.79.8 is low risk here because the lock body was already generated against v0.79.8. This restores a known-compatible pairing rather than introducing anything new.
Completeness ⚠️
The PR description explicitly acknowledges that flaky-test-fixer and flaky-test-detector carry the same drifted pin and fail identically, but scopes this fix only to Dreaming. If those workflows are actively running and failing, this creates a situation where the same known breakage exists in two other places. Consider whether a follow-up PR is tracked or whether this PR's scope should be widened.
Forward-looking concern
This is a regression-to-fix-a-regression pattern. The proper long-term fix is to either:
- Regenerate the lock file against v0.82.8, or
- Pin all gh-aw components to a single coherent version set going forward.
The PR is acceptable as a targeted hotfix, but a follow-up to align all three workflows (Dreaming, flaky-test-fixer, flaky-test-detector) to a single current version would be cleaner.
Generated by Expert Code Review (on open) for #14363 · 34.5 AIC · ⊞ 30.3K
|
Fleet-wide breakage tracked in #14364 (flaky-test-fixer / flaky-test-detector fail identically). This PR is the minimal per-workflow fix for |
Fixes #14364. ## Root cause The agentic-workflow lock files (`*.agent.lock.yml`) are generated by the `gh aw` compiler, and their inlined helper scripts are staged at runtime by the pinned `github/gh-aw-actions/setup` action. That setup bundle is **version-coupled to the compiler**. On `main` the lock bodies were compiled by **gh-aw v0.79.8** — which `require()`s `extract_base_branch_from_agent_output.cjs` in the `create-pull-request` safe-outputs path — but the `setup` pin had drifted to **v0.82.8**, whose bundle no longer ships that helper. Result: every workflow that creates a PR crashed its `safe_outputs` job with `Cannot find module '.../extract_base_branch_from_agent_output.cjs'` (MODULE_NOT_FOUND) and **no PR was ever created**. This broke `flaky-test-fixer`, `flaky-test-detector`, and `dreaming` alike. ## Fix Recompile the whole fleet with **gh-aw v0.82.9** and repin `github/gh-aw-actions/setup` to **v0.82.9** (`ca8678ca22a7aab577514482576720da641e5661`), so the generated bodies and the staged helpers come from one consistent toolchain. The v0.82.9 bodies no longer require the dropped helper. ### Source-level verification (can't be tested via a branch run) These workflows gate on `environment: copilot-pat-pool`, whose deployment-branch policy is restricted to `main`, so an end-to-end dispatch from a branch fails instantly at `pre_activation`. Instead I verified statically: all **39** `.cjs` helpers the recompiled fleet `require()`s are present in the pinned setup tree at `ca8678ca` (which ships 370). In particular the create-PR path now uses `create_pull_request.cjs` / `create_pull_request_helpers.cjs` / `push_to_pull_request_branch.cjs`, all present. `gh aw compile` is idempotent on the committed state. ## About the diff (please read) A gh-aw version bump legitimately regenerates large portions of every lock file — that churn is expected, not hand-editing. - **`.github/workflows/agentics-maintenance.yml` (new, ~633 lines) is auto-generated by `gh aw compile` at v0.82.9** — it's the companion "maintenance" workflow the compiler emits for workflows that use expiring safe outputs. It is generated output, not something authored here. It can be disabled by setting `{"maintenance": false}` in `.github/workflows/aw.json` if the team prefers not to have it. - The one-line-per-file `*.agent.md` changes collapse the multi-line `COPILOT_GITHUB_TOKEN: case(...)` block to a single line — **required**, because v0.82.9's compiler rejects the old multi-line form. - I intentionally **did not** include the `.github/agents/agentic-workflows.md` and `.github/skills/agentic-workflows/SKILL.md` authoring-helper files: they are **not** produced by `gh aw compile` (they come from a separate scaffolding step), aren't needed for this fix, and would add a redundant agent+skill pair to the repo. Supersedes the minimal dreaming-only #14363 (left open for the maintainer to close). Co-authored-by: Copilot App <[email protected]>
|
Superseded by #14365 (merged), which upgraded the whole gh-aw fleet to v0.82.9 and repinned |
What this changes
One pin in
dreaming.agent.lock.yml:github/gh-aw-actions/setupv0.82.8 → v0.79.8 (7 identical lines). Nothing else.Why (and why it's not an arbitrary manual edit)
On its first run the Dreaming agent worked correctly and produced a good learning-atom proposal, but the
safe_outputsjob crashed before creating the PR:The lock body is generated by gh-aw v0.79.8, which emits
require('extract_base_branch_from_agent_output.cjs'). That helper is staged by thesetupaction, whose script bundle is version-coupled to the compiler. The body'ssetuppin had drifted to v0.82.8, whose bundle no longer ships that file (source-verified below), so therequirefails.Repinning
setupto v0.79.8 is the value the repo's own tooling already declares — this is a reconciliation back to the declared inputs, not a hand-picked number:.github/aw/actions-lock.jsonpinsgithub/gh-aw-actions/[email protected](c0338fef).gh aw compile dreaming.agent(compiler v0.79.8) independently emits the same[email protected]pin.Source-level confirmation of the coupling:
github/gh-aw-actions/setupsetup/js/extract_base_branch_from_agent_output.cjs?c0338fef) — matches the compiler99d9d888) — the drifted body pinI kept the change to the single poisoned pin rather than committing a full recompile, because a clean local recompile also reverts
actions/checkoutv7.0.0 → v6.0.3 (my local toolchain is out of sync with the fleet's codemods) — an unrelated churn. This PR keepscheckoutat the fleet's v7.0.0 and touches onlysetup.Fleet-wide note (tracked separately)
flaky-test-fixerandflaky-test-detectorcarry the same drifted[email protected]pin and fail identically atsafe_outputswhenever they try to open a PR — every scheduledflaky-test-fixerrun has been failing this way. Filed as a separate issue for the infra owners to fix fleet-wide (or at thegh aw upgradecodemod /actions-lock.jsonlevel).Verification / testing
The
copilot-pat-poolenvironment (which the workflow'spre_activationjob gates on) has a deployment-branch policy restricted tomain, so an end-to-end branch test can't get past the token gate — the fix must be onmainto run for real. Confirmed at the source level (table above) and by clean recompile that this is the correct pin; once merged I'll re-trigger to confirm the learning-atom PR opens end-to-end.Outcome evidence (first run, 29402080275)
The agent's proposal, exactly the intended small / evidence-based / edit-over-add / no-duplicate behavior: