Repository navigation
Preserve Background Review across same-turn commits #302
Description
Finish Line
A root turn that changes files and commits before completion still produces one durable Background Review against the captured completed-turn diff and applicable post-turn HEAD, without requiring the worktree to remain dirty.
Current Status
Update 2026-07-12 UTC:
State: Complete.
PR #316 merged the core scheduler, persistence, fresh-home lock, and model-awareness repair as 7f64e6cadb58ccab4f8427cb2f1a3eb31f6ec99a. PR #317 merged the codex exec shutdown wait and deterministic black-box proof as 6ab497976cf658793f6b69af9a2739677bc61fe2.
Final specialist review found no breaking-change, model-context, or change-size issues. Two P2 test-coverage gaps were resolved with session-path integration coverage for clean committed-turn duplicate reuse and suppression of committed-turn findings from the next normal request. The 16 focused automatic_background_review_ tests pass, the full 84-test exec-harness unit discovery passes, and both PRs completed all required CI checks.
Exact-main dogfood proof:
- Source commit:
6ab497976cf658793f6b69af9a2739677bc61fe2on cleanmain. - Source tree/index tree:
617eecbe0f0c54d5372db3ba8e865d70f6c673d8. - Working-tree SHA-256:
b0ffc1b02cb3c0e5a2bbf2c1f93b475b0bbefbdfb4d0ebc025ca1826c0d6193b. - Binary SHA-256:
de7860474cc120bed06eb8aaa7885d40076bc1dfd6b93fcb42babfedd7b5f6dd. - Evidence bundle:
/Volumes/Developer-Artifacts/local/codex-lab/proofs/issue-302/6ab497976cf6-20260712T015610Z. - Scenario:
background-review-same-turn-commit, return code 0, four Responses requests, no assertion failures. - Durable Background Review: run
0dde1593-6310-49a3-a93d-7d9e518fd4b7, statuscompleted, freshnesscurrent, targetcurrentTurnDiff, target HEAD equal to clean workspace HEAD5a0b9c9679b7324877e4a06321a0ad6345b1d7d6.
The linked-worktree coordination behavior rediscovered during review predates this repair and is intentionally tracked separately in #318, blocked by #230.
Next action: continue the now-unblocked convergence work under #230 and #304.
Blocked by: none.
Waiting for: nothing.
Last verified: exact-main deterministic dogfood proof on 2026-07-12 UTC.
Acceptance Criteria
- A captured non-empty completed-turn diff remains reviewable when the worktree is clean because the turn committed its changes.
- The durable run records the applicable post-turn commit/target and remains current after PR creation.
- A genuinely unchanged turn still schedules no review.
- Equivalent diffs remain deduplicated and stale schedules remain superseded.
- Cancellation, debounce, lock acquisition, and foreground-work guards retain their current behavior.
- A fresh isolated
CODEX_LAB_HOMEcan initialize and clean review coordination locks without warnings. - Focused core/Background Review tests and an exec-harness scenario cover the full lifecycle.
- A rebuilt current binary with recorded Make dogfood build provenance visible #311-compatible provenance creates an observable durable Background Review before this issue closes.
Relationships
- Child of Rework durable Background Review around upstream review primitives #231.
- Blocks Sync Codex Lab with current openai/codex substrate #230 and Establish the upstream compatibility envelope #304 high-risk convergence implementation.
- Related to Adopt Background Review terminology across product surfaces #303 terminology migration.
- Related to Codex Lab MVP dogfood plan #28 and Restore Every Code auto-validation loop #284.
- Uses Make dogfood build provenance visible #311-compatible binary provenance for final dogfood evidence without being blocked on the full provenance feature.
Activity
[-]Preserve background Auto Review across same-turn commits[/-][+]Preserve Background Review across same-turn commits[/+]shiny-code-bot commentedon Jul 12, 2026
Completed by merged PRs #316 and #317. Exact-main proof at
6ab497976cf658793f6b69af9a2739677bc61fe2produced durable Background Review run0dde1593-6310-49a3-a93d-7d9e518fd4b7withstatus=completed,freshness=current, matching target/workspace HEAD, and a clean worktree. The external provenance/evidence bundle is recorded in the issue Current Status. Follow-up linked-worktree coordination work remains tracked separately in #318.