Skip to content

Report the agreed cluster view when bring-up completes - #4135

Merged
ashhart merged 4 commits into
ashhart:mainfrom
AIflow-Labs:codex/4123-cluster-agreed-view
Nov 21, 2026
Merged

ashhart merged 4 commits into
ashhart:mainfrom
AIflow-Labs:codex/4123-cluster-agreed-view

Conversation

@AIFlowML

Copy link
Copy Markdown
Contributor

What this changes

A rank could finish agreeing on the full cluster, process a peer's goodbye, and report the smaller live view. Bring-up now returns the agreed leader, epoch, and view digest, and checks that peer acknowledgments match that view. The regression test checks that the report stays stable even after the live membership shrinks.

Checks on this head

  • Head commit: 43be154f145d6d908e9859328c20ea71dd011aff.
  • Lean checker, python3 tools/zig/lean_check.py: 168 inherited findings on both base and head, zero new. zig fmt --check build.zig zig and git diff --check passed.
  • Tests run:
    • Apple M5 Max: zig build test-cluster-membership-host -Dcpu=apple_m1 -j4 --summary all passed all five steps. On the changed test executable, 37 passed and one skipped. Repeating that executable reproduced the reported digest mismatch in 4 of 32 base runs and 0 of 64 head runs.
    • Linux x86-64: zig build test-cluster-membership-host -Dfixed-cpu -j4 --summary all passed all five steps on both base and head (47 passed, one skipped each). In 96 additional runs per commit, the target mismatch fell from 4 to 0. The separate existing watch-duration assertion failed four times on base and twice on head. It compares time spent in watch() with a timeout measured from the last heartbeat, which can arrive before watch() starts.
    • Apple M5 Max: zig build test test-golden -Dcpu=apple_m1 -j8 --summary all reported 15,089 passing tests and 134 skips. test-golden passed. The combined command exited 1 because the Qwen3.5 CUDA training host test could not import the living module. The same compilation error reproduced on the base with zig build test-cuda-host -Dcpu=apple_m1 -j6 --summary all. The full-suite and stress receipts above used base 727153cb33876173efb256d60a12e69413cf1248 and head 1c55a7f780f5a2e33f0277c6507d015072905abd. The final rebase kept the cluster code and its regression identical. zig build test-cluster-membership-host test-golden -Dcpu=apple_m1 -j6 --summary all passed all 10 steps on the final head, with 47 tests passed and one skipped.
  • CI: Upstream checks start when the PR opens.
  • Not run: Live multi-host MCDMA, Windows, or hardware kernel tests. The regression uses loopback TCP on macOS and Linux and changes cluster membership reporting only.

Receipt

  • Main against branch: The real-clock runs above compare the base and head on each machine.
  • Boxes it reaches: Cluster ranks running the native bring-up control plane.
  • New switch? n/a.
  • Environment: Zig 0.17.0 on Apple M5 Max/macOS and x86-64 Linux. Base and head SHAs above. No model checkpoint or GPU backend is used by the focused test.
  • Paths and platforms: Tested loopback transport on macOS arm64 and Linux x86-64. Live MCDMA and Windows were outside these runs.
  • Exactness: n/a. This change cannot reach token processing.
  • Main against this branch, same machine and checkpoint: n/a for inference. Same-machine control-plane results are listed above.
  • Decode speed: n/a. This change cannot reach decode.
  • Prompt speed: n/a. This change cannot reach prompt processing.
  • Licence of any new weights or drafter: n/a.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • The regression fails on base for the reported interleaving and passes on head.
  • 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.

Igor Lessio - AIFLOW LABS

@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Thanks @AIFlowML, and thanks for the reproduction on #4123. This is the right fix, and it is more complete than the one we had prepared in #4139: besides reporting the leader, epoch and view digest recorded at the planned point, allPlanned now counts only acknowledgments for that agreed view and epoch, and the test shows the report stays stable after the live membership shrinks. Nothing to change. We are closing #4139 in favour of this one, and it goes on a landing train once its checks finish.

  • Synthena

@AIFlowML

AIFlowML commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

The older Zig, Zig-B and Zig-Windows jobs failed at the missing living import in the Qwen ModelOpt admission test. Main now has f3b4fa5dd, which wires that import. I trial-merged this head 43be154f into 46c6ee22 cleanly, then ran zig build test-cluster-membership-host test-cuda-host -Dcpu=apple_m1 -Doptimize=ReleaseSafe -j4 --summary all on M5 Max with Zig 0.17.0. All 447 steps succeeded, with 7,813 passed and 49 skipped.

The trial merge is also clean against newer main 523d58cb. The difference between the two trial trees is #4260's Python benchmark fixtures and changelog, so the Zig sources tested above are identical. The public head still needs the landing-train CI rerun for Linux and Windows.

The combined #4293 train 71bbb39b5 passed on M5 Max in a trial against f0cc0a134 with main’s changelog. zig build test-cluster-membership-host -Dcpu=apple_m1 -Doptimize=ReleaseSafe -j4 --summary all passed 47 tests with one skip, including the agreed-view assertion on main’s lockstep clock. The separate test-cuda-host target with the same flags passed 7,814 tests with 49 skips and all 442 steps. The trial against dcd52713e still has only the changelog conflict, with the tested cluster files unchanged.

Igor Lessio - AIFLOW LABS

@ashhart
ashhart force-pushed the codex/4123-cluster-agreed-view branch from 43be154 to 2a4d387 Compare November 21, 2026 05:52
@ashhart
ashhart merged commit 843285b into ashhart:main Nov 21, 2026
1 of 10 checks passed
ashhart added a commit that referenced this pull request Nov 21, 2026
@ashhart

ashhart commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Thank you @AIFlowML. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

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.

cluster bring-up: two ranks on the real clock can report different views (bringup_test.zig:97 fails on hosted runners)

2 participants