test(querier): rfc0044.9 property — every mined line findable by its body - #675
Conversation
…body The capstone property: generated corpora mine through the real MinerCluster with its real audit emissions building the registry, and for every distinct original line, body == that line returns exactly its records — equality through templates is precisely as faithful as reconstruction (CLAUDE.md §3.3), driven through the predicate path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds the final RFC 0044 acceptance test by extending the existing body == integration test suite with a property test intended to validate the §3.3 reconstruction invariant through the predicate path (i.e., every mined line should be findable via body == "<original>" with no misses or cross-matches).
Changes:
- Add RFC0044.9 as a
proptest-driven integration test that mines generated corpora via the realMinerClusterand queries bybody == "<line>". - Persist the miner’s captured
MinedRecords plus the miner-emitted audit events to build the registry exactly as production does.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The criterion pins the §3.3 reconstruction corpus, not synthetic ASCII: the scenario now also mines every testdata/corpus/*.txt line through the real miner and asserts body == finds exactly its own records for each distinct line — including the quote-bearing ones, via the §7 string escapes. The generative property stays as the fuzzing half. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
crates/ourios-querier/tests/it/rfc0044_body_equality.rs:459
- Corpus path resolution and directory iteration here diverge from the established corpus-test pattern: other tests resolve
testdata/corpusviaCARGO_MANIFEST_DIR+.parent().and_then(Path::parent)(avoids embedding../..) and sortread_direntries for deterministic mining across platforms/filesystems. Keeping this consistent reduces flakiness risk from order-dependent mining and keeps workspace-root resolution robust (seecrates/ourios-miner/tests/hazards.rsH7.1).
let corpus_dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("../../testdata/corpus");
let mut lines = Vec::new();
for entry in std::fs::read_dir(&corpus_dir).expect("corpus dir") {
let path = entry.expect("entry").path();
if path.extension().is_some_and(|e| e == "txt") {
Summary
RFC 0044's final criterion. The property drives the §3.3 reconstruction invariant through the predicate path corpus-wide: generated line corpora mine through the real
MinerCluster(whose real audit emissions build the registry via the same fold production uses), and for every distinct original line,body == <that line>returns exactly its records — no misses (the #664 class), no cross-matches.With this, all nine RFC0044 §5 criteria have passing tests (12 scenarios in the it suite + 3 compile-level units + 6 slice-1 matcher units). Green flip follows as a docs PR.
Verification
Property green (10 calibrated cases), full rfc0044 group 11/11, fmt/clippy clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Qtny6z6cA74xPZa4qRhk4F