Don't wait on a cancelled call before running the new version #45
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 · 257 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.332
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #45"
general
weight: 0.35
emanuele-em
Since #40,
kanzo mcpruns the updated program only once every request has its answer. It counted requests on the way in and answers on the way out (src/stdio.rs). But rmcp sends no answer to a request the agent cancelled ("dropping response for cancelled request"). So after one cancelled call the count never got back to zero, and the first message after the next update waited forever. From then on, nothing the agent sent reached Kanzo until the agent was restarted.A call is easy to cancel when it waits: on
kanzo sync's lock, on the busy timeout, or on a slow shared board. Pressing Esc in the agent then cancels it.To reproduce on main: run
kanzo mcpfrom a copy of the program and sendinitialize. Holdkanzo.lockas sync does, calllist_projects, cancel it withnotifications/cancelled, and release the lock. Thentouchthe program, as an update does, and call again:With this branch, call 2 gets
tools/list_changedand its answer from the new program, and call 3 is answered too.The fix keeps the ids of the requests still waiting for an answer, rather than a count. An answer removes its id, and so does a
notifications/cancellednaming it. Only incoming requests add ids, so the list can't fill again between the check and the handover. There's no new dependency, and MCP replies don't change.Test:
a_cancelled_request_is_not_waited_onsends request 1, a cancel for it, and request 2 throughread_requests, and checks that only 2 is left to wait on. To let the test feed it,read_requestsnow takes the agent's input instead of reading stdin itself. Without the cancel handling the test fails with[1, 2].cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo testpass