Skip to content

feat(t27b): --check interpreter fuel per file, policy in check_budget.t27 (Closes #6664) - #6695

Merged
gHashTag merged 9 commits into
masterfrom
claude/t27b-check-budget-6664
Oct 6, 2026
Merged

gHashTag merged 9 commits into
masterfrom
claude/t27b-check-budget-6664

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Closes #6664
Refs #6063

Owner approved 2026-10-06: fix #6664, policy written in .t27 (translated); hand-written Rust is the call-site glue only; debt #6198/#5980

What

t27b test --check gave the reference interpreter 50,000,000 steps per test. Under qemu on the lab one fuel-bound test costs about 31 s and proves nothing (Stop::Fuel counts as agreement, runtime asserts unknown), so kernel_fib, kernel_matmul, kernel_ternary and d_g22_test exceed the 60 s corpus timeout.

  • Policy, in t27: specs/tri/t27b/check_budget.t27. One interpreter budget per file, FILE_FUEL = 20,000,000 steps (about 12.3 s under qemu at the measured 614 ns per step), capped per test at the existing 50,000,000. 12 tests, 3 invariants. The four measured cases of t27b lab: 4 ratchet UNEXPECTED FAILUREs are --check interpreter fuel under qemu, not regressions #6664 are test vectors: under the old per-test fuel each one predicts the measured timeout (112 / 105 / 115 / 65.8 s), and under FILE_FUEL each fits with a 25% margin (13.5 / 16.9 / 13.4 / 42.1 s).
  • Generated: gen/rust/tri/t27b/check_budget.rs = t27c gen-rust specs/tri/t27b/check_budget.t27, generated on the t27c Railway lab (master 44409dc), sha256 208a3d68...93b2.
  • Glue (hand-written Rust, owner-approved): cli/t27b/src/main.rs, 6 lines: the #[path] module, the per-file counter, and two calls (test_fuel, spend) around the existing Interp::call. The same #[path = "../gen/rust/..."] pattern is in bootstrap/src/ternary/mod.rs.
  • tools/policy/foreign-exceptions.txt: the entry for cli/t27b/src/main.rs, with its approval line.

Why a per-file fuel, not the other two options of #6664

  • Wall-clock budget from --timeout-ms: rejected. Whether the interpreter finishes would depend on host load (lab load average ~60-80 on 48 CPUs from neighbours), so a file's runtime asserts count, and with it pass vs pass_vacuous, could flip between two runs of unchanged code -- the drift t27b lab: 4 ratchet UNEXPECTED FAILUREs are --check interpreter fuel under qemu, not regressions #6664 reports. Fuel is deterministic.
  • Longer retry timeout in lab.py: rejected. It bounds nothing (the kernels need 105-115 s) and it is Python.

A file whose interpreter work ends within 20e6 steps sees no change. Past it, the remaining tests keep their JIT verdict and the file reports runtime asserts unknown, the same outcome Stop::Fuel already produced per test.

Checks

  • t27c lab, t27c test-report specs/tri/t27b/check_budget.t27: 12/12 pass, 3 invariants proved (comptime).
  • Mutation check: FILE_FUEL = 30e6 fails to compile (comptime invariant every_measured_case_fits); spend returning 1 instead of 0 fails 2 tests.
  • t27b lab run on this head: see the comment below.

🤖 Generated with Claude Code

….t27 (Closes #6664)

t27b test --check gave the reference interpreter 50e6 steps per test; under
qemu one fuel-bound test costs ~31 s, so kernel_fib, kernel_matmul,
kernel_ternary and d_g22_test exceed the 60 s corpus timeout while proving
nothing (Stop::Fuel counts as agreement).

The policy is specs/tri/t27b/check_budget.t27: one budget of 20e6 steps per
file (about 12.3 s under qemu), deterministic rather than wall-clock, with the
four measured cases of #6664 as test vectors and invariants. cli/t27b loads
its t27c gen-rust output gen/rust/tri/t27b/check_budget.rs; the hand-written
Rust is the call-site glue in cmd_test (6 lines), owner-approved 2026-10-06.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 07:10:25 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 40
PRs with All Checks Green 10
READY 10
FAILING 40
PENDING 0
NO CHECKS YET 0

Seal Status

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

This was referenced Oct 6, 2026
# Conflicts:
#	tools/policy/foreign-exceptions.txt
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 12:52:33 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 39
PRs with All Checks Green 11
READY 1
FAILING 39
PENDING 0
NO CHECKS YET 0

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

Seal Status

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

foreign-exceptions conflict resolved keeping both blocks (this branch's
main.rs entry and master's t27b_reduce.py entry); one-time entries for the
master-side #6826/#6847 mods, per the file's own mechanism; dedup with #6937.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) October 6, 2026 16:08
foreign-exceptions conflict resolved keeping both blocks (this branch's
one-time merge-route entries and master's #6046-52 selfhost fixtures).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 16:41:50 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 38
PRs with All Checks Green 12
READY 0
FAILING 38
PENDING 0
NO CHECKS YET 0

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=0ec05a8c1a46 != 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 and others added 2 commits October 6, 2026 23:45
foreign-exceptions conflict resolved keeping both blocks (this branch's
main.rs entry and master's #6444 native-arm64 workflow entries).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 17:07:06 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 35
PRs with All Checks Green 15
READY 0
FAILING 35
PENDING 0
NO CHECKS YET 0

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

Seal Status

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

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 17:16:53 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 35
PRs with All Checks Green 15
READY 0
FAILING 35
PENDING 0
NO CHECKS YET 0

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

Seal Status

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

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 17:47:09 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 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)=b23641f01baa != 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).

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 17:53:58 UTC

Summary

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

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

Seal Status

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

foreign-exceptions conflict resolved to master's permanent #6937 entries;
this branch's one-time merge-route block dropped (superseded on master).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 18:51:50 UTC

Summary

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

Seal Status

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

@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-06 19:43:07 UTC

Summary

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

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=b23641f01baa != 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 2f2d60f into master Oct 6, 2026
33 of 37 checks passed
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 lab: 4 ratchet UNEXPECTED FAILUREs are --check interpreter fuel under qemu, not regressions

1 participant