test(parquet): green RFC0013.2 + .5 local acceptance scenarios - #237
Conversation
Un-ignore and implement the two §5 scenarios the merged Store seam now satisfies on the local backend: - RFC0013.2 (local backend regresses nothing): a 200-row round-trip through the Store-backed Writer + Reader — the same LocalFileSystem seam the existing RFC0005/0009 suites (round_trip, sizing, partition_layout, manifest, compaction) now run through by default. - RFC0013.5 (tenant isolation across the prefix): two tenants' data in one store land under distinct `data/tenant_id=<tenant>/…` key sub-prefixes, and a read of one tenant's partition surfaces only that tenant's rows. RFC0013.8's note is updated: §3.9 forward-compat is already exercised over the Store seam by the colocated reader tests (rfc0005_2/3/4, which read through `Store` now); a duplicate variant-schema integration test is deferred as low marginal value. RFC0013.6 (WAL-stays-local) stays red pending the server wiring the object-store backend; .1/.3/.4/.7 stay red pending live S3 (Hetzner). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📝 WalkthroughWalkthroughActivates two previously ignored RFC0013 integration tests in ChangesRFC0013 Object Store Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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)
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 green (non-ignored) acceptance tests for RFC 0013’s local object-store seam in ourios-parquet, validating that the Store-backed Writer/Reader round-trip and tenant prefix isolation behave correctly on the LocalFileSystem backend.
Changes:
- Adds deterministic
MinedRecordgeneration plus a helper to write records through the Store-backedWriter. - Implements RFC0013.2 as a 200-row
Writer→Readerround-trip assertion on the local backend. - Implements RFC0013.5 to verify per-tenant key-prefix layout and that reading tenant X’s partition returns only tenant X’s rows.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/ourios-parquet/tests/rfc0013_object_store.rs (1)
157-166: ⚡ Quick winConsider adding symmetric read verification for tenant-y.
The test thoroughly verifies tenant-x's isolation (path prefix and read filtering), but does not symmetrically verify tenant-y's read. Adding a parallel read assertion for tenant-y would strengthen the isolation guarantee and ensure the test pattern generalizes.
✨ Suggested symmetric verification
assert!( gx.iter().all(|r| r.tenant_id.as_str() == "tenant-x"), "no tenant-y rows leak into a tenant-x read", ); + + // Symmetric check: reading tenant-y surfaces only tenant-y rows. + let gy = Reader::open_partition(&ypath, py) + .expect("open y") + .read_all() + .expect("read y"); + assert_eq!(gy.len(), y.len()); + assert!( + gy.iter().all(|r| r.tenant_id.as_str() == "tenant-y"), + "no tenant-x rows leak into a tenant-y read", + ); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@crates/ourios-parquet/tests/rfc0013_object_store.rs` around lines 157 - 166, Add symmetric read verification for tenant-y after the existing tenant-x isolation checks. Follow the same pattern used for tenant-x: open tenant-y's partition using the ypath and py variables, call read_all() on the Reader, assert that the returned data length matches the expected tenant-y data length, and verify that all returned rows have tenant_id equal to "tenant-y" with an assertion message indicating that no tenant-x rows leak into the tenant-y read. This symmetric verification strengthens the isolation guarantee by confirming that the test pattern works bidirectionally for both tenants.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@crates/ourios-parquet/tests/rfc0013_object_store.rs`:
- Around line 157-166: Add symmetric read verification for tenant-y after the
existing tenant-x isolation checks. Follow the same pattern used for tenant-x:
open tenant-y's partition using the ypath and py variables, call read_all() on
the Reader, assert that the returned data length matches the expected tenant-y
data length, and verify that all returned rows have tenant_id equal to
"tenant-y" with an assertion message indicating that no tenant-x rows leak into
the tenant-y read. This symmetric verification strengthens the isolation
guarantee by confirming that the test pattern works bidirectionally for both
tenants.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4338b891-4d99-4c4e-8c38-104112d28cec
📒 Files selected for processing (1)
crates/ourios-parquet/tests/rfc0013_object_store.rs
RFC 0013 green — formalizes the two §5 scenarios the merged
Storeseam now satisfies on the local backend (test-only).What
Writer+Reader— the same LocalFileSystem seam the existing RFC0005/0009 suites (round_trip, sizing, partition_layout, manifest, compaction) now run through by default.data/tenant_id=<tenant>/…key sub-prefixes, and a read of one tenant's partition surfaces only that tenant's rows.Both un-
#[ignore]d;cargo testshows 2 passed, 6 ignored (CI default run green).Remaining stubs (accurately re-noted)
rfc0005_2/3/4(which read throughStorenow). A duplicate variant-schema integration test is deferred — low marginal value.🤖 Generated with Claude Code
Summary by CodeRabbit