Skip to content

fix(ci): push the autofix commit instead of losing it with the runner - #129

Merged
podonos-eunseo merged 1 commit into
mainfrom
podonos-eunseo/github-action-failure
Oct 6, 2026
Merged

podonos-eunseo merged 1 commit into
mainfrom
podonos-eunseo/github-action-failure

Conversation

@podonos-eunseo

Copy link
Copy Markdown
Contributor

Problem

The autofix job in regen.yml closes SDK→CLI drift on a regen PR, and its prompt ends with "Commit to this branch". Nothing ever pushed that commit, and there was no git push step after the action.

On regen PR #128 the job ran green end to end: the agent committed the fix, then posted a comment describing the --provider-voice-id flag it had added, the docs it regenerated and the test it wrote. The commit died with the runner. The remote branch kept exactly one commit and zero occurrences of provider_voice_id; the only git network operation in the job log is the checkout fetch. The PR was left with a stale red check sitting next to a confident comment claiming it was fixed — the worst of both, since the comment is what a human reads first.

The checkout step's own comment already described the intended behaviour ("the agent commits and pushes with the git CLI") — the agent was simply never told to, and nothing checked.

Solution

Make the push a deterministic workflow step rather than something the agent is trusted to remember:

  • Push the agent's commit after the action. A no-op when there is no commit, because declining to fix is by design — non-drift failures are comment-only. A loud ::warning:: when the agent left the tree dirty, which is the same silent-loss failure wearing a different hat.
  • Pushes as the pipeline App, so ci.yml re-runs on the new commit. The merge gate is ci.yml, so a push that triggers nothing would leave the PR red anyway.
  • Prompt step 5 now says who pushes, so the agent does not race the workflow or assume its commit is already safe.

Verification

regen.yml parses and the step lands in the right place:

JOB autofix
   - Check for the Claude credential
   - Mint GitHub App token
   - Checkout the regen PR branch
   - Let Claude close the drift
   - Push the agent's commit

The drift this was supposed to catch is fixed by hand on #128, which is the end-to-end proof of what the job should have produced.

🤖 Generated with Claude Code

The autofix job told the agent to commit and never pushed. On regen PR #128
the agent committed the drift fix, commented describing the flag it added,
and the commit died with the runner -- leaving a stale red check next to a
comment claiming it was fixed.

The push is now a deterministic step rather than something the agent is
trusted to do: a no-op when it declined to fix (non-drift failures are
comment-only by design), a loud warning when it left the tree dirty.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@podonos-eunseo
podonos-eunseo merged commit efbc4f9 into main Oct 6, 2026
23 checks passed
@podonos-eunseo
podonos-eunseo deleted the podonos-eunseo/github-action-failure branch October 6, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants