Skip to content

test(physics): pin parallel-path and feature parity of APSP, betweenness, curvature (#329) - #391

Merged
tsondru merged 4 commits into
mainfrom
audit/G13-T2
Sep 1, 2026
Merged

test(physics): pin parallel-path and feature parity of APSP, betweenness, curvature (#329)#391
tsondru merged 4 commits into
mainfrom
audit/G13-T2

Conversation

@tsondru

@tsondru tsondru commented Sep 1, 2026

Copy link
Copy Markdown
Member

Closes #329.

Parallel-path and feature parity pins for multiway: a seeded 320-node APSP bit-reproduction against a queue-BFS reference above APSP_PARALLEL_THRESHOLD (300), a 61-node betweenness parallel-vs-serial comparison, a threshold guard, and a default-features differential over the seven pinned topology fixtures plus pinned per-fixture distance summaries. Diff (git diff --stat 937f34c..HEAD): src/multiway/branchial_analysis.rs +131, ollivier_ricci.rs +127, test_topologies.rs +118, mod.rs +3, CHANGELOG.md +6.

Review history: r1 plus delta rounds 2–3 in the physics lane (Opus), every finding applied; the loop was stopped by the owner during round 4 and closed by one bounded Sonnet pass. The nalgebra routing (math:nalgebra-linalg) was consulted at design time by the lane.

Falsification (closing review, /tmp/audit-reports/G13-T2/close-review.md; cargo nextest run -p catgraph-physics --no-fail-fast, default and --no-default-features)

# perturbation lane named test red observed vs expected
a branchial_distance_matrix output +1.0 per entry default distance_matrix_matches_bfs_above_the_parallel_threshold, distance_matrix_matches_queue_bfs_on_topology_fixtures (+3 pre-existing) 1 vs 0 at (0,0)
b multiway_betweenness scores.get(i)get(i + 1) default betweenness_matches_the_sequential_reference (+2 pre-existing) 60 vs 61
c APSP_PARALLEL_THRESHOLD 300 → 100 000 default distance_matrix_matches_bfs_above_the_parallel_threshold only n = 320 vs threshold 100 000
a–c same --no-default-features none, 235/235 the module is #[cfg(feature = "rustworkx")]-gated (mod.rs:18-19)

Reviewer note: the brief's "parallel chunk boundary" has no in-crate target — the parallel/sequential dispatch lives in rustworkx_core::shortest_path::distance_matrix (0.18.1, line 145); (a) perturbs the wrapper's output instead. The 320/300 and 61/50 fixtures were confirmed to cross rustworkx's thresholds by reading the vendored source.

Gates (pristine copy, closing review)

cargo nextest run -p catgraph-physics: 277 passed / 0 failed (default), 235 / 0 (--no-default-features). Clippy -D warnings both lanes: clean. cargo fmt --all --check: clean.

🤖 Generated with Claude Code

tsondru and others added 4 commits August 31, 2026 21:08
…ess, curvature (#329)

`all_pairs_bfs` compiles on every feature lane as `pub(crate)`. New
unit tests: a seeded APSP differential above the parallel threshold
against the queue BFS with a run-to-run repeat; a 61-node betweenness
comparison against the sequential rustworkx sweep at 1e-9 relative
above 1 and absolute below; seeded topology-fixture pins on every lane;
the rustworkx distance matrix against the queue BFS on all seven
fixtures. The seven fixtures are duplicated into a `#[cfg(test)]`
`multiway::test_topologies` module; the integration-test copy in
`tests/branchial_analysis.rs` is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rvature pins (#329)

The seven-fixture all-pairs summary (finite sum, infinite count, largest
hop) is pinned on every lane; the structural `from_branchial` test keeps
counts and range, adds a reversed-duplicate edge case, and pins no
curvature value. The APSP fixture is `G(320, 0.01)` alone. The three
new matrix comparisons report the first differing entry. CHANGELOG
bullet reworded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
#329)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@tsondru
tsondru merged commit 2cb7dcf into main Sep 1, 2026
6 checks passed
@tsondru
tsondru deleted the audit/G13-T2 branch September 1, 2026 03:46
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.

physics: parallel + feature parity untested — 'bit-reproducible at any size' rests on a branch zero assertions touch

1 participant