Repository navigation
Free an undelivered Review run's worktree over validation artifacts (#2049) - #2089
Merged
Merged
Conversation
Merged
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.
Summary
A Review run that ended without Delivery kept its worktree and local branch because of validation logs that its own prompt had told the session to write. The cause:
SkillWorktree::on_pull_requeststarted inUntrackedFiles::Preserve, andReviewProcessonly switched to discarding untracked files oncedeliveredwas true. SoDropcounted.review-logs/as uncommitted work.Preservation is unchanged. Unpushed commits, tracked or staged edits, and any untracked file outside the two named roots still keep the worktree and log the warning. The Review validation prompt now names
.review-logs/as the place for disposable logs. The user manual and the homepage say that an undelivered Review run frees its worktree when only those files are left.Evidence
Execution evidence
cargo test --test review_run an_undelivered_reviewtest result: ok. 2 passed; 0 failed. The fullreview_runfile gives 37 passed. The existingretry_delivers_commits_retained_after_delivery_validation_failedstill shows an undelivered run with an unpushed commit being retained.cargo test --bin thirdshift worktree→ 197 passed.cargo test --bin thirdshift prompts_page→ 14 passed.npm run docs:check --prefix site→ exit 0.npm test --prefix site→ passed.scripts/affected-tests mainselected the full suite. The unit tests (1809 passed) and every integration file passed excepttests/process.rs, where 1–2 tests infindings::fail intermittently. Those tests fail at the same rate with this branch's sources reverted toorigin/main:cargo test --test process findings::failed 3 of 3 times on main's sources and 1 of 3 on this branch. That flakiness predates this change. Because of fail-fast, I ran the integration files afterprocessseparately (cargo test --no-fail-fast --test process_identity … --test user_config), and all of them passed.Visual evidence
Homepage, Review-run validation paragraph (fold opened), 1440×900:
Review coverage
The
thirdshift-code-reviewreview usedrefs/remotes/origin/mainas the fixed point.validation_artifactwas made accurate. The variant that discards all untracked files was renamed toDiscardAllUntracked. The repeated switch moved intoUntrackedFiles::status_flag/keeps.Every changed file was read by both reviewers. The generated files were inspected as diffs and confirmed against their sources, so none was left unread:
prompts/*.mdand the fragment insite/prompts/index.html, regenerated fromsrc/prompt.rs, andsite/docs/index.html, regenerated fromdocs/guide.md.Unaddressed findings
Standards
None.
Spec
None.
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
Reverting restores the old retention. Cleanup deletes only untracked files under root
.review-logs/or.validation-*in a Review checkout. A real file committed to a repository under those names is tracked, so it is unaffected.Blast Radius: narrow
Only Review run worktrees (
SkillWorktree::on_pull_request) change. Skill, Custom process and Ticket run worktrees keep their policies, and so does retained-checkout recovery.Closes #2049
Built with claude 2.1.314 · opus · default effort