Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
25f802b
wip(cact): loader events/errors/context
Aug 30, 2026
9355f62
wip(cact): loader detail/guards/actions/sm/any
Aug 30, 2026
dc38aef
wip(cact): register loader sm alias and test source
Aug 30, 2026
4f22bb3
wip(cact): parity fixture generator + generated CSV
Aug 30, 2026
c5ac71a
feat(cact): loader state/guard/effect prefixes, shard wiring, tests, …
Aug 30, 2026
f5aa58d
fix(tests): mark aarch64-only q4 seeding helper maybe_unused for x86 …
Aug 30, 2026
25317d6
fix(tests): mark aarch64-only kernel test helpers maybe_unused for x8…
Aug 30, 2026
2c247cc
chore(cact): benchmark scaffold marker on loader sm
Aug 30, 2026
18a6e94
fix(model): elaborate topology member type for gcc-14 -Wchanges-meaning
Aug 30, 2026
89fd9b0
style: clang-format cact loader, tests, and drifted baseline files
Aug 30, 2026
a6cac6e
feat(needle): positional-to-named model binding and tokenizer blob lo…
Aug 30, 2026
7ac5972
style: clang-format needle binding and tokenizer sources
Aug 30, 2026
7a8ecda
chore(needle): benchmark scaffold markers on binder and tokenizer loa…
Aug 30, 2026
65354cf
chore(gates): refresh quality_gates timing after scoped needle run
Aug 30, 2026
158a313
feat(kernel): add native CQ2 CQ3 CQ4 GEMV kernels
Aug 30, 2026
18e1c83
fix(kernel): make CQ routes explicit in SML guards
Aug 30, 2026
59044b9
fix(kernel): avoid runtime cpu probe in CQ route guard
Aug 30, 2026
38ccef1
feat(cact): JAX logits parity fixture generator + committed 3-case fi…
Aug 30, 2026
5db8684
feat(kernel): needle stage kernels — zcrms, rope, swa, hadamard, engr…
Aug 30, 2026
0e10661
feat(needle): native graph machine with JAX logits parity
Aug 30, 2026
71a357b
fix(kernel): compile-time gate aarch64 f32 GEMV route; recognized ben…
Aug 30, 2026
9b299fc
style: clang-format cq kernel sources and tests
Aug 30, 2026
aafe017
chore(gates): refresh quality_gates timing after scoped needle graph run
Aug 30, 2026
bac6abf
docs: generated machine docs for needle graph and stage kernels
Aug 30, 2026
7909033
feat(bench): needle graph decode/prefill single-core suite
Aug 30, 2026
32afb6e
feat(tools): needle heldout accuracy eval
Aug 30, 2026
71d909d
perf(cq): decode q4 nibbles in AVX2 registers
Aug 30, 2026
f91a16e
perf(cq): prepare exact q4 graph weights
Aug 30, 2026
2f2e04d
perf(cq): prepare fp16 cq units
Aug 30, 2026
8fc0ea1
Revert "perf(cq): prepare fp16 cq units"
Aug 30, 2026
241dc57
perf(cq): add exact packed pair LUT route
Aug 30, 2026
e2cb74b
perf(swa): vectorize exact ring attention
Aug 30, 2026
a682b1c
Revert "perf(cq): add exact packed pair LUT route"
Aug 30, 2026
2d56766
test(needle): add authoritative W4A8 logits fixture
Aug 30, 2026
aa7180a
feat(needle): execute explicit W4A8 deployment route
Aug 30, 2026
b3184a9
perf(cq): add exact row-major multirow kernels
Aug 30, 2026
2dd76ea
perf(cq): use exact byte-shuffle lookup
Aug 30, 2026
b3bcd30
perf(cq): unroll byte-shuffle dot
Aug 30, 2026
38e722a
Use packed CQ4 selectors in prepared graph route
Aug 30, 2026
a7a2f77
Revert "Use packed CQ4 selectors in prepared graph route"
Aug 30, 2026
6e0daf8
perf(cq): decode sixteen selectors per shuffle group
Aug 30, 2026
d0feabb
perf(cq): prepare exact q4 lookup tables once
Aug 30, 2026
4f36136
perf(cq): add exact input-major16 block route
Aug 30, 2026
1fa43e3
perf(cq): hoist exact group norms
Aug 30, 2026
8ab1b17
fix(needle): match reference tokenizer ids
Aug 30, 2026
619f2db
Optimize CQ4 lookup for 32 selectors
Aug 30, 2026
7e52e38
perf(cq): use block32 for prepared batch4
Aug 30, 2026
5760a99
perf(cq): vectorize FWHT128 and hoist A8 scale
Aug 30, 2026
0ff51ad
fix(cq): gate AVX2 routes and reject nonfinite A8
Aug 30, 2026
c12704d
perf(cq): transpose prepared norms for block32
Aug 30, 2026
0d45f0c
test(cq): cover grouped block32 norm storage
Aug 30, 2026
b226ea6
feat(needle): profile graph non-CQ phases
Aug 31, 2026
7b1a0ec
perf(zcrms): vectorize row normalization
Aug 31, 2026
2812f9a
optimize needle SWA for GQA2
Aug 31, 2026
ad83b46
fix(swa): harden GQA2 request validation
Aug 31, 2026
d77e49c
fix(swa): reject aliased cache writes
Aug 31, 2026
6b08fe3
Optimize CQ4 raw lookup32 lane ordering
Aug 31, 2026
7304f9a
wip: pause cact needle performance research
Aug 31, 2026
00db128
perf(cq): fuse raw lookup projection pairs
Aug 31, 2026
704f33f
Revert "perf(cq): fuse raw lookup projection pairs"
Aug 31, 2026
de83708
optimize needle hadamard with avx2
Aug 31, 2026
6fa2ec6
optimize cq prepared gemv with block64
Aug 31, 2026
098df05
Optimize Needle SWA exponential pass
Aug 31, 2026
f3d1e10
feat(needle): parallelize prepared projection wave
Aug 31, 2026
ae11fbf
bench(needle): compare serial and parallel graph routes
Aug 31, 2026
f136394
fix needle benchmark fixed-context runs
Aug 31, 2026
7ff5678
Fix portable Hadamard size guards
Aug 31, 2026
ab56399
fix(generator): scope GCC pedantic suppression
Aug 31, 2026
bdc7536
test(cq): use canonical prepared geometry
Aug 31, 2026
3e148f2
test: align Mimi projection diagnostics with host route
Aug 31, 2026
328b681
fix(swa): preserve generic value accumulation order
Aug 31, 2026
4b4a06e
fix(bench): pair needle graph compare cases
Aug 31, 2026
db5c390
test: merge template coverage lines
Sep 1, 2026
d600d7d
test(speech): cover generator and moshi guards
Sep 1, 2026
90c35be
test(kernel): cover portable aarch64 guards
Sep 1, 2026
f365259
test: cover memory and model state routes
Sep 1, 2026
64c079c
test(text): cover jinja detokenizer and preprocessors
Sep 1, 2026
274ee65
test: cover x86 kernel routes and rejections
Sep 1, 2026
8ef4053
test(generator): cover layer routes and outcomes
Sep 1, 2026
d449b2e
test(needle): cover graph routes and validation
Sep 1, 2026
d7c86bd
test: correct x86 f16 matmul layout expectations
Sep 1, 2026
5cc4573
Fix Jinja text coverage expectations
Sep 1, 2026
cc21b57
test: scope loader boundary source scan
Sep 1, 2026
cae4ec9
Split coverage runtime shard
Sep 1, 2026
791ec38
Fix portable libFuzzer runtime detection
Sep 1, 2026
6543a59
fix kernel guard overflow validation
Sep 1, 2026
0ed1bf3
fix needle graph geometry and dilation
Sep 1, 2026
7bb2d77
maintain decisive Needle evaluator gate
Sep 1, 2026
9e20fae
Validate CAct tensor payload ranges
Sep 1, 2026
1b3092f
test: isolate needle AVX2 route preconditions
Sep 1, 2026
2069941
fix(cq): reject zero groups before padding math
Sep 1, 2026
7b94cc6
fix needle engram geometry bounds
Sep 1, 2026
ef13e1a
fix needle evaluator input and mmap contracts
Sep 1, 2026
b10f15d
fix(cq): reject non-finite execution scales
Sep 1, 2026
ead65e9
fix cact loader span lifecycle
Sep 1, 2026
073efb4
fix needle graph thread construction failure
Sep 1, 2026
9b2c9f3
fix needle empty callback dispatch
Sep 1, 2026
e758079
feat(needle-eval): expose activation route
Sep 1, 2026
c35c11f
fix(needle): align heldout quality reference
Sep 1, 2026
a3a34bd
fix: harden Needle runtime review boundaries
Sep 2, 2026
6cd8e44
fix: resolve Needle runtime review findings
Sep 2, 2026
cf949fd
Fix parity parser callback noexcept declaration
Sep 2, 2026
b9dce56
fix(cq): validate prepared payload once
Sep 2, 2026
0a185d1
fix needle request benchmark thread contract
Sep 2, 2026
c41c7d5
fix(sm): block idle fork join workers
Sep 2, 2026
c674d99
feat(bench): add live Cactus Needle comparison
Sep 2, 2026
b1bfa7b
fix needle reference authentication TOCTOU
Sep 2, 2026
ffda862
fix bench needle live snapshot gating
Sep 2, 2026
8186c04
Encapsulate prepared CQ publication
Sep 2, 2026
8555bc3
fix needle authenticated worker reentry
Sep 2, 2026
dfed17c
Own prepared CQ payload storage
Sep 2, 2026
085238b
Bind Needle compare to authenticated Python path
Sep 2, 2026
c296064
fix(bench): align Needle request run limits
Sep 2, 2026
7dce786
Harden prepared CQ publication lifecycle
Sep 2, 2026
dd6d7dd
Harden Needle process lifecycle
Sep 2, 2026
76bc15b
Seal authenticated Needle interpreter execution
Sep 2, 2026
3342a3d
Provision sealed exec in reusable bench builds
Sep 2, 2026
8a6dd78
Close sealed interpreter descriptor on exec
Sep 3, 2026
a21bb4c
Allow the full authenticated exec environment
Sep 3, 2026
265b6bf
style: format cact needle runtime files
Sep 3, 2026
821a973
enforce build memory envelope
Sep 3, 2026
336e443
enforce envelope at build entrypoints
Sep 3, 2026
e409ab2
verify memory envelope from kernel state
Sep 3, 2026
491f40b
bound builds by ancestor memory limits
Sep 3, 2026
db3c7e8
remove unenveloped build presets
Sep 3, 2026
7660b73
remove unenveloped test preset
Sep 3, 2026
7a4b018
envelope standalone quality gates
Sep 3, 2026
cd08fe4
require verified systemd memory scopes
Sep 3, 2026
cfde803
envelope profiling entrypoints
Sep 3, 2026
fee2a2b
sync memory contract README template
Sep 3, 2026
f0d2e6f
remove unsafe help bypass
Sep 3, 2026
51e42fd
envelope benchmark reference execs
Sep 3, 2026
5b23d2a
document macOS profiling fail closed
Sep 3, 2026
ca7739a
clarify profiling availability
Sep 3, 2026
e301f59
make memory source test hermetic
Sep 3, 2026
d0648f6
make memory calculations test portable
Sep 3, 2026
02366c8
fail closed memory command wrapper
Sep 3, 2026
8623b68
authenticate hard memory cgroup scopes
Sep 3, 2026
c8569f8
replace fork join pool with upstream scheduler
Sep 3, 2026
12300c6
fix(deps): advance SML scheduler pin
Sep 3, 2026
38bbe10
docs: update scheduler integration pin
Sep 3, 2026
a5a5a97
fix decode wavefront parallel lane routing
Sep 3, 2026
a6f1ec0
build: pin reviewed SML scheduler fixes
Sep 3, 2026
b0d6ab8
Fix decode wavefront pack capture for Clang
Sep 3, 2026
bc21d1a
fix tokenizer vocab reset stack use
Sep 3, 2026
60da9dc
fix: inline tokenizer vocab reset
Sep 3, 2026
ffefca1
fix(decode): serialize mutable lane aliases
Sep 3, 2026
1bf8b03
fix(decode): bound mutable alias admission
Sep 3, 2026
516ff00
fix(decode): cover graph actor alias extent
Sep 3, 2026
a7fd218
fix wavefront mutable owner alias guard
Sep 3, 2026
c06ddc2
docs: close cact needle control plane
Sep 3, 2026
b3391a2
docs: distinguish runtime source head
Sep 3, 2026
a3587a3
bench: enforce Needle Cactus envelope parity
Sep 3, 2026
dce8ecb
feat(needle): add source-owned request runtime
Sep 3, 2026
1678d27
bench: preserve full Needle envelopes
Sep 3, 2026
1064009
bench: retain Needle package tree identity
Sep 3, 2026
1a77f83
bench: mark closed Cactus request contract noncomparable
Sep 3, 2026
0b1888b
bench: disable Cactus telemetry in worker
Sep 3, 2026
e622eab
bench: secure Cactus output and aggregate independently
Sep 3, 2026
2faddf8
fix needle request validation and lifecycle safety
Sep 3, 2026
d13f2ad
fix(needle): validate route tool schema structurally
Sep 3, 2026
6d64446
bench: verify Needle request fixture tokens
Sep 4, 2026
7b2949d
bench: restore Needle EMEL metadata validation
Sep 4, 2026
78fa42b
fix(needle): fail illegal request runtime dispatch
Sep 4, 2026
93f6e20
Reject EMEL metric metadata collisions
Sep 4, 2026
5cd1570
Invalidate Needle outputs on runtime dispatch
Sep 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .planning/.continue-here.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
context: completion
phase: cact-needle-runtime-publication
task: 5
total_tasks: 5
status: completed
runtime_source_head: a7fd218463cf50f239dea69819e7114c14774556
pull_request: 116
last_updated: 2026-09-03T14:16:06Z
---

