Skip to content

spec(ml): train_slice_model -- reuse file_io_contract's byte_sum instead of a copy (Closes #10206) - #10207

Closed
gHashTag wants to merge 1 commit into
masterfrom
spec/train-slice-reuse-byte-sum
Closed

gHashTag wants to merge 1 commit into
masterfrom
spec/train-slice-reuse-byte-sum

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10206

Part of epic #10024 (cell 25). #10186 added byte_total to specs/ml/train_slice_model.t27, and its body is the same as the private byte_sum in specs/ml/file_io_contract.t27. Because the spec already has use ml::file_io_contract, the copy is not needed, and the Duplicate Body Ratchet has been red on master since #10186 merged.

Change

  • specs/ml/file_io_contract.t27: byte_sum is now pub. Its body is unchanged.
  • specs/ml/train_slice_model.t27: byte_total is deleted, and its two callers (pack, check_image) now call byte_sum.
  • No duplicate-body ledger is blessed. The copy is removed rather than declared.

Evidence (Railway lab, master 94d2793 + this change)

check result
t27c test-report specs/ml/train_slice_model.t27 5 tests, 0 FAIL, 0 vacuous
t27c test-report specs/ml/file_io_contract.t27 0 of 12 vacuous
t27c test-report specs/ml/host_io_model.t27 (the other user of file_io_contract) 0 of 3 vacuous
--backend ml binary exit 0, /tmp/t27_train_slice.bin 379 bytes, sha256 0dfdef2200b3daa2930cb081f8fb4a58caf5677bae3f329ee23f0e2c328cdbeb, the same as before the change
same binary, with that path made a directory exit 134
python3 tools/dupe_scan.py exit 0, "no new duplicate body, and none of the known groups grew"

🤖 Generated with Claude Code

…ead of a copy (Closes #10206)

#10186 added byte_total to specs/ml/train_slice_model.t27, a body
identical to the private byte_sum in specs/ml/file_io_contract.t27,
which the spec already reaches through `use ml::file_io_contract`. The
Duplicate Body Ratchet has been red on master since. byte_sum becomes
pub; byte_total is deleted and its two callers call byte_sum. No ledger
is blessed.

Lab, master 94d2793 + this change: train_slice_model 5 tests, 0 FAIL,
0 vacuous; file_io_contract 0 of 12 vacuous; host_io_model 0 of 3
vacuous. The --backend ml binary exits 0 and writes the same 379-byte
/tmp/t27_train_slice.bin, sha256 0dfdef22...cdbeb; with that path made a
directory it exits 134. python3 tools/dupe_scan.py exits 0: "no new
duplicate body, and none of the known groups grew".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag

Copy link
Copy Markdown
Owner Author

Closing as a duplicate of #10205, which makes the same change (byte-identical diff) and was opened first. My lab run of this diff on master 94d2793 agrees with it: train_slice_model 5 tests, 0 FAIL, 0 vacuous; the --backend ml checkpoint is unchanged (379 bytes, sha256 0dfdef22...cdbeb); python3 tools/dupe_scan.py exits 0.

@gHashTag gHashTag closed this Oct 18, 2026
@gHashTag
gHashTag deleted the spec/train-slice-reuse-byte-sum branch October 18, 2026 04:21
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 04:29:36 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)=0f8c66b9ed0e != 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).

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): train_slice_model -- reuse file_io_contract's byte_sum instead of a copy (dup-body ratchet red on master)

1 participant