Skip to content

test(querier): rfc0044.9 property — every mined line findable by its body - #675

Merged
jensholdgaard merged 3 commits into
mainfrom
rfc0044-slice5
Jul 29, 2026
Merged

test(querier): rfc0044.9 property — every mined line findable by its body#675
jensholdgaard merged 3 commits into
mainfrom
rfc0044-slice5

Conversation

@jensholdgaard

Copy link
Copy Markdown
Owner

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

jensholdgaard and others added 2 commits July 29, 2026 12:44
…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>
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0663913a-8283-48b1-8ddd-a22bd7364ef0

📥 Commits

Reviewing files that changed from the base of the PR and between 7e3a783 and e763d7a.

📒 Files selected for processing (1)
  • crates/ourios-querier/tests/it/rfc0044_body_equality.rs
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0044-slice5

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 real MinerCluster and queries by body == "<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.

Comment thread crates/ourios-querier/tests/it/rfc0044_body_equality.rs
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/corpus via CARGO_MANIFEST_DIR + .parent().and_then(Path::parent) (avoids embedding ../..) and sort read_dir entries for deterministic mining across platforms/filesystems. Keeping this consistent reduces flakiness risk from order-dependent mining and keeps workspace-root resolution robust (see crates/ourios-miner/tests/hazards.rs H7.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") {

@jensholdgaard
jensholdgaard merged commit dd5608e into main Jul 29, 2026
28 checks passed
@jensholdgaard
jensholdgaard deleted the rfc0044-slice5 branch July 29, 2026 11:00
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.

2 participants