Skip to content

spec(ml): arena heap + file I/O contract; adamw compiles via the arena (Closes #10077) - #10088

Merged
gHashTag merged 5 commits into
masterfrom
spec/ml-arena-heap-file-io
Oct 17, 2026
Merged

gHashTag merged 5 commits into
masterfrom
spec/ml-arena-heap-file-io

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Closes #10077. Part of #10024.

What

  • specs/ml/arena_heap.t27 (new): bump allocator over a caller-owned array. Alloc returns an offset, plus reset, mark/release, high-water mark. Out of memory, bad size, bad alignment and bad mark are returned codes, and the arena is unchanged on error.
  • specs/ml/file_io_contract.t27 (new): open/read/write/close as pure functions over a byte array (4 slots x 256 bytes, all-or-nothing writes, write-open truncates), plus a "T27C" checkpoint round trip (16-byte header, f32 bit patterns, 4-byte byte-sum checksum).
  • specs/ml/optimizer/adamw.t27 (rewritten): no allocate_array; the moments m, v and the AMSGrad maximum are carved from the arena. Dropped the GF16 block, its benches and the ablation scaffold; the header lists the non-claims.
  • specs/igla/own_model.t27 and its board mirror: 7 of 17 ML specs compile (was 6), so cell 22 share goes 35 -> 41. Cells 24 and 25 stay gaps: these are specs, not a t27c backend.
  • .trinity/seals/AdamW.json, optimizer_AdamW.json: resealed on the lab (were "blocked allocate_array").

Measured on the Railway lab (t27c test-report)

spec tests invariants vacuous
ml/arena_heap 10/10 1 0
ml/file_io_contract 12/12 (adds token stream + MSLH header; 9 of 9 new-code mutants killed) 1 0
ml/optimizer/adamw 12/12 (was BLOCKED) 1 0
igla/own_model 8/8 1 0
igla/own_model_board 6/6 1 0

Mutation check on the new and rewritten specs: 21 hand-made mutants (off-by-one alignment, OOM boundary, high-water, truncate, byte order, checksum, decay, bias correction, AMSGrad max and others); 20 killed by tests, the last (high-water assignment) killed by the comptime invariant.

Still blocked in the 17: nn/attention (PHI_CUBED_INV) and the coder specs, which another session owns.

Not in this PR

The Rust backend. Owner ruling: .t27 only, so no Rust. What stays missing is a real host file descriptor and the --backend ml dispatch, both of which need bootstrap Rust. That blocker is recorded in #10085, and cells 24 and 25 stay gaps.

🤖 Generated with Claude Code

gHashTag and others added 2 commits October 18, 2026 01:32
Closes #10077)

- specs/ml/arena_heap.t27: bump allocator over a caller-owned array;
  alloc returns an offset, reset, mark/release, high-water mark, OOM is
  a returned code. 10/10 tests, 1 invariant, 0 vacuous on the lab.
- specs/ml/file_io_contract.t27: open/read/write/close as pure functions
  over a byte array plus a checkpoint round trip. 10/10, 0 vacuous.
- specs/ml/optimizer/adamw.t27: rewritten without allocate_array; moments
  are carved from the arena. 12/12, 0 vacuous (was BLOCKED).
- specs/igla/own_model.t27 (+ board mirror): 7 of 17 ML specs compile
  (was 6); cell 22 share 35 -> 41. Cells 24/25 stay gaps; the Rust
  backend is #10085 and waits for the owner-approved-foreign label.
- Reseal AdamW.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…(Refs #10077)

- tokens_write/tokens_read: u32 ids, 4 bytes little endian, every size
  problem a code (ALIGN, SIZE, FULL, NOENT).
- mslh_header_put/get, mslh_write_header/mslh_read_header: 16-byte header
  with magic MSLH; defined here, no MSLH file format exists elsewhere in
  the repo, so it is not a checked match for any existing file.
- 12/12 tests, 0 vacuous on the lab; 9 of 9 new-code mutants killed.
- own_model.t27 wording updated; its 8 tests still pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-17 18:59:01 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 47
PRs with All Checks Green 3
READY 0
FAILING 47
PENDING 0
NO CHECKS YET 1

These columns do not partition: 0 + 47 + 0 + 1 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e769ef021713 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

… IoHandle (type-name ratchet)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-17 19:47:39 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 0
FAILING 48
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 48 + 0 + 0 = 48, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3b53d48ddb52 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

gHashTag and others added 2 commits October 18, 2026 02:49
…three new ml specs in the t27b ledger

adamw.t27 no longer defines OptimizerStepResult. arena_heap, file_io_contract and
adamw are reference-pass and t27b-blocked, so each gets an unimplemented row and
max_not_pass rises by those three rows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-17 19:54:35 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=3b53d48ddb52 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit b655dce into master Oct 17, 2026
28 of 31 checks passed
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.

spec(ml): arena heap and file I/O contract in t27, adamw without allocate_array

1 participant