# Terminal Completion Boundary

The native Cactus/Needle runtime lane is complete with final runtime/source
repair commit `a7fd218463cf50f239dea69819e7114c14774556` on
`feat/cact-needle-runtime`.

PR #116 is open/current and its branch includes that runtime source commit plus
subsequent control-plane-only commits. There are no remaining source
implementation blockers. Merge is the only next action and remains explicitly
owner-authority-gated; no merge is claimed.

## Completed Scope

- Native positional `.cact` loading, Needle model binding/tokenizer/graph, exact
CQ2/CQ3/CQ4 execution, heldout evaluation, maintained diagnostics, and the
upstream-SML scheduler/wavefront cutover are complete.
- The custom `fork_join_lane_pool` path is removed; `stateforward.SML` remains
pinned to `67f898e6e19d516bb445841263fd35db3f3cd3c3`.
- Maintained acceptance remains: native EMEL beats the Cactus engine.
- Cross-backend diagnostics remain `comparable=false`; no ratio, latency
equivalence, or kernel equivalence is claimed.
- `435 tok/s` is historical theoretical roofline/stretch context only, not an
acceptance gate and not a completed claim.

## Runtime-Source-Head Proof

- Combined Zig core proof: 160/160 cases, 444,287 assertions.
- Focused wavefront proof under Clang: 17/17 cases, 590 assertions.
- Focused wavefront proof under Zig: 17/17 cases, 590 assertions.
- Native heldout lane: 287 rows, domain `0.8397`, effort `0.7631`, zero
tokenizer mismatches.
- Scoped gate: the runtime source head built and heldout passed.
- Final blind rules/HSM review: empty findings.
- Final blind completeness review: empty findings.

