Repository navigation
t27c: test-report exits non-zero on FAIL or BLOCKED (Closes #7370) - #8152
Conversation
`t27c test-report <spec>` returned Ok on every path, so it exited 0 when a test failed and when the spec was BLOCKED. The rule now lives in specs/compiler/test_report_exit.t27 (7 tests, 1 invariant, sealed) and reaches t27c through `t27c gen-rust` (bootstrap/gen/rust/compiler/ test_report_exit.rs): exit 2 when BLOCKED, 1 when a test FAILs, 0 otherwise. The report's text is unchanged. `--all` stays a census at 0. T27C_TEST_REPORT_EXIT_ZERO=1 keeps the old exit for callers that read the report's words and take any non-zero exit for a broken tool; an error that prints no report still exits 1. Callers adapted in this commit: - cli/t27b/src/main.rs sets it, so the reference runner in blockers.rs does not cache a failing spec as BLOCKED; - contrib/railway/t27b-lab/lab.py sets it for its reference runs; - tools/queen/criteria_backfill.py run_check sets it, so a `grep -c BLOCKED` criterion is not failed by a red test; - spec-guards.yml score() sets it: under `set -euo pipefail` the assignment h=$(score ...) would end the step at the first red spec. Tests: bootstrap/tests/test_report_timeout.rs checks 0/1/2, the opt-out, an error under the opt-out, and that the generated copy matches its spec; the looping-test case now expects exit 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
#7370) The native ratchet on this PR counted 1077 / 1236 over 1720 files, one file and one pass above master in the same window, with "reference disagree 0": the new spec runs and passes on t27b, and the reference path (t27b's blockers.rs under T27C_TEST_REPORT_EXIT_ZERO=1) still reads every report. Its row goes in as "pass" instead of staying unlisted; counts are derived (#7862), no header moves. scripts/ci/test_a_t27b_spec_cannot_move_silently.py fails the same way with and without this row (on master too), so it is not this PR's. phi^2 + 1/phi^2 = 3 | TRINITY Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
|
I've pushed the spec's ledger row as Generated by Claude Code |
…Refs #8141, Closes #7370) master stores max_not_pass 26 over 25 non-passing rows, so scripts/ci/test_a_t27b_spec_cannot_move_silently.py ("the cap equals reality") and with it loop-tools-tracked are red on master and on every PR's merge with it; t27b-native-ratchet also reports the missing self_attention.t27 row as UNLISTED. #8143 puts the row back (the same row master had before #8059); this is that one line, byte-identical, so it no-ops once #8143 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
1 similar comment
PR DashboardGenerated at: 2026-10-09 12:05:40 UTC
Summary
Seal Status
|
bootstrap/src/main.rs: both sides added a generated module after independence.rs -- test_report_exit (this PR) and seal_identity / silicon_queue (#8095) -- so both are kept. docs/reports/ t27b_expectations.json is master's (#8173: cap 21, self_attention.t27 passes; #8143 closed) plus this PR's test_report_exit.t27 "pass" row; the self_attention "blocked" row ported from #8143 is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
) `tri harness scratch --gate` failed on this PR: test_report_timeout.rs now holds 3 tests, and the timeout test named its directory by the pid alone (t27-test-timeout-{pid}), the exit test likewise. One scratch() helper, pid AND counter, like the other bootstrap tests: the pid separates runs, the counter the tests of one run. cargo test -p t27c --test test_report_timeout: 3 passed; tri harness scratch --gate and --self-check: rc 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
|
Two checks are red on 9678dc9. Neither comes from this PR; both come from master.
Neither check is one of the required four. This head also fixes this PR's own red check, Generated by Claude Code |
PR DashboardGenerated at: 2026-10-09 15:00:39 UTC
Summary
Seal Status
|
… (Refs #8222, Closes #7370) test-ratchet was red on this PR (and on master): #8054 deleted 22 empty spec stubs, but proofs/lean4/Trinity/IcarusLowerable/Completeness.lean still modelled them, so corpus_classifier_matches_lean_completeness found 26 envs without specs. #8223 fixes it; this is its two files, byte-identical to its head ad0b510, so it no-ops once #8223 lands. cargo test -p t27c --test icarus_lowerable corpus_classifier_matches_lean_completeness: ok. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
PR DashboardGenerated at: 2026-10-09 15:21:04 UTC
Summary
Seal Status
|
Pull Request Checklist
Closes #7370cargo test --release -p t27c(3000 pass, 0 fail),cargo test --release -p t27b(134 pass)t27c seal specs/compiler/test_report_exit.t27 --save(7/7 tests;--verify: all hashes MATCH; no twins)Description
t27c test-report <spec>exited 0 even when a test FAILed or the report was BLOCKED (every path ofrun_test_reportreturned Ok). Now, once the report is printed:testblockstdout is byte-for-byte the same.
--all(the census of the whole tree) keeps exit 0. An error that prints no report still exits 1 (not a file) or 2 (usage error); neither prints the--- test report:line.Spec first: the rule is
specs/compiler/test_report_exit.t27(7 tests, 1 invariant, sealed). t27c runs it throught27c gen-rust(bootstrap/gen/rust/compiler/test_report_exit.rs, mounted with#[path]like theverified/*rules), and a test fails if the copy drifts from the spec. The wording follows the "the exit agrees" rule in #7400'sspecs/tri/test/report.t27; this PR does not depend on #7400, and #7400'sverdict(text, exited_ok)already reads a red report with a non-zero exit as that red verdict.Opt-out:
T27C_TEST_REPORT_EXIT_ZERO=1(exactly "1") gives the exit of before this change on every printed report, for callers that read the words and take any non-zero exit for a broken tool. It is an environment variable, not a flag, so t27b can ask once for every test-report it spawns, and a t27c from before this change ignores it.Changes
specs/compiler/test_report_exit.t27- the rule (new),.trinity/seals/compiler_CompilerTestReportExit.json- its sealbootstrap/gen/rust/compiler/test_report_exit.rs-t27c gen-rustoutput (force-added under thegen/ignore, like its siblings)bootstrap/src/main.rs-run_test_reportexits by the generated rule after printing; help text names the codesbootstrap/tests/test_report_timeout.rs- new tests; the looping-test case now expects exit 1Every caller (grep for
test-reportover the whole repo)cli/t27b/src/blockers.rsreference runner (used byt27b corpus --reference,t27b-native.yml,scripts/tri_loop/t27b*.py)c.code == Some(0), else BLOCKED and cachedblocked: t27c test-report exited Some(1)cli/t27b/src/main.rssets the opt-out at start. blockers.rs is not on the exception list, so it is not edited; it could read the new codes directly once someone may edit itcontrib/railway/t27b-lab/lab.pyreference_onereturncode != 0-> blockedtools/queen/criteria_backfill.pyrun_check(alsotools/bees/reviewer.pymeasure_criteria)t27c test-report X 2>&1 | grep -c BLOCKEDprints0criterion would fail on a spec that builds but has a red test.github/workflows/spec-guards.ymlaffected-specsscore()set -euo pipefail;h=$(score f)T27C_TEST_REPORT_EXIT_ZERO=1inscore(); a t27c error still ends the step.github/workflows/xilinx7-l3-bench.yml:59t27c test-report ... | tee, thengrep -q 'FAIL 0'bash -e, no pipefail: the pipe's status is tee'stools/queen/feed_untested.py,feed_empty_bodies.py,feed_roadmap.py,feed_defects.pybee_shell=bash -c, stdout only; criteria text| grep -c BLOCKEDtools/check_seal_coverage.py:332t27c test-report <spec> && t27c seal <spec> --save&&now stops on a red spec, as the advice meantbootstrap/src/main.rssealtest_report::runin-processseal_refuses_failing_testsandseal_reseal_is_stablepassbootstrap/tests/string_eq_zig.rsbootstrap/tests/test_report_timeout.rscli/trion masterscripts/tri_loop/toolbelt.py,t27b_reduce.py,docs/BEE_TOOLBELT.md, the providers-steward skilldocs/ROADMAP_BRIEF.md:208Outside this repo: 999-multibots-telegraf
scripts/check-t27-specs.mjsusesexecFileSync, which throws on a non-zero exit; itscatchalready readse.stdoutand judges the table, so it keeps working. Not changed here.Files beyond the issue's Boundary: the spec, its generated copy and seal (spec first),
bootstrap/tests/test_report_timeout.rs(tests),cli/t27b/src/main.rsandspec-guards.yml(callers the issue's list did not name),docs/ROADMAP_BRIEF.md(prose).Testing
the_exit_code_says_what_the_report_saysfails on master's main.rs ([[0,0,0],[0,0,0],[0,0,0]]vs[[0,1,2],[0,1,2],[0,0,0]]) and passes here; with zig absent it expects 2 for every spec, and passes that way too. Negative controls: the opt-out row is 0 before and after, and a missing file is 1 under the opt-out.the_exit_rule_copy_is_what_gen_rust_writesguards the generated copy.failed > 1, BLOCKED judged after FAIL,opted_outwithout the length check, opt-out only when blocked,EXIT_BLOCKED = 1, the green return madeEXIT_FAILED) - all 6 red.cargo test --release -p t27c: 3000 pass, 0 fail (zig 0.16.0).cargo test --release -p t27b: 134 pass.pass / fail (1 of 2 tests fail) / blocked (does not compile ...); master's t27b givespass / blocked (t27c test-report exited Some(1)) / blocked (exited Some(2))- the defect the opt-out prevents.run_checkwith this t27c: red specgrep -c BLOCKED-> passed (0), BLOCKED spec -> failed (1), missing file -> failed ("exits 1"); master'srun_checkwith this t27c fails the red spec ("exits 1").score()underset -euo pipefailwith this t27c: old form ends the step on the red (rc 1) and BLOCKED (rc 2) specs; new form scores 1 and 1000000 and still ends the step on a missing file.scripts/ci/test_*t27b*.py: 5 of 6 pass;test_a_t27b_spec_cannot_move_silently.pyfails one ledger check ("the cap equals reality (26, cap 27)") identically on master be97577, not touched here.criteria_backfill.py --self-test,reviewer.py self-test: 0 failures.tools/ci/check_specs_still_parse.py: ok.tools/check_json_parses.py: OK.t27c seal ... --verify: all hashes MATCH.Review Notes
cli/t27b/src/blockers.rscannot be edited without the owner's label. Reading the codes there (0/1/2 with the report line = a verdict) would let t27b drop the opt-out later.--- test report:line as the way to tell them apart.Closes #7370
🤖 Generated with Claude Code
https://claude.ai/code/session_01ScHVrGSr6zZUdwkdC8DR9k
Generated by Claude Code