fix(policy): take no decode pick held past its dispatch deadline #9438
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.52) × (1 − Review Confidence (0.38)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 65% · 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.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #9438"
general
weight: 0.35
claude[bot]
Description
One piece of remote mode in the Grand Central crate (section 11 of its design). No gateway file changes.
Problem
A pair that asks its decode behind its prefill's answer makes that call in two halves around its wait. The second half took a controller's decode pick at any age. A host that waited between the halves past the side's dispatch deadline sent a decode that nobody counted.
Solution
The second half,
Placement::decode_placed, now reads the side's dispatch deadline on its one read of the clock. Past it the side the call issued is released as abandoned and given up. The first decision's decode stays, as where none of the answer's decodes holds.Changes
| what | detail |
|---|---|
|
Placement::decode_placed, one answer changed | a decode pick held past its side's dispatch deadline is not taken. The call answersUnplaced::NoWorkers, and the placement keeps the first decision's decode. Until now such a pick was taken, and its send met no side at the controller || what a host sees behind it | what the call's contract states today for an answer none of whose decodes holds. The side is given up:
decode_chosenanswersfalse, a second first half is refused, and the first decision's decode is sent with no word. The controller counts no request on it || the release's word |
abandoned, a reason the wire has today. It is the controller's own word for a side whose dispatch nobody named by its deadline, and the word a decode answer dropped unplaced says already || the deadline | the one the client keeps (
Leased::due): the span the answer states, counted from the instant the call's frame was written || the clock | no read more: the second half read it once already, and the test uses that read |
| the order of the tests | the call's turn is read first, as before: a late answer out of turn is given back as a failed commit and refused by name. The deadline's test stands next, ahead of the walk over the answer's decodes: a late pick none of whose decodes holds reads abandoned |
| what passes the test by | a refusal, a decision that picked nobody and a lost answer: none holds a lease |
|
PlacementSide::decode_placed| it answers as the placement's call does, so it changes the same way || the release's builder | the guard's one builder of a decode side's release takes its reason now. No release of today changes its word |
| docs | the contract of
Placement::decode_placed, the guard's own doc, section 11 of the design and the service page's list of a call that takes no decode: one clause each || size | 6 files, all under
crates/grand_central/: 12 lines of code changed, 56 of cases, 36 of comments and docs |Breaking changes
One answer of the public
Placement::decode_placedchanges: its row above. No signature changes, and nothing else changes for a host.Test Plan
| where | what ran there |
|---|---|
| the record
4ed88a29eof this change, on mainc473747c2| the whole gate, which is the first nine rows of the next table, and the hooks. Its documentation run with private items failed once: the tool could not allocate memory for a search index grown over many runs. It is green in a cleaned output folder || the pushed commit
ffe693f17: that record laid on mainc91b80a00, four commits later. No line of the change differs:git range-diffreads the two equal | every row of the next table but the two marked "on the record", and the red run || proof | result |
|---|---|
|
cargo +nightly fmt --all -- --check| clean ||
cargo clippy --locked -p smg-grand-central --all-targets --all-features -- -D warnings| green || the same lint under the default features, under
in-process,operator, undercontrollerwith the defaults and alone, underin-process,clientalone, and underworker-hostalone | green, each of the six ||
cargo doc --locked -p smg-grand-central --no-depswith warnings denied: with every feature, with private items too, and with the defaults | green, each of the three ||
cargo test --locked --no-fail-fast -p smg-grand-central --all-features: every test program of the crate, on the record | 32 programs: 6554 passed, 0 failed, 37 ignored ||
cargo test --locked -p smg-grand-central --lib --no-default-features --features worker-host --no-fail-fast| 2319 passed, 0 failed, 2 ignored. On the record, four commits of main earlier: 2312 passed, 0 failed, 2 ignored ||
cargo test --locked -p smg-grand-central --lib --features smg-grand-central/discovery --no-fail-fast| 5526 passed, 0 failed, 22 ignored. On the record, four commits of main earlier: 5502 passed, 0 failed, 21 ignored ||
cargo test --locked -p smg-grand-central --no-default-features --features operator --test operator_door --no-fail-fast| 5 passed, 0 failed, 0 ignored, on both commits ||
cargo check --locked -p grand-central-example --all-targets, on the record | green || the cases of the two changed test files, with every feature:
--lib -- place::tests::asked frame_decision::tests::encode| 60 passed, 0 failed, 0 ignored || the page checks:
--all-features --test readme| 35 passed, 0 failed, 0 ignored || the repository's hooks over the six changed files | clean |
The new case is
a_decode_calls_pick_held_past_its_deadline_is_given_up, intests/unit/engine/in_process/place/tests/asked.rs. Its answer spans zero, so its pick is late at once. Three rounds:| round | what it holds |
|---|---|
| the pick's decode holds | the call answers
NoWorkersand the release saysabandoned. The placement keeps the first decision's decode,decode_chosenanswersfalse, a second call is refused by name, and the send says nothing || the pick's decode does not hold | the same answer and the same word: the deadline's test stands ahead of the walk over the decodes |
| the first decision's decode is sent between the halves | the late answer is out of turn: it is refused by name and given back as a failed commit, as before |
Red before this change, by one take-out of the product code, the deadline's test:
The first round fails: without the test, a late pick whose decode holds is taken. With the test in place the case is green, among the 60 cases of the two changed files.
Numbers
None counted: no bench cell runs the decode call's two halves, and no gateway calls them yet.
| what | detail |
|---|---|
| the in-process bench | built on main
c91b80a00and on this change, it is one file, byte for byte (sha256 begins28f11d0996e5). The changed function stands under theclientfeature, which that bench does not build, so none of its six cells can move || the call's own cost, not counted | one comparison of two instants more in the second half, on the read of the clock it made already. No allocation, no lock and no read of the clock is added |
| a late pick's road | one release is said at the second half, and the walk over the answer's decodes is not made. The send that follows says nothing, where it said a dispatch before |
Limits
| limit | detail |
|---|---|
| the decode behind a late pick | it runs on the first decision's decode, and the controller counts no request there, as behind every side given up |
| the client's deadline | it counts from the instant the call's frame was written, so it ends ahead of the controller's own. A send said within the link's travel of the deadline can still meet no side |
| no caller yet | no gateway calls the decode call's two halves yet |
| the link's own late answer | an answer the link reads after the call's wait ended goes another road, which this change does not touch |
Release note
The second half of a pair's decode call,
Placement::decode_placed, takes no decode pick held past its dispatch deadline. It answersNoWorkers: the side is released as abandoned, and the host sends the first decision's decode, which the controller does not count.