fix(handover): name the committed occupant in the seat's tmux session #4225
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 355 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · 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.351
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4225"
general
weight: 0.35
openrig-review
The problem
An in-place seat handover starts the successor with the new occupant generation in its pane's own environment, but the seat's tmux session keeps the predecessor's.
rig seat handover --recovercommits the same way.That stale entry has readers:
seat-launch-environment.tsbuilds the launch's identity from it.Either one starts, and reports its hook activity, as the previous occupant, which the generation check then reads as a mismatch.
This closes a path seen at source, not one observed failing in use. Whether a production relaunch after a handover reaches the first reader hasn't been traced to the end.
What changes
setRuntimeSwitchEnvironment, "so a later pane or respawn in it starts as the successor's"). It's one call, not a new writer.How it was checked
main:- the real-tmux handover environment test (
seat-env-handover-native.test.ts) finds the session still naming the previous generation after each handover;- two new
--recovercases (claude-handover-recover.test.ts) see no write.- every daemon test file that builds the handover service: 15 passed and 2 skipped (gated end-to-end files), 694 tests;
-
npm run lintpassed.startup.test.tshas four "assembled classic clear" cases that fail on that test machine with "isolated account launch unavailable". They fail the same way on unchangedmainthere, so hosted CI decides them.--recoverof a live Claude successor. The recovery cases use the existing recovery fixture.🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
After a successful seat handover, the successor’s runtime and occupant generation are now recorded in the tmux session, helping later panes and relaunches use the correct occupant.
* If the session update fails, the handover still completes and includes a warning that a later pane or relaunch may start as the previous occupant.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->