test(physics): refixture cospan contiguity guard with edge_split (#328) - #382
Merged
Conversation
`cospan_chain_composability_contiguous_steps` runs `edge_split` on a single binary edge for 3 steps, asserts the chain length, and checks adjacent cospans via `Composable::composable` alongside the boundary length equality; the `len() >= 2` guard is removed. 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 #328. Audit sweep G13-T1 (physics lane).
What changed
catgraph-physics/tests/catgraph_bridge.rs—cospan_chain_composability_contiguous_stepsrefixtured:RewriteRule::edge_split()onHypergraph::from_edges(vec![vec![0, 1]]),run(.., 3);assert_eq!(cospans.len(), 3); theif cospans.len() >= 2guard removed; per adjacent pair, the boundary-length equality pluscospans[i].composable(&cospans[i + 1]).is_ok()(use catgraph::category::Composable).catgraph-physics/CHANGELOG.md— one bullet under[Unreleased] / Changed.Prod diff: 0 lines (
git diff --stat fb8426b..HEAD— 2 files, bothtests/andCHANGELOG.md).Premise (measured)
On the pre-fix fixture (A→BB on
[[0,1,2]], 3 steps),to_cospan_chain()returned a chain of length 1, so the guard body never ran:PROBE: chain len = 1— perturbationassert!(cospans.len() >= 2, ...)in acp -rcopy of the base tree,/tmp/audit-reports/G13-T1/probe-guard.log:136.Falsification (reviewer r1,
/tmp/audit-reports/G13-T1/review-r1.md, quoted)to_cospan_chainclosure changed to ignore its window and always rebuild the first pair (cardinality-breaking)evolution_cospan.rs:46-48catgraph_bridge.rs: none, 9/9 pass (guard dead: chain len 1 withwolfram_a_to_bb/ternary fixture). Unit:test_multi_step_cospan_chain,test_cospan_chain_composable_via_catgraph,test_compose_multi_stepFAILEDcospan_chain_composability_contiguous_stepsFAILED atcatgraph_bridge.rs:99(lengthassert_eq!)left: 3, right: 2build_cospan_for_pair'srightbuilt viachild_verts.iter().rev()(cardinality-preserving, label-order-breaking)evolution_cospan.rs:107catgraph_bridge.rs: none, 9/9 passcospan_chain_composability_contiguous_stepsFAILED atcatgraph_bridge.rs:106(composable().is_ok()) — length assert at line 99 passed (3==3)composable()is independently load-bearing, not shadowed by the length assert (1b never reached line 106).Implementer's falsification (three perturbations: repeat-first-cospan,
deterministic_pathtruncated to 2 nodes, left/right swapped inbuild_cospan_for_pair; each reddened the refixtured test):/tmp/audit-reports/G13-T1/impl/.Review rounds
54e2a52): 1 important — CHANGELOG bullet absent (applied in67ba39c); 1 minor — the refixtured test duplicatesevolution_cospan.rsunit teststest_multi_step_cospan_chainandtest_cospan_chain_composable_via_catgraphassertion for assertion. Kept as the row's "reachable guard" option: it is the public-API (tests/) exercise ofto_cospan_chain+Composable; deletion is the row's other option and remains an owner call.67ba39c, delta): 0 findings.Gates (worktree,
--target-dir /tmp/cargo/catgraph-physics; logs under/tmp/audit-reports/G13-T1/)cargo nextest run -p catgraph-physics: default 272 passed;--all-features272 passed;--no-default-features233 passed (impl/gate-01..03).cargo clippy -p catgraph-physics --all-targets -- -D warningson the same three lanes: clean (impl/gate-04..06).RUSTDOCFLAGS="-D warnings" cargo doc -p catgraph-physics --no-deps: clean (impl/gate-07).cargo fmt --all --check: clean (impl/gate-08).cargo test --workspace -- --nocapture→workspace-tests.log: 147test result: oklines, 0test result: FAILEDlines;scripts/check_measured_claims.py workspace-tests.log: exit 0.🤖 Generated with Claude Code