fix(queue): a self-routed conversation reads as a conversation in its wake record and destination status #4171
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.53) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.53 · 549 lines diff across 6 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.378
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #4171"
general
weight: 0.35
mvschwarz
Stacked on #4163; this PR's base is that branch. #4163 stops the stuck sweep from sending a recovery task to the seat that asked a conversation a question, when that conversation named itself as its work's return route (for example
rig mcp serve --front-doorunderOPENRIG_SESSION_NAME). Two other surfaces still read such an address as broken:rig gateway human add." That tells the asking agent to fix something that isn't broken.conversationthere.The change
isSelfRoutedConversationaccepts gets the issued address's kind of teaching: "awaiting-pickup: '<address>' is a conversation that named itself as its work's return route … The work waits there until that conversation reads its own queue."- The stuck sweep's no-route reading (
recordsNoWakeRoute) and the reachable-seat retry readawaiting-pickup:exactly as they readunroutable:.conversationfor such an address, with that teaching. A known seat returns earlier in that function, so a seat never reaches it.isSelfRoutedConversationalso excludes a person's address. That classification belongs to the gateway.Unchanged
Tests
On Linux (Node 22) on a test machine, at #4163's head
3f627756.New file:
self-routed-conversation-surfaces.test.ts(5 cases):Updated: #4163's front-door case now expects the new wake text.
Results:
3f627756, the four behaviour cases fail. With the change, all 15 cases in the two files pass.tscis clean.A registered person's alias (
c6d8da3a)The destination status checked for a self-routed conversation before the human registry. A person's name at a rig that routed work to itself before the person was registered (
sam@client3, thensam@externalwith a binding) read as a conversation that gets no wake, while the classifier sends it to the gateway. The status now reads the registry before both conversation readings, as the classifier does (it already checks a registered alias before every conversation rule).self-routed-conversation-surfaces.test.ts: the alias routes work to itself, then is registered. The classifier returns gateway-routablesam@external, and the status returns none.8ba364d3the case fails on the status, and with the change all 6 cases in the file pass. The other 9 related files (destination status, issued conversations, routes, cross-host handoff, startup) pass with the change (503 tests, 5 todo), andtscis clean.🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Local conversations routed back to their own queue are now identified as conversations, with guidance on where to pick them up, rather than being reported as generally unroutable.
Registered human addresses are recognized before conversation guidance, and human-seat references are not mistaken for self-routed conversations.
Unreadable human records or unavailable rosters continue to produce an unknown status when the destination cannot be confirmed. Stopped seats and unrelated destinations retain their appropriate status.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->