fix(workflows): switch recompile-safe-output-fixtures trigger to release:published and drop broken Step 0#869
Merged
Conversation
…p broken Step 0
The previous workflow_run-based trigger fired on every push to main, and
its Step 0 bail-out tried to read github.event.workflow_run.{conclusion,head_branch}
from \ inside the AWF chroot sandbox. The event file
isn't reliably readable by the sandbox user, so jq silently returned empty
for both fields and the agent bailed on every invocation.
- Switch the trigger from workflow_run on the Release workflow to
release: published, which only fires when a release is actually
published. Step 2's bounded retry still handles the brief window
between release creation and asset upload by the release.yml build job.
- Remove Step 0 entirely. The 'no new release published' case is already
handled by Step 4 (no diff -> noop) and the 'release published but
assets missing' case is already handled by Step 2 (bounded retry ->
report-incomplete on timeout).
- Drop the corresponding bullet from the 'When NOT to open a PR' list.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Fixes the bail-out bug seen in run 27021589908. After PR #868 landed, the
releaseworkflow finished for the merge commit andworkflow_runfired the recompile workflow. The agent ran Step 0's bash and got back empty strings for bothrelease_conclusionandhead_branch, so it bailed out withnoop— even thoughhead_branchon the run itself was clearlymain.Root cause: Step 0 read
github.event.workflow_run.{conclusion,head_branch}from$GITHUB_EVENT_PATHinside the AWF chroot sandbox. The event file isn't reliably readable by the sandboxedawfuser(UID 1001), sojq … 2>/dev/null || echo ""silently returned empty for both fields and theif "$CONCLUSION" != "success"branch fired on every invocation. Confirmed in the agent's process log (tooluse_qYI5wexrspAEDMxqn0RkIZ) which shows the model interpreting both fields as empty.This PR:
Switches the trigger from
workflow_run: { workflows: [Release] }torelease: { types: [published] }. The new trigger only fires when a release is actually published, instead of on every push tomain(which previously caused a no-op recompile cycle every time anything landed). The brief window between release creation and binary asset upload is already handled by Step 2's bounded retry.Removes Step 0 entirely. The two cases it was trying to guard against are already handled downstream:
release: publishedtrigger.report-incompleteafter the retry window expires.Drops the corresponding bullet from the "When NOT to open a PR" list and updates the prose note explaining the trigger.
Test plan
tooluse_qYI5wexrspAEDMxqn0RkIZin the agent process log to confirm bothCONCLUSIONandHEAD_BRANCHwere empty even thoughhead_branchon the run wasmain.release: { types: [published] }is supported by gh-aw v0.77.5 (pkg/workflow/trigger_parser.go).gh aw compile recompile-safe-output-fixtures.Follows from #868 (per-file compile loop + integrity heuristic, also already merged).