Skip to content

Two runtimes of one repository link only through a signed, replay-protected handshake that checks protocol, repository identity and trust, and every refusal is typed and visible

Being heard on the network is not being linked. A runtime that wants to cooperate

declared statusdeclared status: guaranteed Declared deterministic and blocking, implemented, and naming the behavioural test that is to prove it. Whether a recorded run supports it is the evidence verdict, shown beside it.

recorded evidencerecorded evidence: not run Declared guaranteed, and not supported by a recorded run: the test is named, and no passing run of the current inputs is recorded. how evidence is recorded

Separate server processes link over TCP and their refusals of malformed, forged, future-protocol, other-repository and untrusted hellos are read back over HTTP; the unit tests of mesh::cooperation cover replay of a hello and of a sync counter, and the self link. No TLS — authenticity is the protocol's, confidentiality the network's (ADR 0067).

What it means

Being heard on the network is not being linked. A runtime that wants to cooperate presents a signed hello — its key, runtime, instance, repository identity, version, features, a fresh nonce and the link protocol range it speaks — and the answering runtime links it only if the signature verifies, the timestamp is fresh, the nonce has not been used, the protocol ranges meet, the peer is not itself, the repository identity is its own, and the key is trusted by the declared policy. The dialer applies the same checks to the signed welcome it gets back. Anything else is a refusal with a code (malformed, oversized, signature, stale, replay, protocol_unsupported, self_link, repository_mismatch, untrusted, capacity, and for a sync round not_active or unknown_link), counted, and listed on mesh.cooperation with its detail — never a silent dropped socket.

How it works

The handshake and every later sync round are Signed messages: canonical JSON under a per-message signing domain, so a signature over a hello can never be replayed as a sync. apps/majordomus-cli/src/mesh/link.rs defines the messages and the refusal codes; apps/majordomus-cli/src/mesh/cooperation.rs (accept_hello, dial, accept_sync, sync_with) is the one admission path, served as POST /api/v1/mesh/link/hello and /api/v1/mesh/link/sync by the mesh capability module. After the handshake, each sync round carries the link id and a rising counter, so a replayed round is refused too, and a restarted peer is told to say hello again.

How to see it

majordomus mesh peers                     # linked runtimes and each link's state
curl http://127.0.0.1:8741/api/v1/mesh/cooperation | jq '.peers, .refused'
cargo test --manifest-path apps/majordomus-cli/Cargo.toml --test mesh_cooperation

two_runtimes_link_and_share_sessions_claims_reviews_and_a_handover links two separate server processes over TCP; malformed_forged_and_future_link_messages_are_typed_refusals_over_http posts garbage, a forged card and a future protocol range and reads each refusal back.

What it does not cover

It does not encrypt: the executable has no TLS, so links belong on a private network or an overlay (a tailnet, WireGuard) that provides confidentiality. It authenticates keys, not people: whoever holds an allowed node key is that node.

Why it exists

Discovery tells a runtime that a key exists somewhere. Cooperation lets that key's claims exclude your work and its handovers land in your checkout, so admission has to prove more: that the key is answering now, serves your repository, speaks your protocol, and is one you trust.

Detail rendered from docs/claims/mesh-cooperation-links.md.

From the statement to the proof

  1. 1 · the public statement

    Two runtimes of one repository link only through a signed, replay-protected handshake that checks protocol, repository identity and trust, and every refusal is typed and visible

    Made on Mesh.

  2. 2 · the canonical claim

    mesh-cooperation-linksdeclared status: guaranteed in docs/CLAIMS.yaml

    Defined in .ai/repo/rules/project/mesh-cooperation-is-authenticated.v1.md

  3. 3 · the implementation

    apps/majordomus-cli/src/mesh/cooperation.rs

  4. 4 · the test and the scenarios

    Test: apps/majordomus-cli/tests/mesh_cooperation.rs

  5. 5 · the recorded runs

    recorded evidence: not run how evidence is recorded

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh apps/majordomus-cli/tests/mesh_cooperation.rs

Related claims same implementation

Searches the titles and descriptions of every page this site publishes.