test(querier): cover no-DataFusion/arrow/SQL-leakage boundary (RFC0007.3) - #90
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThis PR implements RFC0007.3 compliance tests that validate ChangesRFC0007.3 no-leakage boundary validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Flips the RFC0007.3 red-gate stub into a live two-level boundary test, verifying that DataFusion/arrow/SQL specifics never leak into operator-facing QueryError::Display. No production code changes.
Changes:
- Adds a unit test in
lib.rsthat asserts a synthetic engine-textStorageerror is scrubbed fromDisplay(denylist scan) while preserved inDebug. - Adds an integration test (
tests/boundary.rs) that drives a real DataFusion failure via a corrupt committed*.parquetand verifies the surfacedQueryError::Storageleaks none of the denylist tokens. - Replaces the
#[ignore]placeholder intests/acceptance.rswith a comment pointer to the now-live tests and notes the structural enforcement for the public signature half.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/ourios-querier/src/lib.rs | Adds string-level unit test + shared ENGINE_LEAK_TOKENS denylist verifying Storage Display scrubbing. |
| crates/ourios-querier/tests/boundary.rs | New integration test triggering a real engine failure and asserting no engine-token leakage in Display. |
| crates/ourios-querier/tests/acceptance.rs | Removes the RFC0007.3 ignored stub and documents where the live coverage now lives. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…7.3) Flips the §4.6 no-leakage acceptance criterion from its #[ignore] red-gate stub to a live, two-level boundary test: - string level (colocated unit test): a `Storage` error wrapping synthetic engine/arrow/SQL text scrubs it from the operator-facing `Display` (generic "failed to read the log store") while `Debug` preserves the detail for logs. A denylist scan rather than an exact-string match, so a future reword can't let a new engine token slip through. - real engine error (tests/boundary.rs): a corrupt committed `*.parquet` trips DataFusion schema inference; the surfaced `QueryError::Storage` Display leaks none of the denylist tokens, proving the scrub holds for errors flowing through `storage_err`, not just synthetic ones. The "no engine type in a public signature" half is enforced structurally — `QueryRequest`/`QueryResult`/`QueryStats`/`QueryError` are all Ourios-owned, so no datafusion/arrow type crosses the API. RFC 0007 stays `specified` (RFC0007.4 still needs a test + RFC 0002). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
6c99bf8 to
f3d1280
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
What
Flips RFC0007.3 — no DataFusion/arrow/SQL leakage (§4.6) from its
#[ignore]red-gate stub to a live, two-level boundary test. Follows B1 (#88) and B2 (#89).How it's tested
Per RFC 0007 §5/§6 ("compile-/string-level boundary test"):
rfc0007_3_storage_display_leaks_no_engine_tokens): aStorageerror wrapping synthetic engine/arrow/SQL text is scrubbed to the genericDisplay"failed to read the log store", whileDebugpreserves the detail for logs. A denylist scan (datafusion,arrow,parquet,sql,select,schema,logical plan,physical,recordbatch,listingtable,during planning) rather than an exact-string match, so a future reword can't let a new engine token slip through.tests/boundary.rs::rfc0007_3_real_engine_error_does_not_leak): a corrupt committed*.parquettrips DataFusion schema inference deep in the engine; the surfacedQueryError::StorageDisplayleaks none of the denylist tokens — proving the scrub holds for errors flowing throughstorage_err, not just synthetic ones.The "no engine type in a public signature" half is enforced structurally:
QueryRequest/QueryResult/QueryStats/QueryErrorare all Ourios-owned, so nodatafusion/arrowtype crosses the public API.Invariants / hazards
Verification (local)
cargo fmt --all --check✅cargo clippy -p ourios-querier --all-targets --all-features -- -D warnings✅cargo test -p ourios-querier --all-features✅ (4 lib unit + 1 boundary + 7 execution; only RFC0007.4 remains#[ignore])RFC 0007 stays
specified(RFC0007.4 still needs a test + RFC 0002). Epic: #82.🤖 Generated with Claude Code
Summary by CodeRabbit