Skip to content

test(dl): pin the free_mnd_to_vec Suspend(None) panic message (#312) - #381

Merged
tsondru merged 2 commits into
mainfrom
audit/G9-T3
Aug 31, 2026
Merged

test(dl): pin the free_mnd_to_vec Suspend(None) panic message (#312)#381
tsondru merged 2 commits into
mainfrom
audit/G9-T3

Conversation

@tsondru

@tsondru tsondru commented Aug 31, 2026

Copy link
Copy Markdown
Member

Closes #312.

What changed

  • catgraph-dl/tests/free_monad_bijections.rs (+20/−1, git diff --stat 23e8a0a..HEAD): new test free_mnd_to_vec_panics_on_bare_suspend_none#[should_panic(expected = "non-canonical Free value")] on a bare Free::<ListEndo<u32>, ()>::suspend(None) — plus its module-doc taxonomy item; the taxonomy header's stale hand-maintained count ("Six", against 7 items at base 23e8a0a and 8 after this branch's addition — round-1 reviewer's git show trace) 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 the free_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] / Changed referencing 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 -r copies:

Perturbation (list_endo.rs::free_mnd_to_vec) Compiles? Named test Observed
panic text "non-canonical" → "malformed" yes RED panic message: "…malformed Free value." vs expected substring: "non-canonical Free value"
panic!return (items, Default::default()), signature unchanged no n/a E0277: the trait bound Z: Default is not satisfied — the issue's adjusted-scope premise ("a silent-return regression cannot compile today") measured, not assumed
signature widened to Z: Default, silent return yes RED test did not panic as expected — the pin catches the future-signature-change path the issue names

In 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-dir rule 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 — 147 test result: lines, all ok, none FAILED (log kept as the measured-claims input)
  • cargo nextest run -p catgraph-dl — 103 passed / 0 failed at 6c414bb (the tip commit is one //! line; its tier gates — fmt, clippy — clean at 74a5c58)
  • cargo clippy -p catgraph-dl --all-targets -- -D warnings clean on default, --no-default-features, --features ad, --features serde, --all-features (at 6c414bb; default lane re-run at 74a5c58)
  • RUSTDOCFLAGS="-D warnings" cargo doc -p catgraph-dl --no-deps clean; cargo fmt --all --check clean
  • scripts/check_measured_claims.py — "guard ok: 44 citation site(s) across 20 key(s) match 24 measured fact(s)"
  • check_audit_counts.py not run: the diff touches none of the four audit docs it checks

What the row got wrong about the tree

Nothing: all six premises AGREE (premise-verify herder report /tmp/audit-reports/G9-T3/premise-verify.md — zero should_panic crate-wide, panic site/message/rustdoc at the cited lines, no coverage added by the interim G9-T2 landing).

🤖 Generated with Claude Code

tsondru and others added 2 commits August 31, 2026 17:04
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>
@tsondru
tsondru merged commit fb8426b into main Aug 31, 2026
6 checks passed
@tsondru
tsondru deleted the audit/G9-T3 branch August 31, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dl: documented Suspend(None) panic contract has zero should_panic pins

1 participant