Make create_task and next_task safe to retry with optional request IDs #56
All Vouch review confidence checks passed
Residual risk 0.16 = 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 · 267 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.334
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #56"
general
weight: 0.35
emanuele-em
Stacked on #57 and #58: merge it last. Until they're in, GitHub shows their commits here too. This PR's own commit is the last one, Make create_task and next_task safe to retry with a request_id.
When an agent's reply is lost, because it was interrupted or the connection dropped, it can't tell whether its call happened.
create_taskandnext_tasknow take an optionalrequest_id. If the call is sent again with the same id, it answers with the task the first call made or took, and nothing is done twice. Fixes #53.This is the smaller version from the review:
create_taskandnext_task: retrying them is what leaves a duplicate behind, a second task or a second task taken.kanzo sync.next_taskthat took nothing keeps no receipt, since there's nothing to do twice.On a retry, the reply says
Already created earlier: api#2 in todo: …, orAlready taken earlier:followed by the task as it is now. Calls withoutrequest_id, and their replies, are unchanged.Migration 13 adds the
requeststable. It has no triggers, so a retry doesn't wake the board, and older Kanzo versions keep opening it. measure.py's board doesn't use request ids, so its database only gains the empty table and its index.Tokens: the tool list grows by 246 bytes (
request_idon two tools).cargo fmt --check,cargo clippy --all-targets -- -D warningsandcargo testpass (141 tests, with #58 and #57)