Skip to content

fix(publish): retry gh, keep its error, and report a pushed bench apart - #53

Open
ancelin-code wants to merge 1 commit into
developfrom
fix/publish-retry
Open

ancelin-code wants to merge 1 commit into
developfrom
fix/publish-retry

Conversation

@ancelin-code

Copy link
Copy Markdown
Owner

What and why

In the tiroir retrieval cut, skill-001 finished and was pushed, then gh pr create hit a proxy timeout (feedback item 2). Three things went wrong:

  • The publisher gave up at once, although a re-run a minute later worked.
  • It warned that the ai-assisted label could not be applied. create_pr --label … ran with 2>/dev/null, so any failure was read as a missing label.
  • follow.sh reported BENCH-FAILED, although the work had succeeded.

Now:

  • publish-bench.sh tries again after 5 and 15 seconds, looking for an already open pull request before each new try. ETABLI_GH_RETRY_DELAYS sets the waits.
  • gh's stderr is kept. The label is dropped, with a warning that quotes the error, only when that error mentions the label.
  • Once the branch is pushed, a lasting failure prints PUBLISH-FAILED <id> <error> <re-run command>, and gh not found does the same. follow.sh shows it as its own event, and --exit-on-human still stops on it.

How to review

Start with the loop at the end of publish-bench.sh, then bench_end and the case on the outcome in follow.sh. The exit code stays 1 for a failed gh call, so nothing that checks it changes.

Left out on purpose: retrying the push. A failed push is not this bug, and it can fail for reasons a retry does not fix, such as a hook.

How to try it

tests/unit/test_publish_bench_script.py has a fake gh that times out on the first N creates: two failures then a labelled pull request, or every try failing and ending in PUBLISH-FAILED with the exact re-run command. In a real bench, re-running that command from the line opens the pull request.

Does it earn its place?

Without the retry, a passing network glitch costs a person a manual re-run. Without PUBLISH-FAILED, a finished bench reads as a failure, and the label warning sends them after the wrong cause. PUBLISH-FAILED is a new output line from the publisher and a new event from follow.sh, recorded in CHANGELOG.md. An agent watching the loop should treat it as "open this pull request", not "fix this bench".

🤖 Generated with Claude Code

A proxy timeout on gh pr create failed a finished bench: the label warning
blamed the label, because stderr was discarded and any failure was read as a
missing label, and follow.sh reported BENCH-FAILED although the work was
pushed. gh is now tried again after 5 and 15 seconds, the label warning
needs an error about the label, and a lasting failure after the push prints
PUBLISH-FAILED with the error and the command that re-runs the publisher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the ai-assisted AI agents worked on this change label Nov 10, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted AI agents worked on this change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant