Skip to content

t27b: @truncate lowers, utf8 passes; ledger rows for 8 unlisted specs, cap stays 129 (Closes #10837) - #10862

Merged
gHashTag merged 10 commits into
masterfrom
claude/t27b-truncate-10837
Oct 19, 2026
Merged

gHashTag merged 10 commits into
masterfrom
claude/t27b-truncate-10837

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #10837. Refs #10858.

What

@truncate lowers in t27b, so specs/tri/utils/utf8.t27 passes. That frees one ledger slot. Eight specs that master merged with no rows in docs/reports/t27b_expectations.json now have pass rows.

#10853 (bare sqrt, 11 rows flipped) merged first, with max_not_pass 129. This PR keeps that cap, holding 128 not-pass rows (127 blocked + 1 codegen). One slot stays free for #10858.

@truncate

specs/tri/t27b/int_cast_plan.t27 gains truncate_plan:

  • it is plan in wrap mode: it keeps the low bits and never traps;
  • a comptime operand folds with wrap;
  • a result type wider than the operand is refused (REFUSE_WIDER), as Zig refuses it;
  • from_destination now names @truncate, so x = @truncate(e) takes x's type.

cli/t27b/src/lower.rs is glue only, net 0 hand-written lines (9 added, 9 deleted): int_cast takes a trunc flag. t27c gen-rust regenerated gen/rust/tri/t27b/int_cast_plan.rs, and the seal was re-saved (--verify: all MATCH).

Ledger

The native ratchet on 8f043ad reported UNLISTED 2 (sar_logic and secret_gate, now listed) and 0 in every other count. On a merge with master it will also show UNLISTED for eval_hslm and ngram_hslm, as master's own run does today.

Evidence (Railway lab, x86_64 host, t27b cross-built for aarch64 and run under qemu)

  • int_cast_plan.t27:

    • its spec tests pass, including the 20 asserts of truncate_keeps_the_low_bits_in_either_mode_and_never_traps;
    • mutants killed: wider-off-by-one, no-wrap, ct-fold, refuses-wider.
  • t27b corpus, t27b against t27c + zig, compared per test, with 0 disagreements:

    Directory Files compared
    specs/tri/utils 8
    specs/tri/t27b 152
    specs/nn 1
    specs/benchmarks 10
    specs/compiler 40

    utf8.t27: pass, 8 tests, 14 asserts.

  • The crate's own Rust suites (aarch64 under qemu, with the @truncate glue): rc 0, every suite ok.

The t27b-loop skill records the traps hit here, including a cap lowered to the exact count and two sessions on one issue.

🤖 Generated with Claude Code

gHashTag and others added 5 commits October 19, 2026 11:40
…c's Zig backend prints it (Refs #10837)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… on host I/O), 11 sqrt specs flip to pass, cap 139 -> 129 (Closes #10837)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s two unlisted hslm specs (Closes #10837)

#10380 merged specs/nn/hslm_tokenizer.t27 and specs/ml/hslm_corpus.t27
with no ledger rows, so every PR built on master got UNLISTED 2 from
t27b-native-ratchet. hslm_corpus is blocked (cross-module
use-resolution), and the ledger already sat at max_not_pass 139: its row
would have been the 140th not-pass row, which reads as OVER CAP. The cap
stays where it is. This change frees a slot instead.

specs/tri/utils/utf8.t27 was blocked only by ExprCall(@truncate).
@truncate now lowers through int_cast_plan.t27:
- truncate_plan is plan in wrap mode, so it keeps the low bits and never
  traps;
- a comptime operand folds with wrap;
- a result type wider than the operand is refused (REFUSE_WIDER), as Zig
  refuses it;
- from_destination now names @truncate, so `x = @truncate(e)` takes x's
  type.
lower.rs is glue only, net 0 lines: int_cast takes a trunc flag that picks ic::truncate_plan
and the @truncate site texts. gen/rust/tri/t27b/int_cast_plan.rs is
regenerated by t27c gen-rust, and the seal is re-saved.

Ledger: utf8 -> pass, hslm_tokenizer pass, hslm_corpus blocked. That
leaves 138 blocked + 1 codegen = 139, at the cap, which is unchanged.

The t27b-loop skill records four traps: the cap trap, the x86 lab
without a qemu runner, the full /data volume, and old negative tests
that flip.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…b (Refs #10837)

mos_psp103, mos_psp103_data, sar_switch (specs/analog), idea_factory,
particle_ds, petal_menu (specs/t27f) landed on master with no rows in
docs/reports/t27b_expectations.json. t27b passes all six on the lab
(qemu-aarch64 corpus on 535334d), so they cost no not-pass slot: the
ledger stays at 139 not-pass rows, the cap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rifted rows)

Both PRs close #10837 and each one alone stays red on t27b-native-ratchet:
#10853 has UNLISTED 8 and MOVED 2, and #10862 cannot list eval_hslm and
ngram_hslm without two free slots. Together they free 12 slots, list
all 10 drifted specs, and move two blockers to what native CI reports:

- specs/ml/pathway/mlp.t27: ExprArrayLiteral(repeat count)
- specs/nn/gla.t27: ConstDecl

eval_hslm and ngram_hslm are listed blocked (ExprCall(undeclared fn)).
Not-pass rows: 129 blocked + 1 codegen = 130, and max_not_pass goes from
master's 139 to 130. That lowers the cap; it never rises above master.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag gHashTag changed the title t27b: @truncate by truncate_plan frees a ledger slot; rows for eight drifted specs (Closes #10837) t27b: @truncate + bare sqrt free 12 ledger slots; all 10 drifted specs listed, cap 139 -> 130 (Closes #10837) Oct 19, 2026
…efs #10837)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efs #10837)

Master added both specs after this branch's last ledger update; the
native ratchet on 7ab095a reported them UNLISTED, with every other
count at 0. Both pass under t27b, so the not-pass count stays 130.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ck to #10858 (Refs #10837)

#10853 merged on its own with max_not_pass 129, the exact count, so
master has no room for eval_hslm and ngram_hslm. With @truncate freeing
utf8, keeping both rows would need 130 and raise master's cap. This
branch drops them and takes master's 129: 128 not-pass rows, one slot
free for #10858. The cap line now matches master's, so the branch
merges without conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag gHashTag changed the title t27b: @truncate + bare sqrt free 12 ledger slots; all 10 drifted specs listed, cap 139 -> 130 (Closes #10837) t27b: @truncate lowers, utf8 passes; ledger rows for 8 unlisted specs, cap stays 129 (Closes #10837) Oct 19, 2026
…ch master and check merge-tree (Refs #10837)

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 05:32:39 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=88b8cb73ceda != 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 c05a288 into master Oct 19, 2026
30 of 37 checks passed
gHashTag added a commit that referenced this pull request Oct 19, 2026
…not-pass 129 at cap 129 (Refs #10887)

#10862 auto-merged at 330dd0a, one push before its sar_adc and reap
rows, so master's native ratchet reports them UNLISTED. ngram_hslm takes
the last free slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 19, 2026
…s_psp103_50c_data, worktrees/reap pass, ngram_hslm blocked; cap equals reality at 129 (Closes #10887) (#10889)

* analog: rename sar_adc's Range to SarErrRange, a second type named Range broke the types ratchet (Closes #10887)

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

* t27b ledger: rows for sar_adc, tri/worktrees/reap and ml/ngram_hslm, not-pass 129 at cap 129 (Refs #10887)

#10862 auto-merged at 330dd0a, one push before its sar_adc and reap
rows, so master's native ratchet reports them UNLISTED. ngram_hslm takes
the last free slot.

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

* analog: take master's ErrRange rename from #10892, keep only the missing ledger rows (Refs #10887)

#10892 renamed sar_adc's Range to ErrRange on master, so this branch's
SarErrRange rename now conflicts. The spec and its seal are set to master's.
The ledger is master's (d0959ff) plus the three rows master still lacks:
sar_adc and worktrees/reap pass, ngram_hslm blocked. Not-pass is 129, which
equals the cap, so loop-tools-tracked's "cap equals reality" holds again.

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

* tri/worktrees/reap: a neutral home path in the plain() test, so the devhome guard passes (Refs #10887)

The scan check's check_devhome_paths.py fails on master for this line: it
named a developer's home directory. The test only needs a plain path, so it
now uses /Users/dev/. The seal is re-saved in the next commit.

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

* tri/worktrees/reap: re-save the seal after the test path change (Refs #10887)

Railway lab, t27c built from master: 13 tests, 0 FAIL, 0 vacuous;
seal --verify all hashes MATCH.

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

* ledger: name mos_psp103_50c_data and sar_comparator_psp, both pass on master (Refs #10887)

Master merged both specs without ledger rows, so t27b-native-ratchet
reports them UNLISTED on every open PR. Both pass the reference and t27b;
not-pass stays 129 = cap.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag pushed a commit that referenced this pull request Oct 19, 2026
… its bench block, cap 129 -> 127 (Closes #10897)

The lazy-body rule of this PR lets specs/compiler/parser.t27 and
specs/t27f/deps_card.t27 pass under t27b (the ratchet read UNEXPECTED PASS
for both) and moves notebooklm.t27's first blocker from "type mismatch"
to BenchBlock (MOVED, a finding the ledger steward refuses). Rows and cap
are recounted: 127 not-pass rows, cap 127. Same shape as #10862.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 19, 2026
…n unreached fn are withdrawn from one plan (Closes #10897) (#10999)

* t27b: do not lower bodies no test reaches -- Sema-level refusals in an unreached fn are withdrawn, from one plan (Closes #10897)

Zig type-checks only what an analyzed declaration uses, so a fn nothing reaches is parsed and
name-checked (AstGen) but never type-checked (Sema). t27b lowered every fn and refused the first
construct it could not, so a t27o spec whose only trouble is `return TelegramStarsGateway;` (a Rust
unit struct written as a bare type name) was refused while t27c passes it.

The rule is lazy_sig_plan.t27's, carried from the signature to the body:

- lazy_sig_plan.t27 `body_plan(construct, detail)`: which refusals recorded in an unreached body are
  AstGen's (kept: break outside a loop, a local shadowing a module var, two `else` prongs, a char prong,
  a char/string literal Zig cannot read, a struct field set twice, `_ = p;` of a used parameter, and
  the spellings t27c prints that Zig cannot parse: tuple, map type, tuple assignment, array literal
  text) and which are Sema's (withdrawn). Every kept class was pinned against `t27c test-report` on a
  fn no test reaches.
- `withdrawn_come_back(names_missing, bare, eql_used)`: the withdrawn refusals return after every body
  when some fn names something declared nowhere, or when the module has no test and so no `std`
  (t27c writes `std` only into a module with a test or an invariant) yet prints a string `==` as
  `std.mem.eql`.
- `zig_knows_in(name, prelude)` and `is_undefined`: `std`/`assert` are Zig's only with the prelude; the
  `-> undefined` result becomes a lazy signature type.

It subsumes the four per-construct stubs (`try`, `return undefined`, `&` of a repeated literal,
`-> undefined`). A reached fn keeps every refusal; conformance/lazy_signature.t27 gains the unit
struct returned as a value, and tests/tail.rs pins that a test calling it, and a call to a fn
declared nowhere, stay refused. Five tests whose sources never reached the fn they refuse now call
it (the reference compiles them as written).

Hand-written lines in cli/t27b: +69 -78 (net -9).

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

* t27b: keep the refusals of an unreached body when AstGen refuses the file anyway -- invalid builtins and a string == in a module with no test (Closes #10897)

Found by running t27c test-report on the five repository specs that the first commit turned from
blocked to pass: three of them the reference cannot compile.

- specs/tri/t27b/lazy_sig_plan.t27 `zig_builtin`: `@stdout` (specs/port/tools/check_graph_law8.t27) is
  "invalid builtin function" to AstGen in every fn, so `body_plan` keeps an `ExprCall(@name)` refusal unless
  Zig 0.16 has that builtin; `@floatCast`, `@floatFromInt`, `@max` and the rest of the list stay withdrawn.
- specs/tri/t27b/ast_shape.t27 `string_eq`: every `==` / `!=` with a string literal operand, which t27c
  prints as `std.mem.eql` (specs/port/tools/check_json_parses.t27: `text.trim() == ""`); `restore_held` asks
  it besides `eql_used`, which `str_eq` now sets before its coercions (it was set only after they held, so
  a refused `==` never counted: SR-ALG-00 of trios-algorithm-arena).

NOT built or run on this Mac: the disk alert forbade a cargo build, so only the t27 side was run
(`t27c test-report`: lazy_sig_plan 16/16, ast_shape 14/14, none vacuous; seals saved and verified; gen
files regenerated with `t27c gen-rust`). The Rust glue is one expression in restore_held. The first
commit is the last one measured; CI builds this one.

Hand-written lines in cli/t27b: unchanged (+70 -79, net -9).

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

* t27b: lazy_sig_plan reuses literal_plan's ends_with instead of a private copy (Closes #10897)

Review of #10999: the body plan's suffix test duplicated ends_with from
specs/tri/t27b/literal_plan.t27, a module in the same directory. The two
modules share no name, so the use splice pulls ends_with alone (#10556 does
not bite). gen/rust regenerated, seal re-saved and verified; t27b test 16/16.

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

* t27b: the lazy_signature fixture names its unit struct LazyUnit, not Gate -- Gate is crm-sellers' type and the types ratchet counted a conflict (Closes #10897)

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

* ledger(t27b): parser and deps_card pass now, notebooklm is blocked by its bench block, cap 129 -> 127 (Closes #10897)

The lazy-body rule of this PR lets specs/compiler/parser.t27 and
specs/t27f/deps_card.t27 pass under t27b (the ratchet read UNEXPECTED PASS
for both) and moves notebooklm.t27's first blocker from "type mismatch"
to BenchBlock (MOVED, a finding the ledger steward refuses). Rows and cap
are recounted: 127 not-pass rows, cap 127. Same shape as #10862.

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

---------

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag pushed a commit that referenced this pull request Oct 19, 2026
The constant rule of this PR lets specs/lsp/schema.t27 pass under t27b (the
ratchet read UNEXPECTED PASS for it, "ledger blocked (type mismatch), now
pass"). The row and the cap are recounted from the current file: 127 not-pass
rows, cap 127. Same shape as #10862 and #10999.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 19, 2026
…ached body; a local of an undeclared type keeps its refusal (Closes #10899, #10903, #11053) (#11046)

* t27b: a module constant nothing analyzed reaches is lazy like an unreached body -- ConstDecl and ConstDecl(slice) refusals are withdrawn (Closes #10899, Closes #10903)

WIP checkpoint. ast_shape.t27 analyzed marks the constants a root or a reached fn or constant mentions
(constants are no longer roots); lazy_sig_plan.t27 const_plan decides which refusals of an unreached
constant are Sema's (the body rule, but an annotation Zig cannot read keeps the refusal); the glue
eager_const withdraws them into the same held list restore_held returns when AstGen refuses the file.

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

* t27b: the tuple-const and hw exemptions of the eager constant pass are subsumed by the constant reach -- hand lines net 0 (Closes #10899, Closes #10903)

unreferenced_tuple_const skipped an untyped list constant nothing names, and the hw set skipped the
constants only the hardware reads. The reach of ast_shape.t27 analyzed now says which constants an
analyzed root can name, and eager_const withdraws the Sema-level refusals of the rest, so both are
gone. The hw rule moves into the reach: a hardware-only constant is never reached, whoever names it,
exactly as before (without that guard ddr3_head_bandwidth, ddr3_ternary_matvec and eth_top_ax7203
turned from pass to FnDecl(reference not yet implemented)). The repository corpus (2,438 specs) has
identical per-test verdicts with the base binary except the three files that newly decide:
lsp/schema.t27 (blocked -> pass), port/scripts/gen_w683.t27 (blocked -> two failing tests t27c also
fails), and the new lazy_const fixture. The Rust test and the glue are written in fewer lines.

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

* t27b: a local of a type declared nowhere keeps its refusal in a fn no test reaches (Closes #11053)

AstGen resolves every name in a body, reached or not, so fn f() { var x : Missing = 0; } is "use of
undeclared identifier 'Missing'" whether or not a test calls f (t27c test-report: BLOCKED). Since #10999
body_plan withdrew its refusal (type (undeclared)) as a Sema-level one and t27b passed the spec. body_plan
now keeps it, which also keeps it for a constant (const_plan). Negative control: the plan spec's test,
and a mutant of conformance/lazy_signature.t27 in cli/t27b/tests/tail.rs (refused by t27b, BLOCKED by
t27c). The hand lines stay net <= 0: a comment line of arraylit.rs about the removed tuple-const skip goes.

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

* ledger(t27b): schema.t27 passes now, cap 128 -> 127 (Closes #10899)

The constant rule of this PR lets specs/lsp/schema.t27 pass under t27b (the
ratchet read UNEXPECTED PASS for it, "ledger blocked (type mismatch), now
pass"). The row and the cap are recounted from the current file: 127 not-pass
rows, cap 127. Same shape as #10862 and #10999.

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

---------

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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 ledger: #10380's hslm_corpus and hslm_tokenizer are unlisted, and the ledger is at its cap -- every PR's t27b-native-ratchet is red

1 participant