Historical focused CQ/Needle parity, scheduler/co_sm thread-pool, affected
parallel matmul, contention, memory-contract, and live systemd cgroup-v2 proofs
remain supporting evidence; the runtime-source-head proof above is the terminal
source health boundary.

## Exact Gate Caveat

The aggregate quality gate is **not green**. It ended red solely because the
repository-wide lint snapshot reported baseline drift in unrelated files. The
runtime-source-head build and heldout lane passed before that aggregate lint
failure.
Snapshot changes are forbidden without explicit user consent, so no lint
snapshot was updated and no aggregate-green result is claimed.

`snapshots/quality_gates/timing.txt` is unrelated modified user state. It is
untouched and is not completion evidence.

## Terminal Invariants

- Do not reopen the old single-thread performance research pause.
- Runtime-source-head Zig proofs completed; use `a7fd2184` as the final
runtime/source repair commit. PR #116's branch includes it and may also include
later control-plane-only commits.
- Scheduler-cutover evidence predates the terminal runtime-source-head proof and
remains historical support only.
- Do not claim aggregate green, merge, cross-backend comparability,
ratio/equivalence, or `435 tok/s`.
- Preserve PR #116 as open/current until an authorized owner merges it.

## Next Action

Owner reviews PR #116 and merges only with explicit authority. Otherwise stop at
this terminal completion boundary.
55 changes: 55 additions & 0 deletions .planning/HANDOFF.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": "1.0",
"timestamp": "2026-09-03T14:16:06Z",
"phase": "terminal",
"phase_name": "cact-needle runtime completion and publication",
"phase_dir": ".planning",
"plan": 5,
"task": 5,
"total_tasks": 5,
"status": "completed",
"runtime_source_head": "a7fd218463cf50f239dea69819e7114c14774556",
"branch": "feat/cact-needle-runtime",
"pull_request": {
"number": 116,
"state": "open",
"contains_runtime_source_head": true,
"current": true,
"merge_authority_required": true
},
"completed_tasks": [
{"id": 0, "name": "Native cact loader, Needle graph, exact CQ kernels, tokenizer parity, and heldout evaluator", "status": "done"},
{"id": 1, "name": "Exact CQ and maintained native runtime performance work", "status": "done"},
{"id": 2, "name": "Upstream SML scheduler cutover and wavefront ownership repairs", "status": "done"},
{"id": 3, "name": "Runtime-source-head tests, heldout evaluation, scoped gate, and blind reviews", "status": "done"},
{"id": 4, "name": "Publish runtime source head to PR #116 and close control-plane state", "status": "done"}
],
"remaining_tasks": [],
"blockers": [],
"source_blockers": [],
"authority_gates": [
{"description": "PR #116 merge requires explicit owner authority; no merge is claimed.", "type": "authority"}
],
"human_actions_pending": [
{"action": "Review open/current PR #116 and merge only with explicit owner authority."}
],
"decisions": [
{"decision": "Accept maintained performance when native EMEL beats the Cactus engine.", "rationale": "This is the maintained user-approved acceptance criterion; cross-backend diagnostics remain comparable=false and support no ratio or equivalence claim.", "phase": "terminal"},
{"decision": "Treat 435 tok/s only as historical theoretical roofline/stretch context.", "rationale": "It is not a required acceptance gate and is not claimed achieved.", "phase": "terminal"},
{"decision": "Do not update lint or timing snapshots.", "rationale": "The aggregate gate ended red solely on repository-wide lint snapshot baseline drift in unrelated files; snapshot updates require explicit user consent, and snapshots/quality_gates/timing.txt is unrelated modified user state.", "phase": "terminal"}
],
"verification": {
"zig_core": "160/160 cases, 444287 assertions",
"wavefront_clang": "17/17 cases, 590 assertions",
"wavefront_zig": "17/17 cases, 590 assertions",
"heldout": "287 rows, domain 0.8397, effort 0.7631, zero tokenizer mismatches",
"scoped_gate": "runtime source head built and heldout passed",
"aggregate_gate": "red solely on repository-wide lint snapshot baseline drift listing unrelated files; no green aggregate claim",
"blind_reviews": "final rules/HSM and completeness reviews returned empty findings"
},
"uncommitted_files": [
{"path": "snapshots/quality_gates/timing.txt", "ownership": "unrelated user state", "action": "untouched"}
],
"next_action": "Owner reviews open/current PR #116 and merges only with explicit authority.",
"context_notes": "Runtime/source repairs are complete with final runtime source commit a7fd218463cf50f239dea69819e7114c14774556. PR #116 is open/current and its branch includes that commit plus subsequent control-plane-only commits. There are no source blockers. Do not claim aggregate green, merge, cross-backend comparability, ratios/equivalence, or 435 tok/s."
}
Loading