Skip to content

cluster: a node takes only the nodes its file names and believes a node only about itself - #3039

Merged
ashhart merged 3 commits into
mainfrom
security/cluster-roster
Nov 13, 2026
Merged

ashhart merged 3 commits into
mainfrom
security/cluster-roster

Conversation

@ashhart

@ashhart ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner

What this changes

Before: a host at the far end of one cluster link could add members, name the leader, say another node's goodbye and replace its plan, and a dead claim at the highest incarnation overflowed in the node it named. After: on a real host a node holds a roster from the cluster file, counts a message only from the node the file puts on that link, and takes a node's word only about itself. Incarnation and epoch arithmetic saturates.

  • Issue: n/a. SECURITY.md asks for private reports, so there is no public issue.
  • Stacked on: main.
  • atc overlap --json: not run.

Checks on this head

  • Head commit: c2c3b82938fcae63c6b254226506d8e4ead0eed9
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 345 on the base, 345 on this head, 0 new.
  • Tests run, with the command and pass, fail and skip counts:
    • zig fmt --check on 7 files: passes
    • git diff --check: passes
    • zig build test-cluster-membership-host test-pull-host: 9/9 steps succeeded; 67/68 tests passed (1 skipped)
    • zig build native: 66/66 steps succeeded
    • zig build test-golden test-server-security test-pull-security: 76/76 steps succeeded; 31/31 tests passed
  • New tests:
    • security: a member's lies add no node, make no leader and end no other member's run
    • security: a closed cluster takes no member, leader, goodbye, death or plan on another node's word
    • security: a node the roster puts elsewhere is refused by name and never joins
    • security: a hello or an inventory speaks only for its sender
    • security: a peer's incarnation or epoch at the top of its range overflows nothing
  • CI: runs on this push.
  • Not run, and why: Not run on MCDMA links. zig build test-cluster also runs Metal tests, so the new test-cluster-membership-host step ran instead. zig build test and every step that runs on a GPU were not run: this Mac's GPU was serving a model, and no CUDA, ROCm or Intel hardware was available.

Receipt

n/a. This change cannot reach inference: it is cluster membership and bring-up, before any model is served.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. Main with only this branch's tests added, zig build test-cluster-membership-host: exit 1. It does not compile: the new tests set Membership.roster, which the fix adds, so this base shows no failure on behavior. On the earlier base b38a4dd02 the tests failed with the fix taken out.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

Notes for the reviewer

  • Operators: two nodes whose own link fails now lose each other within the dead time of 3 seconds. Before, news through a third node kept them in each other's view. That is a behavior change worth a decision before merge.
  • The links carry no key. A node of the file is trusted about itself.
  • The wire format is unchanged, so old and new builds work together.
  • test-cluster-membership-host is a new host step and is in no nightly list yet.

Suggested changelog line

Cluster: a node on a real host takes only the nodes its cluster file names, each on its own link, and believes a node only about itself.

@ashhart

ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner Author

Review: ready, with one fix pushed (3eb17c4).

test-cluster-membership-host wasn't in any CI or nightly list, so none of the five new tests ran. It is now in the Linux and macOS fast host lists in zig/build/host_ci.zig, and it passes here: 37 of 38 tests pass, 1 skipped.

Legitimate cluster files still work. The roster matches every valid full-mesh file of up to 16 ranks, and a wrong peer is refused by name. The one behaviour change is intended: a closed cluster drops relays and news about third nodes, so two nodes whose own link fails lose each other within about 3 s.

  • Synthena (Ash's Agent)

…de only about itself

A host at the far end of a link could add members, choose the leader, say another node's goodbye and
replace its plan. On a real host a node now holds a roster from the cluster file, counts a message only
from the node the file puts on that link, and takes a node's word only about itself. Incarnation and
epoch arithmetic saturates.
… lists

test-cluster-membership-host was in no CI list, so its new tests never ran.
@ashhart
ashhart force-pushed the security/cluster-roster branch from 3eb17c4 to 1114afe Compare November 13, 2026 00:05
@ashhart
ashhart merged commit 7a2c3b5 into main Nov 13, 2026
2 of 10 checks passed
@ashhart
ashhart deleted the security/cluster-roster branch November 13, 2026 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant