Repository navigation
Turn Pair with IP on: wire minor 4, and the helper lists pair-with-ip and pair-with-ip-names - #65
Merged
Merged
Conversation
PROTOCOL_MINOR_VERSION is 4 and the helper lists pair-with-ip. A minor-4 build speaks minors 3 and 4: a minor-3 peer still connects (agreed 3), a minor-2 peer is refused at HELLO with its minor reported. The test hook only lowers the minor again; the Pair with IP tests run at the real minor, and the gate's tests lower a helper to minor 3. Vectors, the second implementation, wire.md and the designs follow.
# Conflicts: # crates/mousse-helper/src/app/mod.rs # crates/mousse-net-io/tests/direct_joiner.rs # docs/pairing-flow-design.md
… wire speaks minor 4 pair-with-ip-names tells an app that join.direct takes a computer name and invite.create may give host_name. Both are left out by a helper lowered to minor 3, which answers the ops unsupported. The name-dial helper test runs at the real minor.
… implementation; both release guards name the new controls The TypeScript joiners and host close for a protocol error when a JOIN_DIRECT or an AUTHORIZED with keys 2 or 3 arrives on a connection that agreed minor 3, before dispatch, as the Rust driver does. wire.md says the minor-4 side refuses a minor-2 peer whichever side dialled. The helper's release-build guards name direct-features-ungated and direct-host-name-localhost. An unused import goes.
This was referenced Dec 1, 2026
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.
Slice 8 of mousse-agent/mousse#2079: turns Pair with IP on. The wire's newest minor version is now 4, and the helper lists
pair-with-ip, pluspair-with-ip-namesfor joining by computer name (#52, #58, #60).What changed
PROTOCOL_MINOR_VERSIONis 4 (mousse-net-core). A minor-4 build speaks minors 3 and 4. A minor-3 peer still connects (agreed minor 3), and a minor-2 peer is refused atHELLOwithUNSUPPORTED_VERSIONand its minor reported, so the app shows Needs update (docs/pair-with-ip-design.md§5).hellolistspair-with-ipandpair-with-ip-names, both only while the helper speaks wire minor 4. A debug build lowered to minor 3 lists neither and answers every Pair with IP opunsupported. Before this change the list didn't depend on the minor.pair-with-ip:invite.create {kind: "direct"},join.direct,join.direct.canceland their events.pair-with-ip-names:join.directalso takes<name>:<port>, with itsnot_founderror, andinvite.createmay givehost_name. An app gates the name field and the host name on it.MOUSSE_NET_TEST_HELLO_MINORnow only lowers a debug build to an older minor, never to its own or a newer one. Its test (test_minor_hook.rs) is replaced by a unit test inconn.rs,the_test_hook_speaks_older_minors_only. Pair with IP tests run at the real minor. The tests that prove the ops answerunsupportedlower a helper to minor 3 (MOUSSE_NET_TEST_HELLO_MINOR=3), so the gate stays proven.hello.json(this_build, newpeer_previous_minorandpeer_two_minors_backcases),control.json,mux.jsonandpairing-e2e.json.interop/second-impl-ts/wire.ts) and the simulator.spec/wire.mdanddocs/limits.md.docs/pairing-flow-design.md: thepair-with-iprow is listed from minor 4, and there is a newpair-with-ip-namesrow.docs/pair-with-ip-design.md: §7 phase 4 is done, and §4 "Helper protocol as built" names both features.How minor 3 and minor 2 are proven
hello.jsoncasespeer_previous_minor(a minor-3 peer: agreed 3) andpeer_two_minors_back(a minor-2 peer:UNSUPPORTED_VERSION). Core and the second implementation both run them, and core runs them on wasm32 too.app_both_ways::a_minor_3_peer_connects_and_calls_go_both_ways. A helper lowered to minor 3 pairs with a minor-4 one, connects at minor 3, and calls go both ways.app_version_refusals. A host lowered to minor 2 is refused for version: the app seesunsupported_version {peer_minor: 2}andpeer.incompatible, the refusal is kept and retried, and it clears once the host updates.app_pair_ip::at_minor_3_every_pair_with_ip_op_is_unsupported,the_cli_refuses_pair_with_ip_at_minor_3andhello_lists_pair_with_ip_only_at_minor_4, plus iodirect_minor: a host lowered to minor 3 closes a peer that sends a Pair with IP message anyway, for a protocol error.Tests and controls
app_pair_ip::hello_lists_pair_with_ip_only_at_minor_4. Both features are listed at minor 4, and neither by a helper lowered to minor 3.direct-features-ungatedinpair-with-ip.helper: the features are listed whatever minor the helper speaks.app_pair_ip::a_typed_name_pairs_and_keeps_the_address_it_reachedand the io name tests now run at the real minor.Review fixes (early review of 1ac9dc7)
protocol_error, before dispatch, when aJOIN_DIRECTor anAUTHORIZEDwith keys 2 or 3 arrives on a connection that agreed minor 3, as the Rust driver does. New testpairing-e2e.json / second implementation only: an extended AUTHORIZED at minor 3 closes the connection: a ticket joiner agrees minor 3 with a scripted host, then receives the extendedAUTHORIZED. It fails when the check is removed.wire.mdnow says the minor-4 side refuses a minor-2 peer atHELLOwhichever side dialled. A minor-2 build itself would agree minor 2.direct-features-ungated, and alsodirect-host-name-localhostfrom Pair with IP: the host shows its computer name next to its address #60, which was missing too.DIRECT_MINOR_VERSIONimport inconn.rs. Not taken: reworkingdirect_minor.rsto script the caller's minor. It keeps its current, working form.Checks run (Windows x64)
The full gate ran on
1ac9dc7. The review fixes (4c1552e) touch only the second implementation, docs and twocfgguard lists, so the steps they affect ran again on4c1552e.1ac9dc7:cargo fmt --check,cargo clippy --workspace --all-targets --all-features -D warnings, the core wasm32 check, and second-implnpm run check/npm testall pass.cargo test --workspace: every test passes exceptgrant_connected::a_connection_closed_meanwhile_grants_nothing, once, under load. It passed 5 of 5 runs alone, andpairing-rolesruns it again below, where it passes.checks/*.toml, with its controls: every check Windows can run passes, and every control in it fails as required:phase0,phase1a,phase1b,phase3,phase4,pairing-flow,pairing-relay-completion,pairing-revokeandpairing-roles. The exceptions:phase1b.sshcontrolpipe-outlives-helperdoes not make its test fail: the known mousse-net#22. It is the same onmain.phase4.helper-plushad 2 of 34 tests fail under load. All 34 passed in two runs alone.phase3.reproducibleandphase3.install(Linux only),app-session.phone-caller(phone to desktop), and the checks that need signed results from real devices or from macOS and Linux.4c1552e:npm run check/npm testandphase0.second-implementationpass, and its control fails as required.pair-with-ipphase passes, with every control failing as required:host-io: 26 tests, 9 controlshelper: 27 tests, 21 controls, including the newdirect-features-ungatedjoiner-io: 33 tests, 13 controlssim: 1000 seeds, 6 planted bugshelper-units: 124 tests, 6 controlscargo test -p mousse-net-io --test loopback: 20 of 20, three times.main(docs(app-session): a thread send may carry files where the host advertises threadFiles #61, fix(relay): a dropped interactive write no longer holds bulk writes back #62, fix(ci): simplify the helper reconnect due check #63), which touch the relay's egress, the app-session spec and vectors, and one line in the helper'spaths.rs. On it,cargo fmt --checkand workspace clippy with-D warningsare clean, andcargo test -p mousse-relay,-p mousse-helper --test app_pair_ipand-p mousse-helper --bin mousse-helperpass.