Skip to content

t27b: the greedy blockers order, its replay and FNV-1a come from specs/tri/t27b/blockers.t27 (Closes #7673) - #7679

Merged
gHashTag merged 1 commit into
masterfrom
port/t27b-blockers
Oct 8, 2026
Merged

gHashTag merged 1 commit into
masterfrom
port/t27b-blockers

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #7673. Port slice of #6198 (t27b written in t27), under #6063 and #5980.

What moved, and why this part

cli/t27b/src/blockers.rs is mostly I/O. It spawns and times out processes, runs the reference path (t27c test-report), and reads and appends that path's cache file. Its text parsers build Strings. The blocker names themselves (ExprCall(@abs), type u128) come from lower.rs, not from this file.

Its pure decision logic was three functions, and this PR moves all three into specs/tri/t27b/blockers.t27:

  • greedy: the set-cover order of t27b corpus --blockers;
  • replay: an order's cumulative count over another list of files;
  • fnv64: FNV-1a 64, the hash behind every reference-cache key.

In the spec, the files are the rows of a 0/1 matrix over the constructs, numbered in name order. The tie-break order is unchanged: files unlocked, then the progress score (summed in file order, so the f64 sums are bit-identical), then the files needing the construct, then the name.

t27c gen-rust writes gen/rust/tri/t27b/blockers.rs, which is mounted with #[path] in blockers.rs. The hand-written bodies are deleted. The glue names the constructs and lays out the matrix. The public signatures stay, so main.rs, tests/blockers.rs and tests/refcache.rs do not change.

Lines

lines
hand Rust deleted (cli/t27b/src/blockers.rs) 69
hand glue added (cli/t27b/src/blockers.rs, the only foreign file) 26
net hand Rust -43 (719 -> 676)
generated (gen/rust/tri/t27b/blockers.rs) 106
.t27 (specs/tri/t27b/blockers.t27) 410
seal (.trinity/seals/t27b_T27bBlockers.json) 20

The AGENTS.md remainder line goes from 14919 plus 7874 to 14876 plus 7874 (wc -l).

Gate

Both gates were run on the t27c lab with master's gen/c/policy/own_language.c, the same way as lefthook.yml.

  • check_budget on git diff --numstat --no-renames origin/master...HEAD: exit 0. That is 26 added foreign lines in one file.
  • check_all with origin/master:tools/policy/foreign-exceptions.txt: exit 1, cli/t27b/src/blockers.rs: hand-written .rs is forbidden. The file is not on the exception list.

Evidence that nothing changed

  • Oracle. Every order, count and hash in the spec's 15 tests was printed by the hand-written greedy, replay and fnv64 (master 0fbb0a0, t27c Railway lab).

  • t27c test-report. 15 of 15 pass, 0 vacuous.

  • tri mutate spec. 62 mutants:

    • 55 killed, 0 survived;
    • 6 hung, each a dropped loop step that makes its loop endless;
    • 1 unviable: zig rejects replay with an empty body.
  • Seal. t27c seal --save, then --verify: all hashes MATCH. gen_hash_rust equals the committed generated file.

  • Differential (t27c lab, a throwaway test that is not committed). Master's hand-written greedy, replay and fnv64, copied verbatim, against the generated ones, on:

    • 50000 random file lists (295384 greedy steps), with replays over other lists and over reversed orders;
    • 2000 byte strings;
    • the 519 blocked files of the lab's corpus run (167 constructs), plus their 54-file reference-ok subset.

    Every result is identical.

  • cargo test --release -p t27b --test blockers --test refcache on the t27c lab: 17 passed.

t27b lab corpus runs

I ran two private runs of the deployed harness on the t27b Railway lab, at the same base and with the same settings:

  • the harness is /opt/t27b-lab/lab.py, lab_run;
  • each run has its own T27_WORK and T27_SRV under /tmp;
  • T27_JOBS=12 and T27_REFERENCE_JOBS=3;
  • the corpus step is qemu-aarch64 t27b corpus specs --json --runner qemu-aarch64 --timeout-ms 60000 --jobs 12, and the reference is t27c test-report with zig 0.16.0.
master ef26684 head 94db5f4
files 1578 1579
pass 894 895
pass_vacuous 151 151
blocked 511 511
fail 18 18
timeout 4 4
mismatch 0 0
reference pass 1093 1094
reference disagree 0 0
cargo test t27b (aarch64) 132 passed, 0 failed 132 passed, 0 failed
  • File by file. The 1578 common files are identical in every field: verdict, reference verdict, the full blocker list, tests, invariants, asserts, per-test verdicts and reference disagreements.
  • Timeouts. The same 4 fpga testbenches time out on both sides.
  • The one new file. specs/tri/t27b/blockers.t27 passes in t27b itself (15 tests, 86 asserts) and in the reference. It is unlisted in the ledger, as a64.t27 and macho.t27 are, so the ledger is untouched.
  • Public master run. The lab's scheduled run of master ef26684 (https://t27b-lab-production.up.railway.app/runs/ef26684a1419b31a90c564f303d21998e723224a.json) has the same summary as the private master run.

gen-rust gaps

No new gaps. One known gap shaped the design: a read-only slice parameter other than []const u8 becomes an owned Vec. So replay takes its order as []const usize and the glue moves a fresh Vec<usize> in. The other slices are &[u8] (read-only bytes) or &mut [T] (written).

🤖 Generated with Claude Code

Owner approval (owner-approved-foreign)

  • Who and when. The owner (account gHashTag) applied the owner-approved-foreign label to this PR on 2026-10-08 at 04:44:26Z. The owner did it from their own terminal (gh pr edit 7679 --add-label owner-approved-foreign), after being asked in the working session whether to approve the edit to cli/t27b/src/blockers.rs.
  • Why the label is needed. That file is not on tools/policy/foreign-exceptions.txt.
  • What it does not change. The budget is unchanged: 26 added hand-written lines in one file, 69 deleted, and check_budget() exits 0.

…s/tri/t27b/blockers.t27 (Closes #7673)

Port slice of #6198. cli/t27b/src/blockers.rs is mostly I/O (processes,
the reference runner, its cache file); its pure decision logic was greedy,
replay and fnv64. They are now specs/tri/t27b/blockers.t27 (15 tests, every
expected value printed by the hand-written Rust on master 0fbb0a0), and
gen/rust/tri/t27b/blockers.rs is its t27c gen-rust output, mounted with
#[path]. The hand-written bodies are deleted; the glue names the constructs
in name order and lays the files out as rows of 0/1 for the spec.

blockers.rs: 26 lines added, 69 deleted (719 -> 676). The public
signatures stay, so main.rs and the tests do not change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) October 8, 2026 04:38
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-08 04:38:58 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)=39fa3908f9fd != 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 added the owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR label Oct 8, 2026
@gHashTag
gHashTag merged commit f917561 into master Oct 8, 2026
40 of 42 checks passed
@gHashTag
gHashTag deleted the port/t27b-blockers branch October 26, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved-foreign Owner-approved exception to the only-t27 rule: hand-written foreign code allowed in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

t27b: the greedy blockers order, its replay and FNV-1a come from specs/tri/t27b/blockers.t27 (port slice of #6198)

2 participants