Repository navigation
Description
From the Oct 11–16 2026 Run retrospective, finding 2. Tracking issue: #721.
The evidence below is historical and attributed to the supplied report (repository snapshot 5504c97); it has not all been independently reproduced. Limited current-checkout checks were made at 53bb9c6. This is filed for maintainer triage, not automatic Pickup.
Requested outcome and validation
After merging Foreign commits, compare the resulting tree with the Run's own head. If the trees match, record the upstream move but skip the Review Repair and do not spend a Repair slot on it. Keep the review for a changed tree, including a conflict resolution that changes files.
Change the Review Repair prompt so a review with no file changes makes no commit, especially no --allow-empty commit. With no new review information, leave the PR body alone. Preserve the existing requirement to record actual declined findings when there are any.
Validation should cover tree-identical Foreign commits, genuinely changed trees, and a review that needs no code change. Demonstrate that the two-writer empty-commit loop terminates without weakening review of changed code. This is distinct from the unchanged-head CI-fix case in #102 and complements #712.
Current checkout check: src/delivery/repair_loop.rs::take_in_foreign_commits unconditionally starts the Review Repair, and src/prompt.rs::review_repair ends with an unconditional commit-and-push instruction.
Original finding, including evidence, proposed fixes, and confidence
2. Review Repairs make empty commits, so two writers ping-pong (Factory)
- Evidence: every Review Repair found an empty diff and committed anyway.
- load the sections of https://thirdshift.app/prompts/ closed and let the user toggle them open/closed #666 repair-1 ran
git commit --allow-empty -m 'Record empty review range for issue 666'. - In Load prompts page sections closed with native toggles #675, commits 1303a81→7203a42 all share tree ca00e49.
- Fix agy 1.3.3 prompt argument order #661's 1a65f51…735b830 all keep their parent's tree, with committer offsets alternating between -04:00 and +00:00.
src/prompt.rs(Review Repair) ends with an unconditional "Commit and push {branch}".take_in_foreign_commits(src/delivery/repair_loop.rs:365) starts a Review Repair for any new commit, even one that leaves the tree unchanged.- Delivery needs no commit from the session:
Sessions::runchecks nothing afterwards, androunds()pushes whatever HEAD is.
- load the sections of https://thirdshift.app/prompts/ closed and let the user toggle them open/closed #666 repair-1 ran
- Cost:
- load the sections of https://thirdshift.app/prompts/ closed and let the user toggle them open/closed #666: 3 Repairs, 71 CI minutes, and 3 of its 5 Repair budget.
- agy sessions fail on agy 1.3.3: pass the prompt as -p's value #658: 3 Repairs, 58 CI minutes, and a flaky red on the third bounce.
- release.sh resumes only its own bump PR from this repository #671: one 18.8-min CI cycle.
- Fix:
- Deterministic: after a clean merge of Foreign commits, skip the Review Repair when
git diff --quiet <own_head> HEADholds. Still count it as an upstream move. - Prompt: "If the review changes no file, commit nothing and leave the PR body as it is."
- Either change alone breaks the loop.
- Deterministic: after a clean merge of Foreign commits, skip the Review Repair when
- Confidence: high.
Activity
JacobStephens2 commentedon Oct 17, 2026
Agent Brief
Category: bug
Summary: Avoid Review Repairs and empty commits when merged Foreign commits leave the reviewed tree unchanged.
Current behavior:
The Repair loop starts a Review Repair after every nonempty batch of Foreign commits, without comparing the merged tree with its own previous head. The Review Repair prompt unconditionally requests a commit and push. The retro reports repeated tree-identical commits consuming Repairs and triggering extra CI cycles. Code inspection confirmed these missing guards; this triage did not independently reproduce the two-writer incident.
Desired behavior:
After reconciling Foreign commits, compare the resulting tree with the tree at the Run's own head before that reconciliation. When the trees match, skip the Review Repair while retaining the upstream-move accounting and normal reconciliation of commit history. When files differ, retain the review from that original head. A failed comparison must not be treated as proof that a review can be skipped.
A Review Repair that changes no files creates no commit, including no empty commit. Leave the PR body alone when there is no new review information; continue recording actual declined findings under the existing review contract. Preserve ordinary pushes needed to reconcile real upstream commits.
Key interfaces:
Outsideand its production Worktree adapter: expose the tree-comparison fact without moving orchestration into the adapter.take_in_foreign_commits(),Budgets, andRepair::Review: keep upstream moves distinct from Repairs and retain the correct review baseline.review_repair()and generated Factory prompts: make committing conditional on file changes.Acceptance criteria:
Out of scope:
Source and historical evidence: #721, finding 2. This brief defines the implementation scope; the original report remains supporting context.
Skip Review Repairs for tree-identical Foreign commits (#722)