Skip to content

Skip Review Repairs for unchanged Foreign commit trees - #758

Merged
JacobStephens2 merged 4 commits into
mainfrom
issue-722
Oct 17, 2026
Merged

JacobStephens2 merged 4 commits into
mainfrom
issue-722

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Summary

Skip Review Repairs when reconciled Foreign commits leave the reviewed tree unchanged. Preserve history, upstream-move accounting, and review of changed trees.

merge Foreign batch; count upstream move
resolve conflicts; verify merge completion
if tree(HEAD) differs from tree(own_head)
  start Review Repair from own_head; spend Repair slot

Review Repairs commit only file changes, prohibit empty commits, and preserve the PR body when there is no new review information. Actual declined findings still get recorded.

Closes #722

Evidence

  • Before: cargo test --test merge_run a_tree_identical_foreign_commit_is_merged_without_a_review_repair -- --exact failed: 2 sessions instead of 1.
    After: passes; the Foreign commit lands with only the implement session.
  • Before: cargo test --bin thirdshift prompt::tests::a_review_without_file_changes_commits_nothing_and_preserves_review_information -- --exact failed on the unconditional commit instruction.
    After: passes with conditional commits, no empty commits, and preserved declined-finding instructions.
  • Two-writer regression: a changed batch is reviewed, the other writer's empty review is reconciled without another Repair, and a later changed batch is still reviewed. Both reviews make no local commit; the PR retains its body and delivery footer. Additional scenarios retain coverage for two consecutive empty commits and a changed-then-restored Foreign batch.
  • Full cargo test passes: 1846 passed, 2 existing ignored tests.
  • Validation: Delivery tests (45), Worktree synchronization tests (35), generated prompt checks (10), site browser tests (4), cargo check --all-targets, cargo clippy --all-targets -- -D warnings, and cargo fmt --check pass.

Test seams

  • Delivery through take_to_goal and its scripted Outside: Review Repair decisions, baselines, merge completion, error propagation and separate budgets.
  • Worktree synchronization through its public interface, with real Git: compare committed trees under acquired-checkout ownership guards.
  • Merge run CLI with real Git and fake Harness/GitHub: reconcile Foreign histories without empty reviews, retaining review of changed trees.
  • prompt::review_repair: conditional commits and preservation of declined findings and PR information; generated prompt golden files.

Unaddressed findings

Standards

None. The independent review of the combined branch reported no findings.

Spec

None. The independent review of the combined branch reported no findings.

Review coverage: Standards and Spec each read all 12 changed files, including generated output. No changed file was left unread.

Security

None. A single-session guidance review of git diff 68c8efecd407d7a02992773b8f4cc6d33a0deef6...HEAD, including supporting code, confirmed no introduced security findings. Checked tree comparison and failure handling, checkout ownership, pinned Foreign commit observations, merge completion, Repair/upstream-move budgets, CI head binding, and the revised prompt.

Focused local validation passed: 45 Repair-loop tests, 35 Worktree synchronization tests, 1 prompt test, and 32 merge integration tests. Execution used a network-isolated sandbox with read-only source/toolchain, an allowlisted environment, disposable scratch storage, and resource limits. One notification fixture passed on retry after exposing the system CA certificate bundle read-only to the sandbox.

Merge Danger

Door: two-way

Revert restores the prior Repair and prompt behavior; no data migration.

Blast Radius: Delivery

Merge runs skip only proven tree-identical reviews. Changed trees retain review, and comparison failures stop delivery.

Built with codex · gpt-6.1-sol · high

@JacobStephens2
JacobStephens2 merged commit 1c7c40a into main Oct 17, 2026
18 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-722 branch October 17, 2026 13:39
@JacobStephens2
JacobStephens2 restored the issue-722 branch October 17, 2026 13:49
@JacobStephens2 JacobStephens2 mentioned this pull request Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip Review Repairs for foreign commits that leave the tree unchanged

1 participant