Repository navigation
Conversation
…'s stall findings, without stale stage notes A stage note goes out only while it's still true: an item picked up before its queued note went out gets the pickup note alone, and one that finished before its notes went out gets only its result, three hub calls instead of five. A hub's stall findings are still claimed with intake, but answered after the pass's results are reported, until nine tenths of its deadline; one left over stays claimed for a later pass. A finding the connector can't answer is still taken as work. The recorded-hub contract's inbound-loop pass 2 drops the pickup note it no longer sends.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
…nswer findings before the seat's request reads A finding claimed at intake now gets a receipt that keeps it owed (outcome "finding"), so a pass that stops before answering it no longer loses it. The hub lists held items newest first, 200 at most, and a claimed item has left pending, so before this an older finding behind 200 newer held items was never listed again. Answering the finding removes its receipt; taking it as work turns the receipt into that work's own, so there is still one local item. Findings are answered after results and before the requests the seat sent are read, until nine tenths of the pass. Slow request reads can no longer use up their turn every pass; the requests keep the rest of the pass and still rotate.
…g intake again Answering a hub's stall findings after results moved the pass's limited time from one stage to another without adding any: results gained what findings lost, and the seat's own requests lost their window. Findings are answered as they're taken again, as before, so every stage keeps its window in each pass: intake up to half the deadline, results until three quarters, then the answers to the seat's requests. A stage note still goes out only while it's true: a result that finished before its notes went out costs three hub calls instead of five.
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
A recorded run, with an older hub and a newer member: drain passes that answered 150 to 187 findings settled 46 to
63 results. The drain with no findings settled 197.
A model of one drain pass, at a tenth of that scale: every hub call waits 5 ms, a pass has 6 s, and it uses the
connector's own tests' hub. Two runs of each:
Tests
packages/daemon/test/network-connector.test.ts, two new cases, both failing on main:One existing case updated: after a reconnect, an item that finished before it gets its result without a late
pickup note (
pickupsSent1, was 2). It fails on main.The recorded-hub contract (
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.
Ran locally, with Node 22:
network-*andqueue-stuck-sweep*filesnetwork-connector-hub,network-connector-contract,network-command,mcp-http-grant-service-networktsc --noEmitNot run here
counting as stalled, but that isn't measured here.
🤖 Generated with Claude Code
Summary by CodeRabbit