test(dl): pin the free_mnd_to_vec Suspend(None) panic message (#312) - #381
Merged
Conversation
Add a #[should_panic(expected = "non-canonical Free value")] test on a bare Free::suspend(None), a THEOREM_MAP not-a-law-test note, and the CHANGELOG bullet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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 #312.
What changed
catgraph-dl/tests/free_monad_bijections.rs(+20/−1,git diff --stat 23e8a0a..HEAD): new testfree_mnd_to_vec_panics_on_bare_suspend_none—#[should_panic(expected = "non-canonical Free value")]on a bareFree::<ListEndo<u32>, ()>::suspend(None)— plus its module-doc taxonomy item; the taxonomy header's stale hand-maintained count ("Six", against 7 items at base23e8a0aand 8 after this branch's addition — round-1 reviewer'sgit showtrace) dropped in favor of the per-item claim.catgraph-dl/tests/THEOREM_MAP.md(+9): a "Not a law test (dl: documented Suspend(None) panic contract has zero should_panic pins #312)" note excluding the pin from thefree_monad_bijections::*row, mirroring the file's own recursion-depth precedent (an engineering pin carries no paper anchor).catgraph-dl/CHANGELOG.md(+3): one bullet under[Unreleased] / Changedreferencing dl: documented Suspend(None) panic contract has zero should_panic pins #312, matching the four precedent audit-sweep test commits (git show --stat a43f6e1 646881f 68be9f4 24b5524— each carries one).Falsification
Impl round plus 2 executing review rounds, all perturbations in
cp -rcopies:list_endo.rs::free_mnd_to_vec)panic message: "…malformed Free value."vsexpected substring: "non-canonical Free value"panic!→return (items, Default::default()), signature unchangedE0277: the trait bound Z: Default is not satisfied— the issue's adjusted-scope premise ("a silent-return regression cannot compile today") measured, not assumedZ: Default, silent returntest did not panic as expected— the pin catches the future-signature-change path the issue namesIn every red row the new test was the only red of the file's 8 (review round 1, full-file reruns: 7 passed / 1 failed).
Review record
2 rounds (
rust-v2:falsifying-reviewer, sonnet), one per commit (git log --oneline 23e8a0a..74a5c58= 2 commits): findings 1 → 0 — tallies read off each round's reviewer report. The one finding (stale "Six consolidated tests" header over an 8-item list, drifted since two commits before this branch) fixed by dropping the count, verified true in round 2 by an 8-item ↔ 8-#[test]-fn bijection check. Round 1 also flagged a methodology hazard for the standing rules: a target-dir shared between a pristine tree and a perturbed copy silently reused a stale test binary — the per-agent--target-dirrule should be read as covering sequential pristine-vs-copy comparisons inside one review, not only concurrent agents.Gates (final tree
74a5c58)cargo test --workspace -- --nocapture— 147test result:lines, allok, noneFAILED(log kept as the measured-claims input)cargo nextest run -p catgraph-dl— 103 passed / 0 failed at6c414bb(the tip commit is one//!line; its tier gates — fmt, clippy — clean at74a5c58)cargo clippy -p catgraph-dl --all-targets -- -D warningsclean on default,--no-default-features,--features ad,--features serde,--all-features(at6c414bb; default lane re-run at74a5c58)RUSTDOCFLAGS="-D warnings" cargo doc -p catgraph-dl --no-depsclean;cargo fmt --all --checkcleanscripts/check_measured_claims.py— "guard ok: 44 citation site(s) across 20 key(s) match 24 measured fact(s)"check_audit_counts.pynot run: the diff touches none of the four audit docs it checksWhat the row got wrong about the tree
Nothing: all six premises AGREE (premise-verify herder report
/tmp/audit-reports/G9-T3/premise-verify.md— zeroshould_paniccrate-wide, panic site/message/rustdoc at the cited lines, no coverage added by the interim G9-T2 landing).🤖 Generated with Claude Code