Repository navigation
fix(host): read the control notice instead of counting packets - #1631
Merged
Merged
Conversation
The multi-device e2e test asserted "the controller must not be told to stand by just because a device connected" by counting *any* control packet in a 300 ms window. The machine also announces a device's own arrival (`control: active`) on that same channel, from a task the handshake spawns after it has answered, so that notice races the activation of the sealed channel: while the seal has no key it is dropped, and once the client's `secure_ready` activated one it is delivered. On a loaded runner it is delivered, the `active` lands inside the window, and the assertion reported a displacement that never happened (CI run 43885835542 on PR #1630). `told_to_stand_by` now opens each packet and counts only a control state that is not `active` — and, deliberately, any state this test does not know and any packet it cannot open — so a real "stand by" notice still fails it (verified by publishing one at a device's connect) while the device's own arrival no longer does. The window, the assertion and its message are unchanged; only what counts as news is.
huichen
enabled auto-merge (squash)
November 16, 2026 15:33
auto-merge was automatically disabled
November 16, 2026 15:35
Pull request was closed
huichen
enabled auto-merge (squash)
November 16, 2026 15:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A multi-device end-to-end test read any control packet in a 300 ms window as
"the machine told this device to stand by", so a legitimate announcement of the
device's own arrival — published from a task the handshake spawns after it has
answered, racing the activation of the sealed channel — reported a displacement
that never happened on a loaded runner (CI run 43885835542 on PR #1630). The
helper now opens each packet and counts only a control state that is not
active; a state the test does not know and a packet it cannot open both stillcount, so a real stand-by notice keeps failing the assertion.
Commits
told_to_stand_byreplacescontrol_pendingin themulti_devicee2e module; the window, the assertion and its message are unchanged.Verification
Local, at
fabf77a8bondev-huichen(rustc 1.99.1 pinned,ulimit -n 8192):cargo fmt --all -- --check— cleancargo check -p future-host --all-targets— cleancargo clippy -p future-host --all-targets -- -D warnings— cleancargo test -p future-host --lib— 2269 passed, 0 failed, 15 ignored (447s)nats-serveron a free port,VERIFY_E2E_NATS_URL):remote::verify_e2e::multi_device::a_second_device_is_told_who_holds_the_machine_and_only_takes_it_when_askedpassed 3/3 (0.98s each);
remote::verify_e2e::multi_device— 2 passedUser-visible changes
None: test-only change inside
host/src/remote/verify_e2e.rs. No product code,no defaults, no data formats.