Skip to content

feat(fabric): add the leader step header as fabric/step - #3441

Draft
laudney wants to merge 5 commits into
ashhart:mainfrom
laudney:tp-t2-step-pr
Draft

laudney wants to merge 5 commits into
ashhart:mainfrom
laudney:tp-t2-step-pr

Conversation

@laudney

@laudney laudney commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

T2 step 1 of #2560: fabric/step, one leader step header that the pipeline ring and each tensor group's leader can share, as agreed with @jschmied on #2560 (draft, review reply). It lands alone first, as agreed: nothing calls it yet, so no served path changes. The ring adopts it in steps 2 to 5 (jschmied's PR, after #2579 and #2785); the TP families adopt it in T6.

main this PR
Step wire the ring's own (fabric/stage); each TP family's leader its own one 64-byte header (TFSH, version 1) and 9 optional sections, for any of them
Step kinds n/a round (window or prompt rows), state, idle, stop, family
Sections n/a streams 1, tokens 2, cuts 3, sampling 4, pages 5, copies 6, snapshots 7, compact rows 8, family 15
Golden fixtures the ring's 44 more: 11 taken, 33 refused, each by its own error name
Served tokens and speed reference unchanged: no caller yet

What this changes

Checks on this head

  • Head commit: 7dbf5817f on main 5c82ef28a.
  • Lean checker, on main and on this head: 341 and 341, 0 new.
  • Tests: zig build test test-golden test-fabric-step test-fabric-step-compile pass; zig fmt --check build.zig zig and git diff --check pass. 14 tests in the module: every header field round-trips at its offset; each refusal by name; every good fixture truncated at every length and each byte flipped three ways is taken or refused, never a panic; maximum counts refuse without overflow; the golden bytes equal what the writer writes. Planted control: with decode's BadSnapshot check removed, bad_snapshot.bin fails the fixture test.
  • CI: pending.
  • Not run: no device test applies (std only, no backend). Windows: not run.

Receipt

n/a: nothing calls fabric/step yet, so it cannot reach inference; the served bytes are main's. Platforms: host tests on x86_64 Linux; aarch64 Linux and macOS compile only.

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.
  • 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.

@laudney

laudney commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

@ashhart T2 step 1 of #2560 is up as a draft: fabric/step alone, head 7dbf5817f on main 5c82ef28a, one commit, no caller yet, so no served path changes. It shares no file with #2917 or #2919. Lean 341 on main and 341 on the head, 0 new; zig build test test-golden test-fabric-step test-fabric-step-compile pass. Preferred: it stays a draft until the T1 train lands, then I rebase it and mark it ready (your order: T1's launch flags, then fabric/step alone). Alternative: mark it ready now, since it touches nothing T1 changes.

@ashhart

ashhart commented Nov 16, 2026

Copy link
Copy Markdown
Owner

@laudney, the standalone header and 44 fixtures fit main cleanly, and there is no inference caller yet.

We will handle the portable fixture writer, central environment read, two long inline comments and numbered changelog entry, then check Linux and Windows CI. The unguarded POSIX writer is a concrete portability issue; the failing CI log is still needed to confirm the complete failure. We will keep the T1 landing order as agreed.

  • Synthena

@laudney

laudney commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

@ashhart thanks, the branch is yours; I will not push to tp-t2-step-pr. The complete zig-windows failure on 7dbf5817f (job) is the one compile error you named, nothing else:

Item Log
Error lib\std\c.zig:11069:45: error: parameter of type 'void' not allowed in function with calling convention 'x86_64_win'
Reached from test.step fixtures: every message's golden bytes are what the writer writes today, zig\src\fabric\step\fixtures_test.zig:23:20 (the TF_STEP_FIXTURES_OUT writer through std.c)
Build summary 668/672 steps succeeded (1 failed); 263/288 tests passed (25 skipped)

Linux and macOS checks pass on this head.

@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Hi @laudney, thank you — the full zig-windows log is exactly what we needed. It confirms the failure is only the std.c fixture writer on Windows (one compile error, everything else green), and that resolves our ask. We appreciate you handing the branch over.

The head is unchanged, so the cleanups we said we would take on are still in front of us: making the fixture writer portable and moving the TF_STEP_FIXTURES_OUT read to one place (both in zig/src/fabric/step/fixtures_test.zig), trimming the long inline comments, and adding the numbered changelog entry. We will finish those and get Windows CI green before landing, and we will keep the agreed T1 landing order. There is nothing further we need from you on this branch.

  • Synthena

laudney and others added 5 commits November 20, 2026 05:42
Every TP family and the pipeline ring speak their own step protocol
today, so T2 of ashhart#2560 gives them one 64-byte header with optional
sections. This adds it as a std-only module with no user yet: the
header and section layouts, a writer with checked sizes, a decoder
that bounds every count before it reads and refuses by name, golden
fixtures in the ring's form, and test-fabric-step with aarch64
compile checks. The ring adopts it in a later step, the families in
T6.

This branch has not been deployed

No deployments
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.

2 participants