Add wt.sh to papercuts: squash-merge-aware done + one worktree per session (R-GIT-01 c) #33
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.45) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 439 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 95% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.364
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #33"
general
weight: 0.35
claude[bot]
Why
Mike ruling 2026-11-02: the git worktree helper
wt.sh(until now only at/home/box/shared/git-worktree/wt.sh, not in any repo) belongs in papercuts, next to R-GIT-01 "Fleet git hygiene".What
scripts/wt.sh(matchesscripts/papercut), copied from the box and then changed:- Squash-merge fix: before
donekeeps a worktree for "unpushed commits", it asksgh pr list --head <branch> --state merged. A merged PR (squash, rebase, or merge) counts as done, so the worktree is removed and the local branch is deleted. Ifghis missing or errors, the old ancestry-only behavior applies.- R-GIT-01(c): one worktree per session. Session =
$WT_SESSIONif set, elsesid-<unix session id>of the caller.getrecords the claim in$WT_ROOT/sessions/<session>.wt. A secondgetfor a different repo or branch is refused while the claimed worktree exists. Re-getting the same repo+branch returns the existing path.donereleases the claim, and a claim whose worktree is gone is cleared automatically. Newwt.sh sessionsubcommand prints the claim.- Header documents the rules, including never running
pull --rebase --autostash(wt.sh never does).tests/wt_test.sh: runs against a local bare origin with a stubbedgh. Covers the per-session claim and refusal, reuse, release ondone, keeping an unmerged worktree, removing a squash-merged one, and the absence of autostash. Wired into CI.scripts/wt.shand define "session".Follow-up after merge (not done here)
/home/box/shared/git-worktree/wt.shis untouched. After merge it should become a symlink to, or a thin wrapperexecing, this repo'sscripts/wt.sh, so there is one copy.Verification
bash tests/wt_test.shpasses locally. CI runs it.<!-- CURSOR_SUMMARY -->
---
<!-- /CURSOR_SUMMARY -->