Skip to content

docs(applied): rustdoc and CHANGELOG to contract statements (#365) - #367

Merged
tsondru merged 4 commits into
mainfrom
audit/G17-T3
Aug 26, 2026
Merged

docs(applied): rustdoc and CHANGELOG to contract statements (#365)#367
tsondru merged 4 commits into
mainfrom
audit/G17-T3

Conversation

@tsondru

@tsondru tsondru commented Aug 26, 2026

Copy link
Copy Markdown
Member

Terse-prose plan step 1 for catgraph-applied (+ CHANGELOG). Taskmap G17-T3, tracking #365.

Measured (rg -c "^\s*(///|//!)"): src/ 7159 → 5350 doc lines across 33 files (whole crate 10718 → 8909); CHANGELOG.md 2859 → 815 lines, 29 version sections, one bullet per change, the 11 <!--m:…--> figures byte-identical.

Production diff: 3 lines — one if let … && … let-chain collapse in prop/presentation/mod.rs (clippy collapsible_if, exposed when the comment between two nested ifs was deleted; no behaviour change). Everything else is comments, rustdoc, CHANGELOG, README.

False claims found in the old prose and fixed: CongruenceClosure "always returns Some" (three Ok(None) sites) and three sibling "decides equality" claims; a petgraph dependency that does not exist; a dead BrauerMorphism::non_crossing link (rustdoc + README); DecoratedCospan<F> (is <Lambda, D>); a garbled braiding formula; f32::EPSILON where the tolerance is 1e-5; an i32 fixture that is i64; a mat_kron table row claiming MatR's copy/add "fails speciality" (the Frobenius law fails; speciality holds on idempotent rigs); a # Panics on transition_as_cospan missing its out-of-range-index arm; a debug_assert! that does not exist.

Reviews: four parallel executing reviews on e2ebfa5 (presentation subtree / large modules / small modules + README / CHANGELOG): 0 blocking, 6 important, 27 minor — all applied in c9fa383. Restorations the reviews forced: the PropSignature f64 Eq/Hash/Ord implementor invariant; the catgraph v0.11.4 pin under [0.4.0]; twelve behaviour-visible CHANGELOG sub-facts (the dl-pass failure class: re-exports, error payloads, wire-format caveats); 2e-6 on E1::random. Delta review of c9fa383 (2 important / 5 minor: my new PropSignature heading over-claimed on NaN; to_u64 truncates, so the # Panics arm was wrong) → ddf3207; r3 on ddf3207 (4 precision items on the r2 sentences: super:: link paths, the exact Checked<T> bound set, an ambiguous panics sentence) → 33cdeb9 (links verified under --document-private-items). kb.rs's References block (BE15, Wadsley–Woods) kept as paper anchors — owner call if it should follow the deleted sentence.

Gates: applied tests all features 45 binaries / 712 / 0 / 23; clippy -D warnings default, serde f64-rig internal-probes, --no-default-features; RUSTDOCFLAGS=-D warnings cargo doc both lanes; doctests; fmt; workspace --nocapture 146 / 2113 / 0 / 24; check_version_refs.py; check_measured_claims.py 44 / 20 / 24 unchanged.

Left as-is, recorded: runtime strings carrying issue numbers (rewrite.rs:108 #196, smc_nf.rs:236 assert message) — behaviour, not prose; TODO(#37) comments; README:23 "overflow policy of record (#88)" prose; internal-bench feature introduced by no CHANGELOG bullet in old or new text (pre-existing gap in the v0.1.1–v0.3.0 window the reconciliation note declares).

🤖 Generated with Claude Code

tsondru and others added 4 commits August 26, 2026 16:45
Terse-prose plan step 1 for catgraph-applied. Rustdoc 10710 → 7500 doc
lines across 33 src files; CHANGELOG 2859 → 815 (29 version sections, one
bullet per change, the 11 measured-claims figures verbatim). False claims
found and fixed on the way: a `CongruenceClosure` "always returns Some"
claim (three `Ok(None)` sites), a petgraph dependency that does not exist,
a dead `BrauerMorphism::non_crossing` link (rustdoc + README), a
`DecoratedCospan<F>` arity, a garbled braiding formula, an `f32::EPSILON`
tolerance that is `1e-5`, an `i32` fixture that is `i64`.

Production diff: one `if let … && …` let-chain collapse in
`prop/presentation/mod.rs` (clippy `collapsible_if`, exposed when the
comment between the two `if`s was deleted); no behaviour change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Restored: the `PropSignature` f64 `Eq`/`Hash`/`Ord` implementor invariant;
the `catgraph v0.11.4` pin under [0.4.0]; twelve behaviour-visible
CHANGELOG sub-facts (Hypergraph method surface, `is_poisoned`, match-site
`limit`/`Err` contracts, NaN buckets, rand_core public-API coupling, wasm
test caveat, serde wire-format caveats, `optimize` readback check, `Color`
bounds, the η known-gap test, the duplicate-port error payload, the #185
ablation count) and the overflow-class scope on the #196 bullet; `2e-6` on
`E1::random`'s separation.
Corrected: three retained "congruence closure decides" claims weakened to
sound-and-seed-complete; `mat_kron`'s SCFM row (the Frobenius law fails,
speciality holds on idempotent rigs); `transition_as_cospan` `# Panics`
gains the out-of-range index arm; "four steps" in `nf_inner`; the
`PetriNet` "exact inverse" wording; `Decoration::Apex` bound wording; five
shipped `SfgGenerator` rigs and the `'static` bound; "In that fold"
antecedent.
Deleted: a vacuous colour clause on `canonical_content`; a BigInt
per-operation allocation claim; a #174 history comment; a #58 test comment.
Added: `parallel` forwards `catgraph/parallel` (lib.rs, README).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`PropSignature` invariant scoped to non-NaN payloads; `transition_as_cospan`
`# Panics` states the truncating `to_u64` arm; `nf_inner` "no earlier
component rises"; `Checked<T>` bound spelled out and linked; `smc_nf` links
restored in kb.rs; a free-standing paper fact and a why-clause deleted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ng (#365)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tsondru
tsondru merged commit 916ed5f into main Aug 26, 2026
6 checks passed
@tsondru
tsondru deleted the audit/G17-T3 branch August 26, 2026 23:18
tsondru added a commit that referenced this pull request Aug 27, 2026
…ard (#298) (#369)

Closes #298.

`permute_side` had no non-square coverage: every pre-existing exercise is on
a square matrix, so `rows != cols` never occurred and the `p.len() != expected`
guard was never reached with a mismatch. Pinned on a 2 x 3 and a 3 x 2
`MatR<F64Rig>` with entries written out — the 3-cycle `rotation_left(3, 1)` on
each side, and the unchanged matrix where the permutation's length matches the
opposite side's arity. Both direction pins use a permutation that differs from
its inverse, so each separates the braiding from its transpose.

Both `matmul` results now go through `.expect` naming the guard, instead of an
`if let Ok` that discarded the `Err`. The arms are unreachable: the guard makes
`matmul`'s only failure condition impossible, so the issue's "reach both Err
arms" cannot be satisfied by any test — a probe panicking in both arms ran
146/146 binaries green. Production diff 6 lines.

Falsified against the perturbations, each red on the new test alone: guard
deleted (panics at the codomain `.expect`, `expected: 3, actual: 2`);
`expected` pinned to `self.cols` (domain case observes the unpermuted
`[[1,2],[3,4],[5,6]]`); `expected` pinned to `self.rows` (codomain case
observes the unpermuted `[[1,2,3],[4,5,6]]`); domain branch building `P`
instead of `P^T` (observes `[[3,4],[5,6],[1,2]]` against `[[5,6],[1,2],[3,4]]`).
Restoring `if let Ok` reddens nothing — the null that confirms the arms are
dead.

The issue's doc-truth rider was already discharged at #367: `mat.rs:11-12`
points at `crate::mat_f64` behind the `f64-rig` feature. It is a code span
rather than the intra-doc link the rider sketched, because the module is
feature-gated and the link would not resolve without it.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant