Repository navigation
tri mutate census --dir D: one exit and one killed share for a directory, rules in t27 (Closes #7433) - #7475
Merged
Merged
Conversation
…7433) Slice 1 of #7433: specs/tri/mutate/census.t27 states how a directory of specs gets one exit code and one killed share, before the command that runs the per-spec loop. - census_exit folds the specs' exits: no verdict (1, or any code no rule names, such as the lab's 3/4/5) -> 1; else a failed gate (2) -> 2; else 0. - killed_tenths: killed of judged (killed + survived + hung) in tenths of a percent, rounded down, so 100.0 means no survivor. Hung is not killed, unlike Stryker's timeout-as-detected; unviable is not judged. On the lab (master 05e633d): backends exit 0, test-report 10/10 with 0 vacuous, tri mutate spec 25 of 25 killed, 18 hand mutants killed, three negative controls fail as expected. The fold test uses the gated census of specs/queen/ from the same lab run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efs #7433) Slice 2a of #7433. `tri mutate census` will sum each spec's counts from the line `tri mutate spec` prints; reading that line is a rule, so it lives in specs/tri/mutate/census.t27 and reaches the command through gen-rust. - after_count / is_summary_line: the whole line, 7 counts of 1..18 digits. - count_at: the n-th run of digits; COUNT_KILLED..COUNT_UNVIABLE name them. - summary_adds_up: killed = by test + by invariant, and mutants = the four counts, as spec_report puts each mutant in exactly one. Fixtures are the 9 summary lines of the 2026-10-07 census of specs/queen/; summed they give 783/54/7 and 92.7. On the lab: 15/15 tests, 0 vacuous; mutate --fn per new function 27/29 (2 hung: dropped loop steps), 2/2, 13/13, 8/8; 15 hand mutants all killed. One survivor of the first count_at run was a dead early return, now removed. iverilog refuses the string functions (#2433); the elab ratchet covers the fpga set only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#7433) Slice 2b of #7433. `tri mutate census --dir D <args>` runs `tri mutate spec --file F <args>` on each .t27 directly in D, in name order, one child process per spec, and prints one exit and one killed share for the directory. Every argument after --dir goes to each run as typed, as the issue writes it (`--dir specs/queen --accepted F`); a `--` before them works too. `--lab` for a directory moved to #7471. Every rule is in specs/tri/mutate/census.t27, lowered by `t27c gen-rust` into gen/rust/tri/mutate/census.rs and loaded as a #[path] module, as cli/t27b loads check_budget.rs. The hand-written Rust is 40 added lines of cli/tri/src/mutate.rs (git diff --numstat): list, spawn, split lines, print. Two rules added for cases that were silent 0s: - spec_read: a summary line whose counts do not add up -> no verdict (1). - census_of: a census of no spec -> 1 (PIT failWhenNoMutations). gen-rust lowers a string parameter to &'static str, so the glue leaks each spec's stdout once, as `t27c asm` does: #7449. Lab (tri of master 05e633d plus this change): census of specs/queen with the slice-1 accepted file exits 1, 783 of 844 killed, 92.7% of judged, 54 survived, 7 hung, every per-spec exit equal to the hand census; the same with and without `--`. The issue's controls on a copy of priority.t27: one accepted line removed -> exit 2 and that line printed; a spec beside it that does not compile -> exit 1 and the spec named. test-report 17/17, cargo test -p tri mutate:: 56 passed. Negative controls (planted N+1 in spec_report; glue without spec_read; glue without census_of) each change the exit as the NOW entry records. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 7, 2026 10:25
This was referenced Oct 7, 2026
Closed
This was referenced Oct 7, 2026
This was referenced Oct 7, 2026
Closed
This was referenced Oct 7, 2026
Contributor
This was referenced Oct 7, 2026
Merged
Merged
corpus: judge 26 new type conflicts from the port batches; types ledger 84 -> 110 (Refs #5906)
#7482
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7433
What
tri mutate census --dir D <args>: runstri mutate spec --file F <args>on each.t27directly inD, in name order, and prints one exit and one killed share for the directory. Every argument after--dirgoes to each run as typed (--accepted F --jobs 8); a--before them works too.How the rules reach the binary
All rules are in
specs/tri/mutate/census.t27(12 functions, 17 tests, 2 invariants), in three commits:mutate spec's summary line;spec_read), and a census of no spec exits 1 (census_of).t27c gen-rustlowers the spec togen/rust/tri/mutate/census.rs.mutate.rsloads that file as a#[path]module, the same waycli/t27bloadscheck_budget.rs. The hand-written Rust is 40 added lines ofcli/tri/src/mutate.rs(git diff --numstat). They list the directory, spawn the runs, split stdout into lines and print.Checked on the Railway lab
Built from master 05e633d plus this change. The full record is in
docs/now/2026-10-07-mutate-census-rules.md.The spec
t27c test-report: 17/17 pass, 0 vacuous.The census of
specs/queen--.The issue's controls, on a copy of
priority.t271 NOT ACCEPTED.Negative controls, one rebuild each
spec_reportplanted to print N+1 mutants: the spec gives no verdict.spec_read: exit 0 and "0 of 0" (the silent 0 thatspec_readstops).census_of, on an empty directory: exit 0 (the silent 0 thatcensus_ofstops).Build and tests
cargo test --release -p tri mutate::: 56 passed.Known limits, filed
stringto&'static str, so the glue leaks each spec's stdout once: gen-rust: a string parameter lowers to &'static str, so every host must leak its input #7449.--dirmakes each run exit 2, the code of a failed gate: tri: a clap usage error exits 2, the same code as the survivor gate's failure #7334.--lab(one lab job for a directory): tri mutate census --lab: one lab job for a directory of specs #7471.mutate.rsstill hand-copies the survivor gate and the lab rules; replacing them with gen-rust modules is tri mutate: load survivors.t27 and lab.t27 through gen-rust, drop the hand copies #7472.🤖 Generated with Claude Code