Skip to content

test(adr-001): property-based tests for the SubLinear pipeline - #50

Merged
ruvnet merged 1 commit into
mainfrom
adr/proptest-pipeline
May 19, 2026
Merged

ruvnet merged 1 commit into
mainfrom
adr/proptest-pipeline

Conversation

@ruvnet

@ruvnet ruvnet commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

Unit tests cover specific cases; this PR fuzzes the contract surface the rest of the stack relies on. Four properties asserted across randomly-generated strict-DD matrices + sparse deltas:

  1. `closure_indices(M, seeds, depth)` is monotone in depth (BFS frontiers never shrink).
  2. Empty delta short-circuits to empty result on strict-DD input (the "no event, no work" wire-contract from PR feat(adr-001 #2): solve_on_change_sublinear — SubLinear delta-solve #29).
  3. `verify_sparse_solution` passes on every auto-tuned orchestrator output (trust-but-verify gate from PR feat(adr-001): sparse solve witness — per-entry residual audit #41 — if this ever fails, the solver has a real bug, not just a tolerance miss).
  4. Manual orchestrator with generous depth + terms agrees with auto-tuned at shared closure entries (cross-validates the auto-tune from PR feat(adr-001): magic-number-free orchestrators (auto-tune from coherence) #38 against a known-good baseline).

Generation strategy

`diag = 10` matrices with bounded off-diagonals → guaranteed strict-DD by construction. Side-steps the `SolverError::Incoherent` path the auto-tuner takes on non-DD input.

Test plan

  • `cargo test --test property_sublinear` → 4/4 pass on default proptest budget (256 cases per property)
  • proptest was already a dev-dep; no new deps
  • Full CI

🤖 Generated with claude-flow

Unit tests cover specific cases; this fuzzes the contract surface
that the rest of the stack relies on. Four properties asserted
across randomly-generated strict-DD matrices + sparse deltas:

  1. closure_indices(M, seeds, depth) is monotone in depth.
     (BFS frontiers never shrink.)

  2. Empty delta short-circuits to empty result on strict-DD input.
     (The "no event, no work" wire-contract from PR #29.)

  3. verify_sparse_solution passes on every auto-tuned orchestrator
     output. (Trust-but-verify gate from PR #41 — if this ever
     fails, the solver has a real bug, not just a tolerance miss.)

  4. Manual orchestrator with generous depth + terms agrees with
     auto-tuned at shared closure entries. (Cross-validates the
     auto-tune from PR #38 against a known-good baseline.)

Generation strategy: diag=10 matrices with bounded off-diagonals,
guaranteeing strict-DD by construction. Side-steps the
SolverError::Incoherent path the auto-tuner takes on non-DD input.

Tests live in tests/property_sublinear.rs (integration test crate).
proptest was already a dev-dep in Cargo.toml; no new deps added.

4/4 cases pass on the default proptest budget (256 cases per
property by default).

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet
ruvnet merged commit 9796cbc into main May 19, 2026
11 of 12 checks passed
@ruvnet
ruvnet deleted the adr/proptest-pipeline branch May 19, 2026 18:27
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