fix(test): recorded failures are replayed again; a seed file no test reads fails the build
A failure a property test once found is kept as a seed and replayed on every run: that is what makes a fixed bug stay fixed. Proptest finds the seed file from the test's source path and says nothing when the file is not there, so a seed file left behind by a moved test is never read again, silently. Four findings, one cause: - The kernel bridge's three recorded failures (the constructive split with a short remainder, and two cash-application cases) sat in tests/kernel_bridge.proptest-regressions. Since0cf013b57the bridge is a folder (tests/kernel_bridge/main.rs), and a folder test reads tests/proptest-regressions/main.txt. The three had not been replayed since. Moved there. - K-U8 found a control-total case (a sum that touches Decimal's top, f = [0, -1, -79228162514264337593543950335, 0, 5]) and the seed was never checked in; it lay untracked in the unit's worktree. Added as tests/proptest-regressions/control.txt, where control.rs reads it. - ledger-mcp's proptest-regressions/local_files.txt recorded failures of a module removed inb26c099a6(files reach the books as uploads by hash now). No test can read it. Removed. - Nothing checked any of this. tests/seed_files.rs walks every crate and fails when a seed file has no property test that reads it. How the reading rule was established, not assumed: a marker line in each candidate file, and proptest's "unparsable line" warning names the file it really opens. With the seeds back, the bridge passes whole (101 tests), so nothing had regressed behind the gap. The guard was red before the move (it named both orphans) and is green after: 21 seed files, each read by a property test. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
0ef1ef2c22
commit
129a90dcf1
4 files changed
+175
-4
No files matched your search
+19
-3
@@ -42,9 +42,25 @@ CI: `.github/workflows/check.yml` runs `just check` on every push;
|
||||
`scheduled.yml` runs the proofs, the oracle, the coverage report and floor,
|
||||
and the fuzz targets weekly. Mutation ran there in shards until 2026-10-29 (`just mutants-mcp 3/16` runs the fourth of sixteen; GitHub stops a job at six hours), and is now local only (D-59). Test timeouts are three times each run's own baseline, never under the recipe's floor, so a slower runner doesn't report false timeouts. The viewer has no mutation job. Development mutation runs are paused until the P12 max-testing pass (D-33, 2026-10-20): each unit records its targets in a **For P12** paragraph instead. Mutation testing is a local run, not a CI job (the owner, 2026-10-29, D-59): the weekly shards were removed from `scheduled.yml`, and the "weekly" in the mutation rows above is history (the 2026-10-26 run: real survivors and timeouts in every crate, the debt P12 clears).
|
||||
|
||||
Seeds and failure databases: proptest's `*.proptest-regressions` files
|
||||
are checked in and replay on every run. The GnuCash oracle's books come
|
||||
from fixed seeds (`SEED` in `oracle_gnucash.rs`). Fuzz corpora live in
|
||||
Seeds and failure databases: proptest's seed files are checked in and
|
||||
replay on every run. Proptest finds a seed file from the test's source
|
||||
path, and says nothing when the file it looks for is not there, so a
|
||||
seed file left behind by a moved test is silently never read again.
|
||||
There are two places it reads. A test that is one file, `tests/x.rs`,
|
||||
reads `tests/x.proptest-regressions`. A test that is a folder,
|
||||
`tests/x/main.rs` with modules beside it, reads
|
||||
`tests/proptest-regressions/main.txt` for `main.rs` and
|
||||
`tests/proptest-regressions/<module>.txt` for `<module>.rs`; every
|
||||
folder test in a crate shares those files. A source file under `src/`
|
||||
reads `proptest-regressions/<path under src>.txt` at the crate root.
|
||||
When a test file becomes a folder, or a module moves, its seed file
|
||||
moves with it. `crates/ledger-core/tests/seed_files.rs` walks every
|
||||
crate and fails when a seed file has no property test that reads it
|
||||
(2026-11-09: the kernel bridge's three recorded failures had not been
|
||||
replayed since the bridge became a folder, and one found during K-U8
|
||||
was never checked in). When proptest writes a new seed file during a
|
||||
run, check it in with the fix. The GnuCash oracle's books come from
|
||||
fixed seeds (`SEED` in `oracle_gnucash.rs`). Fuzz corpora live in
|
||||
`fuzz/corpus/<target>`.
|
||||
|
||||
Golden review: `fixture_company.json` is hand-verified (docs/oracle.md,
|
||||
|
||||
Reference in new issue
Block a user