Skip to content

ci(l2): a regenerated gen/ file passes when t27c reproduces it byte for byte (Closes #6226) - #6253

Merged
gHashTag merged 1 commit into
masterfrom
claude/l2-regen-aware
Oct 4, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/l2-regen-aware

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Closes #6226

What changed

.github/workflows/l1-traceability.yml, L2 step, two defects:

  1. A regenerated gen/ file was read as a hand edit (feat(t27b): tri t27b ready -- the steward's merge gate decided in steward.t27 #6246, run 37226756132). New tools/l2_regen_check.py: for each modified gen/<backend>/<path>.<ext> it runs t27c gen-<backend> specs/<path>.t27 (the mapping t27c gen-c is fed; stdout is the file) and compares bytes.
    • equal bytes -> regenerated, pass
    • different bytes, no spec at specs/<path>.t27, unknown backend, t27c error -> FAIL
    • no t27c (build failed) -> prints not checked, FAIL
  2. A stale branch was charged with master's gen/ changes (feat(t27b): fixed-size arrays [N]T -- literals, indexing, .len, for (Closes #6245) #6247, master's c5406e6). The list was origin/master..<PR head> (two dots); it is now origin/master...<PR head> (three dots, from the merge base).

The first L2 step now only lists modified gen/ files. actions/cache (restore-keys fall back to queen-doctor's cargo-doctor- cache) and cargo build --release -p t27c run only when the list is non-empty, so a PR that does not touch gen/ pays nothing extra.

Mutation control (local t27c, scratch worktrees, same tool)

== A: spec changed + gen regenerated by t27c
  regenerated  gen/c/tri/t27b/steward.c: t27c gen-c specs/tri/t27b/steward.t27 reproduces it byte for byte
exit=0
== B: same, plus one hand-edited byte (code)
  HAND EDIT    gen/c/tri/t27b/steward.c: differs from t27c gen-c specs/tri/t27b/steward.t27 at byte 15189 (15249 bytes in tree, 15249 generated)
exit=1
== B': same, hand-edited byte in the header comment
  HAND EDIT    ... at byte 108
exit=1
== C: regenerated file, no t27c
  not checked  gen/c/tri/t27b/steward.c: no t27c to regenerate it with
exit=1
== F: gen file with no spec
  HAND EDIT    gen/c/vsa/core.c: no spec at specs/vsa/core.t27
exit=1
== H: stale branch touching no gen/ file, master changed steward.c after the branch point
  two dots (old):   M gen/c/tri/t27b/steward.c
  three dots (new): ok: no gen/ file modified
exit=0

Census (Q12)

Re-blessed in this commit: shell run: steps 286 -> 287 (the build-and-compare step); quiet failure branch passes 15 -> 14 (the old git diff 2>/dev/null | grep || echo "" passed when git diff itself failed). tri census pin --gate is clean after the bless.

Cost when it runs

Measured on other workflows' cargo build --release -p t27c steps: ~48 s warm cache (queen-doctor, 2026-09-28), ~3.5-4.5 min cold (queen-doctor 2026-09-21, spec-guards 2026-09-16).

🤖 Generated with Claude Code

…or byte (Closes #6226)

The L2 step failed every modified gen/ file, including ones regenerated
from a spec changed in the same PR (#6218, #6246). tools/l2_regen_check.py
now runs `t27c gen-<backend> specs/<path>.t27` for each modified
gen/<backend>/<path>.<ext> and passes only on equal bytes. No spec, a
t27c error or different bytes fail; no t27c is "not checked" and fails.
t27c is built (with a cargo cache) only when the diff modifies gen/.

Same step, second defect: the list was `origin/master..<PR head>` (two
dots), so a branch cut before master changed a gen/ file was charged with
master's change (#6247, c5406e6). It is now three dots, from the merge
base.

Census re-blessed: shell `run: steps` 286 -> 287 (the new build-and-compare
step); quiet `failure branch passes` 15 -> 14 (the old
`git diff 2>/dev/null | grep || echo ""` passed when git diff failed).

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

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-04 20:08:46 UTC

Summary

Status Count
Total Open PRs 47
PRs with Failing Checks 31
PRs with All Checks Green 16
READY 12
FAILING 31
PENDING 0
NO CHECKS YET 0

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8597b6ded596 != 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.

L2 gate: a regenerated gen/ file is read as a hand edit

1 participant