Repository navigation
fix(applier): make --fix able to land a commit - #1134
Merged
Merged
Conversation
Two defects meant the --fix path could never land a commit on any repo (found by a live canary on metadatastician/_pathroot, 2026-10-02): - createCommitOnBranch received `-F input=<json>`, which gh sends as a STRING; GitHub rejects it as an invalid CreateCommitOnBranchInput. The whole request body is now built by `commit_payload` with jq and sent via `--input -`, and the returned oid must be 40 hex. - On a 404 for the branch ref, gh prints the error body on stdout, so the branch was taken to exist and never created. Only a 40-hex SHA now counts. A branch created for a commit that then fails is deleted again. New known-answer control: commit_payload's input is an object with the exact headline, body and file contents (a valid tojson mutant is caught). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016L7GFo3yGQ2vK9YgKL2wsP
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Until now,
scripts/apply-workflow-pins-remote.sh --fixcould not land a commit on any repo. That covers both the scheduledapply-workflow-pins.ymljob and manual runs. A live canary onmetadatastician/_pathrootfound two defects:createCommitOnBranchinput passed as a string.-F input=<json>makes gh send a JSON string, and GitHub rejects it:Variable $input of type CreateCommitOnBranchInput! was provided invalid value. The newcommit_payloadbuilds the whole request body withjq, and it is sent withgh api graphql --input -. The returned oid must be 40 hex characters.gh api …/git/ref/heads/<b> --jq .object.shaprints the error body on stdout. The applier took that as the branch's head and never created the branch. Now only a 40-hex SHA counts.If the commit fails, the applier now deletes the branch it just created.
Evidence
--self-test: all controls pass, including the newcommit_payload sends input as an objectcontrol.inputas a string (| .variables.input |= tojson) is caught by that control.--fix --only metadatastician/_pathrootopened chore(ci): re-point standards reusable-workflow pins to 11ba299dca22 metadatastician/_pathroot#36. Its commit is GitHub-Verified and changes only the 5 standards pins.🤖 Generated with Claude Code
https://claude.ai/code/session_016L7GFo3yGQ2vK9YgKL2wsP