fix(impl-generate): forward change_request on auto-retry#5724
Merged
Conversation
The auto-retry dispatch (line 835-840) called `gh workflow run impl-generate.yml`
without `-f change_request="${{ inputs.change_request }}"`, so cross-library
divergence hints from `daily-regen` pre-flight were silently dropped when an
attempt failed and got retried.
Observed in daily-regen run 25392762766: matplotlib's first attempt failed at
"Process plot images (light + dark)"; the auto-retry succeeded but without the
similarity audit's hint. By chance Claude picked a different scenario anyway,
but the cluster could re-converge next time.
Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the impl-generate.yml auto-retry path so a change_request hint (generated by daily-regen similarity pre-flight and forwarded via bulk-generate) is preserved when a failed attempt is automatically re-dispatched.
Changes:
- Forward
change_requestwhen invokinggh workflow run impl-generate.ymlfor automatic retries. - Add inline documentation explaining why the hint must be forwarded on retry.
- Extend the retry notice log line to indicate whether a
change_requestwas present.
Comment on lines
+841
to
+845
| -f issue_number="${ISSUE}" \ | ||
| -f model="${MODEL}" | ||
| -f model="${MODEL}" \ | ||
| -f change_request="${{ inputs.change_request }}" | ||
|
|
||
| echo "::notice::Triggered automatic retry for ${LIBRARY}/${SPEC_ID} (attempt $((ATTEMPT + 1)), model=${MODEL})" | ||
| echo "::notice::Triggered automatic retry for ${LIBRARY}/${SPEC_ID} (attempt $((ATTEMPT + 1)), model=${MODEL}, change_request=$([ -n "${{ inputs.change_request }}" ] && echo present || echo none))" |
Owner
Author
There was a problem hiding this comment.
Addressed in commit a67e7fe — switched to passing change_request via the step's env: block as CHANGE_REQUEST, which arrives in bash as a raw env var with no template interpolation. Now safe against quotes / $ / backticks in the hint.
…erpolation Copilot review on PR #5724 caught that `${{ inputs.change_request }}` was template-interpolated directly into the bash script of the auto-retry step. If a future hint contained `"`, `$`, or backticks the bash quoting would break for both the `gh workflow run` arg and the `[ -n ... ]` check. Switch to passing the value via the step's `env:` block as `CHANGE_REQUEST`, which arrives in bash as a raw env var (no shell evaluation). Same pattern the rest of the workflow already uses for its env vars. Also factored the inline `[ -n ... ] && echo ... || echo ...` into a plain `if` so the notice line is easier to read. Co-Authored-By: Claude <noreply@anthropic.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
The auto-retry dispatch in
impl-generate.yml(lines 835-840) calledgh workflow run impl-generate.ymlwithout forwarding thechange_requestinput, so cross-library divergence hints from
daily-regenpre-flight weresilently dropped when an attempt failed and got retried.
Why
Observed in
daily-regenrun 25392762766:the similarity audit flagged matplotlib (Product A–D 42/28/18/12 percentages
matched highcharts and letsplot exactly) and
bulk-generatecorrectly passedthe hint to matplotlib's first impl-generate dispatch. But that first attempt
failed at "Process plot images (light + dark)" → the auto-retry re-dispatched
without
-f change_request=...→ the hint was lost on retry.By chance Claude picked a different scenario (Survey responses) on the retry
anyway, but the plumbing was defective: next time the same cluster could
re-converge.
Changes
impl-generate.yml: pass-f change_request="${{ inputs.change_request }}"on the auto-retry dispatch.
accidentally remove it.
Test plan
daily-regencycle that hits a flagged library AND thatlibrary's first attempt fails, verify the retry logs show
::notice::Change request staged: ....not necessary — observed in the wild on run 25392762766.
🤖 Generated with Claude Code