Repository navigation
feat(t27b): --check interpreter fuel per file, policy in check_budget.t27 (Closes #6664) - #6695
Conversation
….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>
# Conflicts: # tools/policy/foreign-exceptions.txt
PR DashboardGenerated at: 2026-10-06 12:52:33 UTC
Summary
Seal Status
|
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>
PR DashboardGenerated at: 2026-10-06 16:41:50 UTC
Summary
Seal Status
|
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>
PR DashboardGenerated at: 2026-10-06 17:07:06 UTC
Summary
Seal Status
|
PR DashboardGenerated at: 2026-10-06 17:16:53 UTC
Summary
Seal Status
|
PR DashboardGenerated at: 2026-10-06 17:47:09 UTC
Summary
Seal Status
|
PR DashboardGenerated at: 2026-10-06 17:53:58 UTC
Summary
Seal Status
|
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>
PR DashboardGenerated at: 2026-10-06 18:51:50 UTC
Summary
Seal Status
|
PR DashboardGenerated at: 2026-10-06 19:43:07 UTC
Summary
Seal Status
|
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 --checkgave 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::Fuelcounts as agreement,runtime asserts unknown), so kernel_fib, kernel_matmul, kernel_ternary and d_g22_test exceed the 60 s corpus timeout.specs/tri/t27b/check_budget.t27. One interpreter budget per file,FILE_FUEL = 20,000,000steps (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 underFILE_FUELeach fits with a 25% margin (13.5 / 16.9 / 13.4 / 42.1 s).gen/rust/tri/t27b/check_budget.rs=t27c gen-rust specs/tri/t27b/check_budget.t27, generated on the t27c Railway lab (master 44409dc), sha256208a3d68...93b2.cli/t27b/src/main.rs, 6 lines: the#[path]module, the per-file counter, and two calls (test_fuel,spend) around the existingInterp::call. The same#[path = "../gen/rust/..."]pattern is inbootstrap/src/ternary/mod.rs.tools/policy/foreign-exceptions.txt: the entry forcli/t27b/src/main.rs, with its approval line.Why a per-file fuel, not the other two options of #6664
--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'sruntime assertscount, 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.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 outcomeStop::Fuelalready produced per test.Checks
t27c test-report specs/tri/t27b/check_budget.t27: 12/12 pass, 3 invariants proved (comptime).FILE_FUEL = 30e6fails to compile (comptime invariantevery_measured_case_fits);spendreturning 1 instead of 0 fails 2 tests.🤖 Generated with Claude Code