Repository navigation
fix: salvage completed review retry output - #62
Merged
Merged
Conversation
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
Recover a completed retry review from the SDK execution transcript when the pinned vendor wrapper rejects it before exporting structured output. Keep the normal compiler and publication path, and preserve the first attempt's transcript before the retry reuses the vendor's execution-file path.
Evidence from megaeth-labs/mega-agents#366 on November 24, 2026:
00:51:46.75Z: the first attempt ended withterminal_reason: max_turns/error_max_turnsand no structured output.00:56:28.96Z: the retry returned a completed SDKresultwith a populatedstructured_outputobject.00:56:29.21Z:anthropics/claude-code-action@5ef2e550a465a721f4f45e4a7d3c340c873e1dccrejected that successful result because it reported 67 turns against the configured maximum of 66. The action failed before exporting structured output, so compilation and publication were skipped and the report emittedMODEL_ACTION_FAILED.00:56:29.61Z: both transcript captures copied/home/runner/work/_temp/claude-execution-output.json, after the retry had replaced the first attempt's record.The fix belongs in our wrapper because we cannot patch the pinned third-party action. Salvage reads only top-level completed, successful SDK result records containing a non-empty JSON object. It rejects malformed, partial, max-turns, stream-event, tool-use, and non-object output and never reconstructs a result from prose. Existing action outputs retain priority.
The retry failure remains visible in step outcomes, but a successful compile permits normal publication and prevents an obsolete
MODEL_ACTION_FAILEDreport. The run summary explicitly notes when retry output was salvaged after a wrapper turn-count rejection.Test plan
claude.ymltest, which does not apply to this repository.bash -n, andgit diff --checkpass.MISE_SHELLCHECK_VERSION=0.11.0 actionlint -colorreports the pre-existing SC2001 warning at.github/workflows/actions-test.yml:243. This workflow is unchanged.python3 .github/scripts/action_docs.py --checkexits 0; the generatedREADME.mdstep list is regenerated in8ac938dfor the two added steps.Review
Independent review of
5172d68(opus-5-5) returned APPROVE with two MEDIUM findings; both are fixed in4d18644:analysis-transcript.json, and salvage is gated onsteps.review_retry.outcome == 'failure'.if:line and runs the capture scripts against a state dir that already holds a stale retry transcript.