Skip to content

fix(protocol): hold back the application membership exchange - #696

Merged
bahdotsh merged 1 commit into
mainfrom
fix/hold-back-membership-exchange
Nov 4, 2026
Merged

bahdotsh merged 1 commit into
mainfrom
fix/hold-back-membership-exchange

Conversation

@bahdotsh

@bahdotsh bahdotsh commented Nov 4, 2026

Copy link
Copy Markdown
Member

Why

#685 made every node send a __MEMBER__ hello to every neighbour it discovers, every five minutes. No released build reserves that prefix. A v0.31.0 receiver:

  • rejects the frame as plaintext and emits a SecurityWarning to its app under the default policy (requireEncryption: true);
  • shows it to the user as a text message reading __MEMBER__… when requireEncryption is off.

Apps in the field ship v0.31.0 and earlier, so the next release cannot carry this. Nothing reads visibility yet and no binding exposes it, so reverting loses nothing shippable.

What

  • Reverted (engine half of feat(protocol): every node runs the application membership exchange #685): the exchange module and its tests, the discovery hook, ProtocolConfig.app_publisher_key, set_app_membership, the FFI test helper, and hkdf/hmac back to optional behind file-store.
  • Kept (feat(sealed): the application membership layouts, and reserve __MEMBER__ #684 and its review fixes): __MEMBER__ stays reserved and is consumed on receipt. The sealed layouts, the vectors, the offline-app-member-e2e-key-v1 label and the spec text stay.
  • ADR 0037 stays Proposed, now marked parked, with the review's reasons and four conditions for picking it up again.
  • Spec: a sender MUST know the neighbour reserves __MEMBER__, from a key-package capability, before sending it.
  • Test: discovering_a_neighbour_sends_no_membership_frame fails if discovery puts a membership frame on the air. Negative-controlled by injecting one.

Stack

PRs #687 to #695 are built on the reverted code and are parked with the ADR.

Verified locally

  • cargo clippy --workspace -- -D warnings and --no-default-features on offline-protocol
  • cargo test --workspace --lib --no-fail-fast: engine 2173, FFI 317 and sealed 102 tests pass. The one failure is no_shipped_file_names_a_relay, which reads stale .claude/worktrees on this machine only.
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps, cargo fmt --all -- --check

Reverts the engine half of #685. Every node sent a __MEMBER__ hello to
every neighbour it discovered, and no released build reserves that
prefix. A v0.31.0 receiver rejects the frame as plaintext and raises a
security warning to its application under the default encryption
policy, and shows it to its user as a text message when
require_encryption is off. Applications in the field ship such builds,
so the next release could not go out with it.

ADR 0037 is parked rather than reworked: the recognition key ships in
every copy of an application, the exchange fails closed and silently
offline, and it costs a signature and a seal per neighbour, for a
property no customer has asked for yet. The ADR now says so, and lists
what changes first if it is picked up again.

Kept from #684 and its review: __MEMBER__ stays reserved and is still
consumed on receipt, and the sealed layouts, vectors, the e2e key label
and the spec text stay. The spec now requires a sender to know the
neighbour reserves the prefix before sending it.

A new test fails if discovery puts a membership frame on the air,
negative-controlled by injecting one.
@bahdotsh
bahdotsh merged commit 8e39708 into main Nov 4, 2026
45 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant