Repository navigation
fix(template-sync): read the signed branch back more than once before failing - #898
Conversation
… failing GitHub can return a branch's previous commit for a moment after an update. The signing helper read the branch once and failed a sync that had succeeded. It now reads up to five times, two seconds apart, and still fails closed when the branch keeps pointing elsewhere. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
User trial at
Not proven here: a live sync that hits a stale read again. That depends on GitHub's timing and cannot be forced; the next red run of this kind would show it, and none is expected. 🤖 Generated with Claude Code |
Code coverage overviewLanguages: Go, C# Go / code-coverage/test
C# / code-coverage/dotnet
Go / code-coverage/go
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
@coderabbitai review |
Action not completed
|
|
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 14 minutes. View limit details
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. |
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Why
A template sync that did everything right could still be reported as failed. After the helper moved the generated branch to the App-signed commit, it read the branch back once and compared. GitHub sometimes still returns the previous commit for a moment after an update, so that one read failed the run although the branch was correct. It happened on 11 November in
ascoachingogvaner: the sync opened its pull request with a verified commit, and the run went red on the default branch.What
The helper now reads the branch back up to five times, two seconds apart, and stops as soon as it sees the signed commit. If the branch still points elsewhere after the last read, it fails with the same message as before. Nothing else in the signing path changes: the commit readback, the verification verdict and the order of the steps are as they were.
Two test cases cover it. One serves the old commit once and then the signed one, and expects success after exactly two reads. The other never serves the signed commit, and expects the same failure after exactly five reads. Against the script on
mainthe first case fails; with the final check removed the second fails.Fixes #897
🤖 Generated with Claude Code