docs(rfc0036): validate — in-repo before/after (1.43×) + baseline no-regression (§9.26/§9.27) - #591
Conversation
Add `rfc0036_2_materialization_before_after` alongside the existing scanned-count bound test: the "cheap A" in-repo evidence for RFC 0036's window-materialization win, on a genuinely-compacted store (the v8 comparative harness builds one ingest file per partition, so `compact_partition` no-ops there and the sort never runs). The same synthetic multi-service hour is materialised two ways and hit with the same L6-shape k=100 window query: before = one unsorted ingest-side file (128 MiB rotation, no `sorting_columns`, nothing prunes -> whole file is the materialization set); after = the compacted, `sorting_columns`-declaring store (32 MiB row groups, tight per-group stats -> prunes to a contiguous survivor subset). The win is measured in materialization bytes (RFC 0036 s9: the compressed column chunks of the row groups that survive pruning, via the existing `window_service_bytes` footer computation), cross-checked against the live query's `row_groups_scanned`. Row-group counts are not the honest axis: the compacted store deliberately holds more, smaller groups (s3.3). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
|
Warning Review limit reached
Next review available in: 25 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 (3)
📝 WalkthroughWalkthroughChangesThe RFC0036.2 integration test now creates an uncompacted baseline, measures predicted and live row-group scanning, and compares it with a compacted store for identical query results, pruning, and materialization bytes. RFC0036 materialization validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
…o before/after Flips RFC 0036 green→validated on the resolved comparative arm: - §9.26 (authoritative baseline, HEAD 5e5aa66): the frozen RFC 0031 dispatch reran on post-0036 main; every measured gate passes in §9.24's band (no regression). Finding: build_comparative_store writes one ingest file per partition, so compact_partition no-ops and RFC 0036's sort never runs there — every ourios_bytes_read is byte- identical to §9.24. Multi-file harness re-base = future work, not a validated blocker (RFC0036.2 bytes is a §2.2 diagnostic). - §9.27 (in-repo): the RFC0036.2 before/after materialization measured on a genuinely-compacted store — whole hour (1/1 groups, 100.5 MB) → contiguous minority (2/6, 70.0 MB), 1.43x win, identical answer. Also fixes a stale §9.25 test-name reference (forced_spill rename). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
There was a problem hiding this comment.
Pull request overview
Advances RFC 0036 (“write-side layout”) from green to validated by adding in-repo before/after evidence for the RFC0036.2 materialization-bytes diagnostic, and records the baseline comparative rerun results (showing no regression and documenting that the current comparative harness doesn’t exercise the RFC 0036 sorting path).
Changes:
- Mark RFC 0036 as
validatedand document the supporting baseline + in-repo evidence. - Add benchmark write-up sections §9.26 (baseline rerun + harness finding) and §9.27 (in-repo before/after).
- Add an integration test that measures RFC0036.2 window-materialization before/after on an uncompacted vs compacted store.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/rfcs/0036-write-side-layout.md | Updates RFC 0036 status to validated and embeds the new evidence narrative. |
| docs/benchmarks.md | Adds benchmark result sections §9.26/§9.27 and fixes the forced-spill test name reference. |
| crates/ourios-querier/tests/it/rfc0036_window_materialization.rs | Adds a deterministic in-repo before/after materialization-bytes test and shared measurement helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot: the ~58k-row fixture Vec was un-capacitated. Reserve capacity from the plan's row sum to avoid repeated reallocations in the heavy integration test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
…gest file (review) Copilot: `before_path` used `find`, which would silently pick an arbitrary `.parquet` if the dir ever held more than one (read_dir order is unspecified). Collect the matches and assert exactly one — one write_input yields one file, so a stray file now fails loud instead of measuring the wrong parquet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
Copilot: the "before materialises the whole file" claim silently depends on the uncompacted ingest file being one row group; if the writer ever flushed multiple time-ordered groups, time-pruning could apply and the test would fail confusingly. Assert before_total == 1 so the assumption is explicit and fails loudly if it ever breaks. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
crates/ourios-querier/tests/it/rfc0036_window_materialization.rs:432
- The “before” description says the uncompacted store’s row group(s) span “the whole hour”, but in this fixture the important property is that the uncompacted parquet is a single row group spanning all services (and therefore can’t be pruned for this query). Rewording makes the invariants match what the test actually asserts (before_total == 1).
/// rotation, no `sorting_columns`. Every row group spans the whole
/// hour and every service, so nothing prunes: the window query
/// materialises the *entire* file (`scanned == total`).
crates/ourios-querier/tests/it/rfc0036_window_materialization.rs:481
- This comment says the uncompacted ingest file’s row group(s) span “the whole hour”, but the test is really relying on “no pruning” because the uncompacted store is a single row group covering all services (and overlapping the window). Rewording avoids a misleading “hour” claim and matches the explicit before_total==1 assertion just below.
// the row groups a `service == TARGET AND time ∈ window` scan can NOT
// prune; on the unsorted ingest file every row group spans the whole hour
// and every service, so none prune — the survivors are the *whole file*. ---
Three review fixes: the before/after narrative in the RFC status note and §9.27 said the window materialises the "whole hour", but the measurement is about materialising the whole *file* (the single-row-group unsorted ingest parquet, no pruning) — reworded for precision, matching the 1/1-groups table. And the win-ratio print casts to u128 so before_bytes * 100 can't overflow if the fixture ever grows. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
1b7aba3 to
f75d80c
Compare
Flips RFC 0036 →
validatedon the resolved comparative arm (the user chose "B + cheap in-repo before/after" after the baseline run surfaced that the comparative harness can't exercise RFC 0036).What landed
rfc0036_2_materialization_before_after, ourios-querier) — the RFC0036.2 materialization diagnostic on a genuinely-compacted store: the sort takes a one-service window from materialising the whole hour (unsorted, 1/1 groups, 100.5 MB) to a contiguous minority (sorted, 2/6 groups, 70.0 MB) for the identical 100-row answer — a 1.43× materialization-bytes win, measured from footer survivor-chunk bytes (not the misleading count-scanbytes_read). Modest and honest: the compacted file is ~2× larger on disk, and §2.2's registry floor is why the gate is the scanned-row-group bound (enforced by the untouchedrfc0036_2_window_materialization_bound).baseline-8vcpu-32gib, HEAD 5e5aa66) — the frozen RFC 0031 dispatch reran on post-RFC-0036 main: every measured frozen gate passes in §9.24's band (no regression). Key finding:build_comparative_storewrites one ingest file per partition →compact_partitionno-ops → RFC 0036's sort never runs → everyourios_bytes_readis byte-identical to §9.24. A multi-file-per-partition harness (which would re-base RFC 0031's frozen-gate store) is future work, not a validated blocker.forced_spillrename).green → validatedwith the evidence inline;acceptedis a maintainer flip.Invariants / hazards
Hazard #4 (small-file / pruning granularity) — the 1.43× win is the §3.3 pruning-granularity-over-bytes trade, made visible. No schema change; no production code touched (test + docs only).
Verification
cargo fmt --all --check,cargo clippy --all-targets --all-features -- -D warnings,cargo doc --workspace --no-deps --all-features,mdbook build— all exit 0cargo test -p ourios-querier --all-features --test it rfc0036_2— 2 passed; before/after numbers reproduced (100,520,155 → 70,018,075 bytes, 1.43×)🤖 Generated with Claude Code
https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y