Skip to content

docs(t27o): golden functions -- the hand lines in converted fns of partly converting files, and the 146 fns that move without changing a caller (Closes #11159) - #11160

Merged
gHashTag merged 1 commit into
masterfrom
t27o/golden-functions-a8
Oct 19, 2026

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

What this is

Step 4 of #9000 for the files that do not convert whole (analysis only: no Rust is deleted, no spec is added). docs/now/2026-10-20-golden-functions.md measures the hand-written Rust lines that sit in functions t27o already converts, inside files that only partly convert, and which of those functions could be replaced by a generated function mounted into the same file with #[path] so that the lines are deleted and no caller changes. The whole-file version is #11149 (docs/now/2026-10-20-golden-candidates.md).

Closes #11159

The same table (answer, scale, reasons, first bundle, top bundles, top 120 of the 187 ranked rows) is posted on #11159: #11159 (comment)

Answer

  • 223 partly converting files (t27 at 0e00974, trios main 78671ba794, trinity 8e535bc9bb, trinity-fpga c9b180bf78, 999-multibots-telegraf fcdbb2f7dc) hold 817 converted fns with 6,555 hand lines outside #[cfg(test)] (44,864 #[cfg(test)] lines sit in the same files). That is 1.51% of the 435,491 lines lane A4 swept, against 0.69% for the whole files.
  • MOVABLE (same name and types, every caller unchanged): 146 fns, 1,375 lines (0.32%). MOVABLE-WITH-CALLER-CHANGE: 54 fns, 406 lines. NOT-NOW: 617 fns, 4,774 lines (477 are methods or name a hand-file type, 68 have gen-rust output that does not compile, 38 are trait impl methods, 20 carry a cfg or proc-macro attribute, 13 are const fns used in a const context).
  • In the crates the t27 workspace builds (bootstrap, cli/*) the MOVABLE fns hold 217 lines in 27 fns; the largest bundle is cli/tri/src/fpga.rs with 45 lines. trios workspace crates: 421 lines in 49 fns.
  • No call-connected group reaches 200 lines (the biggest is exp_f64 + apply_softmax, 93). The first bundle (all MOVABLE fns of one file, one mount) that deletes at least 200 lines is rings/ring-092-rust/src/lib.rs: 7 fns, 201 hand lines, +5 mount lines (net -196). Mounted in a scratch copy of the crate, its 28 tests pass as before; 8,560,045 differential comparisons of the hand fns against the generated ones show 0 disagreements. Caveat: specs/nn/attention.t27 already declares four of the fns with another argument order, so a port has to reconcile with it first.
  • No other bundle exceeds 88 lines.

Files

path change
docs/now/2026-10-20-golden-functions.md new: method and sources, scale, reasons, the first bundle, 74 bundles, the 187-row ranked table, gen-rust signature differences, every converted fn by file with its verdict code, what was not run

Hand-written lines: +602 of prose in a docs/now file (not Rust); no .rs or .t27 file is touched.

Valid output

  • t27c test-report of the converted spec of each file (one spec per file, a fresh ZIG_LOCAL_CACHE_DIR deleted after each run): 178 of the 223 specs ran, 100 hold tests (377 tests, 377 pass, 0 FAIL, 57 vacuous passes) and 78 hold none.
  • 45 specs were NOT checked (the run was stopped when the shared Mac ran low on disk under load): 44 of the 187 ranked rows say valid-output: unchecked.
  • Every row's gen-rust output was compiled with rustc --crate-type lib (refused stubs removed, repeated after dropping each failing item; the ring crates also under #![no_std]).
  • python3 -I tools/check_devhome_paths.py: OK, 29 files, 37 occurrences, all pinned; the document has no /Users path and is ASCII.

Not run

  • tri t27o --check (oracle replay) on any file; the only behavioural comparison is the ring-092 differential run above.
  • No cargo build, cargo check or cargo test; callers come from a token index of every .rs file of the five repositories plus git grep by hand for every MOVABLE row with a hit elsewhere. BrowserOS, ghashtag.github.io and trios-railway were not read.
  • No seal, ledger row, own-language gate run or dupe_scan over any spec but the ring-092 group spec (scratch).

🤖 Generated with Claude Code

…rtly converting files, and the 146 fns that move without changing a caller (Closes #11159)

Analysis only, step 4 of #9000 for the files that do not convert whole: no Rust
is deleted and no spec is added.

223 partly converting files (t27 at 0e00974, trios main 78671ba794, trinity,
trinity-fpga, 999-multibots-telegraf) hold 817 converted fns with 6,555 hand
lines outside #[cfg(test)]. 146 fns (1,375 lines, 0.32% of the swept lines)
are MOVABLE: a free fn gen-rust writes with the same name and types, whose
callers need no change. 54 fns (406 lines) are MOVABLE-WITH-CALLER-CHANGE, 617
(4,774 lines) are NOT-NOW: 477 are methods or name a hand-file type, 68 have
gen-rust output that does not compile, 38 are trait impl methods.

No call-connected group reaches 200 lines (the biggest is 93). The first
bundle (the MOVABLE fns of one file, one mount) that deletes at least 200
lines is rings/ring-092-rust/src/lib.rs: 7 fns, 201 lines, +5 mount lines; its
28 crate tests pass with the mount, and 8,560,045 differential comparisons of
the hand fns against the generated ones had 0 disagreements. In the crates the
t27 workspace builds the largest bundle is 45 lines (cli/tri/src/fpga.rs).

44 of the 187 ranked rows are marked valid-output: unchecked (t27c test-report
was stopped when the shared Mac ran low on disk); the others carry their
test-report result and a rustc compile of the gen-rust output.

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 22:20:18 UTC

Summary

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

These columns do not partition: 2 + 47 + 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)=e34e1b174c96 != 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 marked this pull request as ready for review October 19, 2026 22:32
@gHashTag
gHashTag merged commit 133dac3 into master Oct 19, 2026
30 of 32 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

2 participants