Harness overhaul, phase A: correctness fixes, green CI, lean docs, evidence archive #68
No reviewers
Labels
No labels
human-approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitpartner/tt-stack!68
Loading…
Reference in a new issue
No description provided.
Delete branch "harness-overhaul"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase A of the harness overhaul. Owner directive (2026-09-25): targets are 1 and 2 cards, and nothing is "cannot" unless it is proven on hardware. This PR changes the repo only. It does not touch cfx-llm2,
tenstorrent-serving.serviceor the cards; deploying is the owner's decision. Do not merge without review.Commits
7e942d0987e88d93c9f73e7bfc6d1aaaee7INDEX.tsv, and a CI check that cited records exist.347a3cbA1 detail:
60053f1f; the old pin was a localgit+fileURL.nix/sim. The Nix ttnn is cp314 and cannot reach the cp310 image, and nixos-llm consumes only the modules. The ttnn store path is unchanged.--inputs-from ..File counts,
682dd38→ HEAD:round2-logsmove plus INDEX/MOVED)A0: how the fixes were verified
Patch 0019.
583d1c1against89f75cefirst. The89f75cerewrite ofprefill_forwarddropped_slots_prefilled_since_decode.patch -p1.modules/tenstorrent-serving.nixnow fails the readiness probe ifQWEN36_PREFILLED_SLOTS_FIX engagedis missing whileprefilledSlotsFixis on. This is a minimal hunk; the option names are unchanged.The attention mount.
scripts/vllm-tt-serve.shprod profiles now mount exactly the unit's seven files, includingattention-tp.py → attention/tp.py. Before this, SDPA streaming was silently off for every launcher-booted arm. I dry-ran it with a fakesudo, which confirmed:Banner check. The new
scripts/verify-arm-banners.shfails closed on any missing<FLAG> engagedbanner. With a fake docker, a passing server returns rc 0 and a server missing the 0019 banner returns rc 3 (the check also stops it).Sweep baseline.
bench/ab/sweep-32k.shbaseline is now theprod-argmaxprofile, which is the unit's env and file set. The candidate is baseline +CAND_ENV. The sweep refuses to run while the service is active, and it never usesdocker rm -f.No hardware run was done. The re-applied tree has no new speed number.
Deletions and why
vllm-tt,-overlay,-k34m,-k5,-k5rfand their verifiers: these are the K3-K5/M levers, and op-count reduction was measured worthless for TP=2 traced decode.tt-metal/0001,0002,0009,0010,0013: they apply to nothing (not HEAD, not the pin, not the prod mount).pr53587diff andtt-inference-server/0001, since upstream has P300 natively.vllm-tt-plugin/0002-0006,patches/vllm,prefix-tests: prefix caching shipped the vLLM-native way.0012,0014-0018,0020and plugin0001.patches/README.mdmaps each patch to the file that absorbed it.0021-0023stay until mtp-thinkingcap and thinkingcap-baseline rebase.generated/,bench/wip,bench/matrix,lever*-ab.sh,prefill-sweep.sh,mem-*.sh,m4-tp2-generate.sh,run_tp_contract.py, rootBLACKHOLE_GUIDE.md;autoresearch.shwith its measure script and test. The old ledger itself called the DSpark autoresearch loop off-objective.advisory/andn3/. Everything still true is folded into the 11 new docs. Recover any of them withgit show 682dd38:docs/<name>.docs/advisory/round2-logs→bench/runs/archive/round2-logs-20260912;bench/fixures→bench/fixtures/dspark;bench/archive/;bench/runs/archive/(seeMOVED.tsv)..jsonlfiles were deleted.scripts/check-cited-records.py(new CI step) passes. The keep set also includes records cited by ACTIVE branches and by the #53/#55 campaign files.Reopened closures
The rule: a closure needs an on-hardware record at its stated scope.
docs/LEDGER.mdnow holds the Closed-claims table (class, scope, record, reopen condition) and a Reopened list. Each item below has a Forgejo comment:Also corrected: "one tt-metal process per host" is now one per card (
two-card-coexistence-20260925T0625Z), and card locks and slots live only in thett-card-slotskill.Branches and PRs
archive/<name>and then deleted. Each was re-verified first: 27 are ancestors of master, and 4 squash-merged branches differ from master in 0 files.decode-campaign-53-55(based onc76460b). The files are byte-identical and the worktree was not touched.Migration notes for the active branches
git rebase --onto origin/master <last duplicate>.patches/tt-metal/0021-0023and the retired docs come back as modify/delete conflicts.docs/LEDGER.mdasD-2026-09-24-thinkingcap.nix develop ./nix/sim#runtime.nodes.tt-metal.locked.revstill exists; it is now60053f1f.vllm-tt-serve.sh prod-argmaxwith their ownattention-tp.pyvia EXTRA_ENV: the overlay is honoured, butVERIFY=1(the default) now blocks until the server is ready and refuses a missing banner. PassVERIFY=0and callverify-arm-banners.shyourself.modules/tenstorrent-serving.nix: CI excludes it from nixfmt for now. Run nixfmt once in Phase B, after issue-45/49/50/64 land.UPSTREAM-WATCH-PLUGIN-METAL.md. Fold its plugin-pin audit intodocs/BUILD.md.docs/LIFT-AUDIT-TT-METAL-56119.md. Fold that intodocs/BUILD.mdorREFERENCES.md, not a new doc.perf-issue-advisorreferencesdocs/advisory/round2-logs, which is nowbench/runs/archive/round2-logs-20260912.Left for Phase B/C
Phase B:
bench/ab/*,modules/tenstorrent-serving.nix,patches/prod-local-metal, andpatches/k|tt-metal.PROD-SERVING-SOURCES.mdafter issue-64.Phase C:
ttxarm specs and per-card slots.Owner decisions needed
f4c3cda(09-15).enablePrefixCachingblock-size/pool setup has no record of its own.🤖 Generated with Claude Code
verdict: approve
tier: T1 (CI/lock hygiene; small ttnn patch correctness fix). Note: PR body is still the "work in progress" placeholder ("full body filled in when phase A is complete") and says "Do not merge" — I approve the direction of this phase-A chunk, not a merge yet.
rationale: This is a clean WIP cleanup. It fixes a real correctness gap in tt-metal's ttnn qwen36 prefill (records prefilled slots for the decode reset — previously never written on the Qwen path), removes dead local-only
git+fileinputs that broke CI/nix flake check/nixos-llm locks, and adds a fail-closed arm identity check for the A/B serving sweep. Verified: no livegit+filerefs remain in the tree (only a comment mentions the old path);nix/simstill imports../ttnn.nixand../sfpi.nix, which still exist;tests/tenstorrent-host.nixpresent. CIhas_actions: true, so the label IS an enforcement gate.concerns:
ttsimcorrectness harness is now built only from the host-local sub-flakenix/sim(nix develop ./nix/sim#runtimeon the orchestra host). It is deliberately kept out of the root flake, so CI/nix flake check/nixos-llm lock never evaluate it — that's correct and keeps the localtt-metal-fullrev off the public lock. Confirm the orchestra host actually hasdevelop ./nix/sim#runtimebuilding green; if it silently doesn't, the ttsim correctness harness is gone from every path except a hand-run on one box.flake.locknow pinstt-metalat60053f1f(upstream public main), whereas the pre-PRtt-metal/tt-metal-fullpointed at a localtrymergemerge of main + PR #55548 (MTP spec decode). The diff argues the simulators are byte-identical for this (SoC descriptors unchanged) and production never consumed the local merge. If any ttsim number depended on PR #55548's changes, that would be a regression — worth one confirming line in the phase-A body.Compare pinned revsloop is nowttsim tt-metalonly; thett-inference-server/vllm-tt-plugin/tt-langcomparisons were dropped. Fine since those inputs were removed, but document it so a futurenix flake updatedoesn't resurrect a comparison against a now-dead input..forgejo/workflows/ci.ymlexcludesmodules/tenstorrent-serving.nixfrom nixfmt until a later branch lands — fine, but that exception comment (agy/issue-45/49/50/64) should reference a real tracking issue if one exists.No secret-leak / vuln / red-flag matches. The serving script changes are fail-closed by design (refuse to record a mis-armed server), which is the correct pattern.
Before: the ledger was the authority for "closed by measurement, do not re-propose", but the audit found that 22 of 34 closures were estimates, code-reads, third-party numbers, or no longer true. Some examples: - MTP was "dropped, never measured" and is now x1.4-1.6 at B=1. - "bf4 MLP retired" contradicted both the owner's 09-15 "keep BF4" and the G2 accuracy result. - The "one process per host" rule fails for single-card processes. - "Prefix caching not deployable" was written before it landed on 09-18. About 20 docs still told agents to pass --no-enable-prefix-caching. CLAUDE.md was cited in more than 20 places after it was deleted. DOC-STATUS existed only to list which of the other 100 docs were stale. After: - docs/LEDGER.md: dated directive and result IDs. - It adds the 09-15..09-25 entries: keep-BF4, the RAM ruling, prefix caching, SDPA streaming, argmax on the prefix arm, phase2a with honest numbers, ThinkingCap and MTP, the two-card coexistence, GPTQ G2, and the 0019 regression. - A Closed-claims table gives each closure its class, scope and record. - An explicit Reopened list covers every (b)/(d) item. - The DSpark block is dropped, and the missing 134735Z citation is fixed to 134045Z. - docs/STATUS.md: per-TP, per-B scoreboard (PP, TG, TTFT, makespan), each cell with its record. - It says what nixos-llm master actually pins:f4c3cda, 09-15, with prefix caching off. - The prefix-arm table is labelled as an arm, not as production. - GOALS, DEV-LOOP, BUILD, HARDWARE, SERVING, PREFILL, MTP, QUANT and REFERENCES fold in everything still true from the retired docs. specs/p150x1 is new. - AGENTS.md is rewritten at 155 lines. - It covers the 1-card and 2-card targets and the "prove it or it's open" rule. - It keeps the hard safety rules. - It keeps only the traps with records: k_chunk_size=32, LoFi+fp32_dest_acc, batch width. - The card rule is now one process per card, with the record cited. - Card locks and slots live only in the tt-card-slot skill. - autoresearch.sh, its measure script and its test are removed. - They printed docs/DSPARK-NEXT.md for a DSpark autoresearch loop that the old ledger itself recorded as off-objective. - Code comments that pointed at retired docs now point at their successor, as "docs/NEW.md (was OLD.md)", in the non-frozen files. Frozen paths are untouched until their branches land: bench/ab, bench/probes, modules/tenstorrent-serving.nix, patches/. Every retired doc can be recovered with `git show 682dd38:docs/<name>`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>Before: 373 files sat flat in bench/runs, and nothing enforced "never lose evidence". The rewritten docs and branch drafts both cited records that did not exist: - the old ledger's target-shape-ttft-B4-256k-20260914T134735Z (the real file is 134045Z); - prefill-audit-ab-down-minimal-20260912T110412Z. About half of the records were no longer cited by anything. After: - scripts/check-cited-records.py (new, runs in CI) fails if a bench/runs path or a timestamped record stem cited in AGENTS.md, README.md, docs/, specs/, bench/README.md, patches/README.md or .claude/skills is missing. - `<branch>:bench/runs/...` and `[branch]` citations are skipped; they land with their branch. - A bare `bench/runs/*.jsonl` is treated as the naming convention, not as a citation. - A record stays live if any of these cite it: - any master file outside bench/runs (docs, scripts, skills, code); - any file an ACTIVE branch adds or changes; - the coordinator's uncommitted #53/#55 decode-campaign files; - a kept record (one hop of evidence chains). Paired .log, .table.txt and similar siblings stay beside their jsonl. That leaves 183 records live. - Moved 161 uncited records to bench/runs/archive/<YYYY-MM>/ and 21 boot-fail logs (zero-byte or orphaned) to archive/failed/. The failed logs are kept as negative evidence. - Deleted 8 zero-byte, uncited .jsonl files, which hold no bytes. - bench/runs/archive/MOVED.tsv maps every old path to its new path, so older commits and docs that cite an archived record can still find it. - bench/runs/INDEX.tsv (`--index`) lists every record: live or archived, size, first-line kind, and which master files cite it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>agent-gateway closeout (merged): cleared
agent:*labels.Hermes kanban card (if any) is left for Hermes to archive/complete.