fix(mcp): fence stale writes and require native collections #242
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 259 lines diff across 3 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.333
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #242"
general
weight: 0.35
steipete
A superseded MCP history response could still write its page before completion noticed that ownership changed. Scoped replies had no shared thread generation, allowing an older response to replace a newer parent and insert stale children. Native responses with missing/null collections could also certify empty completion.
Fence history requests and history-derived writes by the current checkpoint revision, and acquire shared generations for selected scoped reply roots before requesting them. Transactional write checks reject superseded results while preserving earlier valid commits, newer work and unselected backlog. Require native collection arrays before accepting a page; explicit empty arrays remain valid.
This consolidates #242, #243 and #244 and preserves Vincent Koc’s implementations and contributor credit. Ordinary retained replies keep their independent ownership. Explicit Since scopes select returned roots, while failed selected work remains available for ordinary retry. Native paging limits and the documented text-bootstrap recovery policy remain unchanged.
Validation:
No live Slack or provider completeness claim. Docs and Unreleased notes describe the ownership and response contracts.