Skip to content

feat(bench): RFC 0031 §7 — M_L2 unfrozen and asserting per RFC 0033 (run #21) - #528

Merged
jensholdgaard merged 2 commits into
mainfrom
rfc0031-ml2-unfreeze
Jul 14, 2026
Merged

feat(bench): RFC 0031 §7 — M_L2 unfrozen and asserting per RFC 0033 (run #21)#528
jensholdgaard merged 2 commits into
mainfrom
rfc0031-ml2-unfreeze

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 14, 2026

Copy link
Copy Markdown
Owner

What

RFC 0031 §7: M_L2 unfrozen and asserting, per its named condition — the RFC 0033 cached template map landed (#522) and was measured (run #21: every pair warm at 187,904 B acquisition).

Frozen values, derived from the record and set below the weakest measurement (the existing freeze discipline):

  • Processed channel (primary): M_L2 = 10. Measured 32.5–39.3× across runs feat(miner): add mask() — RFC 0001 §6.2 step 2 #10feat(miner): add Drain prefix tree skeleton (RFC 0001 §6.2 step 3) #17 pre-artifact; 37.3–45.1× recomputed on the post-artifact totals.
  • Storage-side: 1.1× floor, integer-exact (ourios × 11 ≤ loki_storage × 10). Post-artifact severity total = 2,223,171 B (0 + 2,035,267 + 187,904) against the recorded Loki storage band computes 1.20–1.51×; 1.1 sits below the weakest point with wobble margin. The amendment says plainly this is a parity-plus floor, not a 10× claim — write-side sizing remains the recorded, un-chased lever.

Also asserting from this slice:

  • Scenario RFC0031.3 un-stubbed green (frozen-value pins, boundary math both directions, the §9.13 reproduction rows on the post-artifact totals, and the pre-artifact 1.05× row correctly failing the floor — the gate isn't vacuous).
  • RFC 0033 §5.6's corpus acquisition gate (warm × 2 ≤ fold): harvested from the per-pair probes; in the all-warm steady state the fold comparand comes from one off-timed-path refold, loudly non-evaluable on failure, zero-bytes invalid-never-pass.
  • print_pair_bytes_gates relabels L2 PRIMARY/FROZEN; new bytes_must_win_tenths in lgates.rs with boundary/overflow/zero unit tests.

✅ Measured — run #23 (29353634499), exit 0

First run with every new assertion live, all PASS:

  • L2 processed (PRIMARY, frozen 10): 43.97×
  • L2 storage-side floor (frozen 11/10): 1.49×
  • L1 storage 108.3× / L3 storage 24.9× (frozen 10) — the existing gates held
  • Latency floors held; RFC 0033 acquisition gate: warm 187,905 B compressed on every pair (≤ fold/2 asserted)
  • The L3 pair measured cleanly (run docs(rfc-0001): amend §6.1 to align record schema with OTLP LogRecord #21's Loki-side flake did not recur)

⚠️ HOLD — measure before merge (discharged)

Comparative dispatch run #23 from this branch must pass with the new assertions live (the #506/run-#19 precedent). Numbers land here before merge.

Checks run

cargo fmt --all --check; workspace cargo clippy --all-targets --all-features -- -D warnings; cargo nextest run -p ourios-bench (149 passed, RFC0031.3 running green); mdbook build clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y

Summary by CodeRabbit

  • New Features

    • Added more precise tenths-based margin evaluation for comparative byte checks.
    • L2 evaluations now enforce both a processed-channel margin and a 1.1× storage-side floor.
    • Added template-map acquisition checks for warm and cold artifacts.
  • Bug Fixes

    • Invalid or overflowing measurements are now rejected instead of passing evaluation.
  • Documentation

    • Documented the finalized L2 thresholds and evaluation requirements.

…run #21)

The §7 deferral's named condition is met: RFC 0033's v2 compressed
template map merged (#522) and comparative run #21 measured every pair
warm at 187,904 B acquisition vs the 513,862 B fold (§9.15). M_L2
freezes per channel, derived from the run record:

- processed (primary): M_L2 = 10 — measured 32.5–39.3× across §9.13
  runs #10#17, 37.3–45.1× on the post-artifact total.
- storage-side: a 1.1× floor, integer-exact as ourios × 11 ≤
  loki_storage × 10 (m_l2_storage_floor_tenths = 11). The
  post-artifact honest total (0 + 2,035,267 + 187,904 = 2,223,171 B)
  computes to 1.20–1.51× against the recorded Loki storage band; 1.1
  sits below the weakest point with margin for Loki's documented
  chunk-boundary wobble. A parity-plus floor, not a 10× claim — the
  write-side lever stays recorded, not chased.

Harness: frozen_gate_failures() gates the L2 pair on both channels in
the existing salvage ordering; scenario RFC0031.3 un-stubs green in
the .2/.4 style (boundary math + record-derived evidence, including
the pre-artifact total correctly failing the floor). The RFC 0033
§5.6 corpus acquisition gate (warm ≤ fold/2 when a warm pair exists)
also asserts in the dispatch run — fold from a cold pair when one
exists, one off-timed-path refold in the all-warm steady state,
loudly non-evaluable on refold failure. bytes_must_win_tenths carries
the sub-integer floor with the lgates honesty guards (zero ⇒ Invalid,
overflow fails closed on the correct side), unit-tested at the
boundaries.

M_L4 and F_L7 deferrals are untouched. Merge is gated on a fresh
dispatch (run #23) from this branch proving the new assertions pass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
@jensholdgaard
jensholdgaard requested a review from Copilot July 14, 2026 17:24
@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds tenths-based L2 storage gating, freezes the L2 processed and storage-side thresholds, enables RFC0031.3, and integrates RFC0033.6 template-map acquisition validation into comparative runs.

Changes

Comparative gating

Layer / File(s) Summary
Tenths-based L2 gate
crates/ourios-bench/src/lgates.rs, crates/ourios-bench/src/lib.rs
Adds the tenths storage-floor configuration, integer-only gate evaluation with overflow invalidation, defaults and unit tests, and a public re-export.
Frozen L2 comparative integration
crates/ourios-bench/tests/rfc0031_comparative.rs, docs/rfcs/0031-comparative-evaluation-loki.md
Enables RFC0031.3 and applies the frozen processed-channel and 1.1× storage-side L2 gates in comparative checks and output.
Template-map acquisition gate
crates/ourios-bench/tests/rfc0031_comparative.rs
Adds RFC0033.6 warm-versus-cold acquisition validation, run-level failure aggregation, and coverage for evaluable, non-evaluable, and invalid measurements.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ComparativeRun
  participant FrozenGates
  participant TenthsGate
  participant AcquisitionGate
  participant GateFailures
  ComparativeRun->>FrozenGates: evaluate L2 pair
  FrozenGates->>TenthsGate: check storage-side floor
  TenthsGate-->>FrozenGates: return outcome
  ComparativeRun->>AcquisitionGate: compare warm artifact and cold fold bytes
  FrozenGates->>GateFailures: add L2 failures
  AcquisitionGate->>GateFailures: add acquisition failure when decisive
Loading

Possibly related PRs

Suggested reviewers: copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely summarizes the main change: unfreezing and asserting M_L2 for RFC 0031/0033.
Description check ✅ Passed The description is detailed and covers the required areas, though it uses custom headings instead of the exact template.
✨ 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 rfc0031-ml2-unfreeze

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

This PR updates the RFC 0031 comparative-benchmark harness and documentation to reflect that L2 (M_L2) is no longer deferred: it is now frozen and asserted (processed-channel must-win at M_L2 = 10, plus a storage-side parity-plus floor of 1.1× expressed as m_l2_storage_floor_tenths = 11). It also adds an asserting check for the RFC 0033 §5.6 corpus acquisition gate (warm × 2 ≤ fold) when any pair runs warm.

Changes:

  • Un-stubs Scenario RFC0031.3 and pins/asserts the new frozen L2 processed + storage-floor gates.
  • Adds bytes_must_win_tenths and the frozen margin m_l2_storage_floor_tenths to support integer-exact sub-integer gate math.
  • Adds a dispatch-run assertion for the RFC0033.6 acquisition condition when warm measurements exist.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
docs/rfcs/0031-comparative-evaluation-loki.md Documents the M_L2 unfreeze/freeze decision and the new processed + storage-floor frozen values.
crates/ourios-bench/tests/rfc0031_comparative.rs Un-ignores RFC0031.3, adds L2 dual-channel gating, and asserts the RFC0033.6 acquisition gate in the dispatch run.
crates/ourios-bench/src/lib.rs Re-exports the new bytes_must_win_tenths helper.
crates/ourios-bench/src/lgates.rs Introduces m_l2_storage_floor_tenths and bytes_must_win_tenths with unit tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/rfcs/0031-comparative-evaluation-loki.md

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 4 out of 4 changed files in this pull request and generated no new comments.

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