fix(network): send a stage note only while it's still true, so a late result costs three hub calls instead of five #4206
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.50) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 577 lines diff across 7 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.380
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4206"
general
weight: 0.35
openrig-review
What a person sees
rig networkis experimental and unsupported. When a connected seat held a backlog, work it had finished could read "inprogress" on the hub for many minutes.
Why: a result reported late cost up to five hub calls:
Under a backlog, the two notes reached the hub minutes late, together with the result, and the first was no longer true.
Now: a stage note goes out only while it's still true.
The pass's order stays as it was:
Each stage keeps its window in every pass. An earlier revision of this PR answered findings after results. That only
moved the pass's time from one stage to another, so it's out.
No wire change: the same hub tools with the same arguments, minus the stale notes. A member running an earlier
version behaves as before.
Evidence
63 results. The drain with no findings settled 197.
connector's own tests' hub. Two runs of each:
| | Results settled, no findings | Results settled, 150 findings | Findings answered |
|---|---|---|---|
| before | 112, 121 | 54, 51 | 130, 118 |
| this change | 184, 136 | 79, 79 | 125, 118 |
- With findings, about 50% more results settle, and findings answered don't change.
- The noise between identical runs on a shared test box is large: 136 to 184 for the same code.
- It's a model, not a run between two machines.
Tests
packages/daemon/test/network-connector.test.ts, two new cases, both failing on main:- an item that finished before its stage notes went out gets its result alone, and nothing more later;
- an item picked up before its queued note went out gets the pickup note, never "Not picked up yet".
pickup note (
pickupsSent1, was 2). It fails on main.packages/cli/test/fixtures/network-hub/inbound-loop.json): pass 2 is an item the seatpicked up and closed before the pass. It drops the one pickup-note exchange this no longer sends, and its description
says why. On main, the connector sends that note and the contract fails, since no recorded exchange matches it.
| Suite | Result |
|---|---|
| Daemon
network-andqueue-stuck-sweepfiles | 24 files, 752/752 || CLI
network-connector-hub,network-connector-contract,network-command,mcp-http-grant-service-network| 52/52 || Daemon and CLI
tsc --noEmit| exit 0 || Docs guard | exit 0 |
Not run here
counting as stalled, but that isn't measured here.
🤖 Generated with Claude Code
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
Stage updates reflect an item’s current state: completed items receive a result without stale queued or pickup notes, while picked-up items receive a pickup note without a stale queued note.
Documentation
Clarified that stage notes are sent only while the corresponding stage remains current.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->