Skip to content

t27b: ir_types law + the diff-cache glue lands (ladder steps 5 + the queued debt) - #13148

Merged
gHashTag merged 1 commit into
masterfrom
lane/diff-cache-glue
Nov 2, 2026
Merged

gHashTag merged 1 commit into
masterfrom
lane/diff-cache-glue

Conversation

@gHashTag

@gHashTag gHashTag commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #13132 (ladder step 5, the Ty table).

What lands

ir_types.t27, the IR type table law (ladder step 5 over cli/t27b/src/ir.rs). specs/tri/t27b/ir_types.t27 (module T27bIrTypes, seal t27b_T27bIrTypes) owns the kind encoding - bool=0, u8=1, u16=2, u32=3, u64=4, i8=5, i16=6, i32=7, i64=8, ptr=9, f32=10, f64=11, i128=12, odd unsigned 100+n, odd signed 200+n - and the table: ty_bits, ty_signed, ty_is64, ty_is_float, ty_is_int, ty_is_odd, ty_name. Every arm of the old Rust tables is mirrored and tested: 8 tests, 490 runtime asserts, 0 vacuous, all 27 odd widths 1..=31 except 8/16, Ptr = 64 bits, bool = 8 (a 0/1 byte). ir.rs keeps ONE law() kind mapping (15 packed arms) and one-line method calls; the UN_NAMES/IN_NAMES tables and every duplicated doc are gone - the spec header is the home.

The queued diff-cache glue, now paid. cli/t27b/tests/differential.rs +38 (the suite key: harness text + test binary + knobs + host, rows under ~/.cache/t27/diff-cache, T27B_DIFF_NOCACHE / T27B_DIFF_ONE bypass) and cli/t27b/src/lib.rs +10 (diff_cache + ir_types mounts). Verified live in this worktree: a cold run writes the row; the second run prints "diff-cache HIT (T27B_DIFF_NOCACHE=1 forces a rerun)" (15.1 s cold -> 0.04 s warm); a codegen.rs change invalidates the key (full rerun, new row).

Measured numbers

file added deleted
cli/t27b/src/ir.rs 21 76
cli/t27b/src/lib.rs 10 0
cli/t27b/tests/differential.rs 38 0
whole branch (foreign) 69 76

Budget: added 69 <= 80, added <= deleted (the shrink rule), per file 38 / 21 / 10 <= 40. The gate (git diff --numstat origin/master...HEAD through check_budget) exits 0; lefthook pre-commit ran it on the staged diff.

Tests: T27B_DIFF_NOCACHE=1 cargo test -p t27b = 178 passed; 0 failed (no tests_hir_roundtrip reds this run). Spec: t27c test-report specs/tri/t27b/ir_types.t27 100 percent, t27c fmt clean, seal saved.

Honest queue state

  • TRAP_PLAN_STUBS corrected 12/6 -> 35/27 in tools/deletion_credits.txt, rehearsed 2026-11-03 in lane/diff-cache-glue (this worktree, 178/0 green). The migration itself is NOT in this PR: lane F's codegen.rs work stays uncommitted in the worktree, its queue entry stays drawable, and the codegen.rs trap_plan mount belongs to whoever draws it.
  • IR_TYPES is recorded as a landed measurement (ir.rs 21/76) in a comment, with NO queue entry: the queue only holds unlanded work, and a drawable entry for a landed migration is the double-draw the deletion_credits law names. The deeper ir.rs laws (sites, slots - the rest of ladder step 5) still wait for their own rehearsal.
  • Two origin/master moves (7fe50cd, then 18860f1) were rebased over mid-flight; the rc_ledger_line.t27 delta seen in early numstats was master moving, not this branch.

phi^2 + 1/phi^2 = 3 | TRINITY

…#13132)

The IR type table moves into specs/tri/t27b/ir_types.t27 (module T27bIrTypes,
8 tests / 490 runtime asserts, 0 vacuous, seal t27b_T27bIrTypes): kind codes
bool=0, u8=1, u16=2, u32=3, u64=4, i8=5, i16=6, i32=7, i64=8, ptr=9, f32=10,
f64=11, i128=12, odd unsigned 100+n, odd signed 200+n; ty_bits / ty_signed /
ty_is64 / ty_is_float / ty_is_int / ty_is_odd / ty_name, every arm of the old
Rust tables mirrored and tested (all odd widths 1..=31 except 8/16, Ptr = 64
bits, bool = 8). cli/t27b/src/ir.rs keeps one law() kind mapping and one-line
calls: numstat ir.rs 21 added / 76 deleted, the wholesale-table shape that
pays the glue.

The queued diff-cache glue lands paid: cli/t27b/tests/differential.rs +38
(suite key from harness text + test binary + knobs + host, row under
~/.cache/t27/diff-cache, T27B_DIFF_NOCACHE / T27B_DIFF_ONE bypass),
cli/t27b/src/lib.rs +10 (diff_cache and ir_types mounts). Verified live:
a cold run writes the row, the second run prints "diff-cache HIT
(T27B_DIFF_NOCACHE=1 forces a rerun)" (15.1s cold -> 0.04s warm), and a
codegen.rs change invalidates the key (full rerun, a new row).

Whole-branch foreign numstat vs origin/master: added 69 <= 80, added <=
deleted (69/76), per file 38 / 21 / 10 <= 40. T27B_DIFF_NOCACHE=1 cargo
test -p t27b: 178 passed; 0 failed. tools/deletion_credits.txt:
TRAP_PLAN_STUBS corrected 12/6 -> 35/27 (rehearsed 2026-11-03 in this
worktree, lane F lands it); the IR_TYPES measurement (21/76) is recorded
as landed, with no queue entry, because the queue only holds unlanded work.

phi^2 + 1/phi^2 = 3 | TRINITY
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-02 18:31:27 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)=e75b498e5e79 != 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 9c5f3c0 into master Nov 2, 2026
45 of 49 checks passed
@gHashTag
gHashTag deleted the lane/diff-cache-glue branch November 2, 2026 18:55
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.

t27b: move every codegen law from .rs glue into .t27 specs (the rs-to-t27 ladder)

1 participant