feat(bench): close RFC 0006 — reproducibility + forged-mismatch, flip to green (PR-J4) - #56
Conversation
… to green (PR-J4)
Lands the last two acceptance criteria and flips RFC 0006
`red → green` (every §5 scenario now has a passing test).
- **RFC0006.7 (reproducibility)** un-`#[ignore]`'d and made to
pass. Required pinning the miner's clock: the harness now
builds the cluster with `TestClock::new(<§3.3 baseline>)` so
audit-event timestamps are deterministic. The default
`SystemClock` stamps each run's audit events with wall-clock
time, which would make A1's audit-stream bytes — and so the
compression ratio — differ run-to-run; RFC0006.7 demands
bit-identical measurements across reruns. A bench audit
timestamp isn't a meaningful measurement, only its
reproducibility is. The test runs the bench twice on the
seed corpus (all gates) and asserts the JSON is byte-identical
modulo the `timestamp` field.
- **RFC0006.2 (mismatch sub-criterion)** — replaced the
`#[ignore]`'d `unimplemented!()` end-to-end stub with a
colocated unit test
(`c1::tests::reconstruction_mismatch_is_counted_as_failure`).
The real miner never produces a non-lossy reconstruction
mismatch (the H7.1 property), so the path is only reachable
via a hand-forged record — a unit-level fixture, not an
integration test that would need a fault-injection hook the
harness deliberately lacks. The test forges a `[Fixed("alpha")]`
template + a record reconstructing to "alpha" against an
input line of "beta" and asserts `pass = false` / `rate = 0`.
`main.rs` maps `pass = false` to a non-zero exit (§3.4.2).
- `docs/rfcs/0006-bench-harness.md` frontmatter `status: red`
→ `green`; crate docs + the stale `c1::finalize` doc
(which still called `main.rs` a red-stage scaffold) updated.
The one ≥ 1 M-line C2 end-to-end test stays `#[ignore]`'d for
the per-PR loop (§3.7: the bench runs on-demand, not per-PR);
it passes via `cargo test -- --ignored` and its convergence
math is covered by default by the colocated `c2` unit tests.
`Validated` (the next/terminal stage) comes when the gates are
measured on a real corpus + the §1 hardware baseline.
Verification (CLAUDE.md §6.6):
- cargo fmt --all --check — clean.
- cargo clippy --all-targets --all-features -- -D warnings —
clean.
- cargo test --all-features — 278 passed / 19 ignored (was
276 / 21: +reproducibility, +forged-mismatch unit test,
− the removed forged stub; only the heavy ≥1M C2 test
remains ignored).
- mdbook build — clean (RFC frontmatter flip renders).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
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 (4)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughPins the harness clock for deterministic audit timestamps, records bounded per-row C1 reconstruction mismatch diagnostics, exposes C1Mismatch in results (stderr-only), adds a unit test asserting mismatch is a hard failure, enables reproducibility test, and updates RFC/module status to green. ChangesRFC 0006 Green Gate
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 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)
Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Comment |
There was a problem hiding this comment.
Pull request overview
This PR advances RFC 0006 bench harness work by enabling reproducibility coverage, replacing the ignored C1 mismatch stub with a unit-level fixture, and updating RFC/crate status documentation toward green.
Changes:
- Pins bench miner audit timestamps with
TestClockto make A1 output deterministic across runs. - Enables the RFC0006.7 reproducibility integration test.
- Replaces the ignored C1 mismatch integration stub with a colocated accumulator unit test and updates related docs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
docs/rfcs/0006-bench-harness.md |
Flips RFC 0006 status from red to green. |
crates/ourios-bench/tests/reproducibility.rs |
Enables the reproducibility scenario test. |
crates/ourios-bench/tests/c1.rs |
Removes the ignored forged-mismatch integration stub and documents the unit-test replacement. |
crates/ourios-bench/src/lib.rs |
Updates crate-level implementation status documentation. |
crates/ourios-bench/src/harness.rs |
Pins the miner clock to the corpus baseline timestamp for deterministic audit events. |
crates/ourios-bench/src/c1.rs |
Updates C1 finalize docs and adds a forged reconstruction-mismatch unit test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…h, flip to green (PR-J4) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
Lands the last two acceptance criteria and flips RFC 0006
red → green— every §5 scenario now has a passing test. This closes out the writer-side thesis-gate harness.Lands
RFC0006.7 (reproducibility) un-
#[ignore]'d and passing. Required pinning the miner's clock: the harness now builds the cluster withTestClock::new(<§3.3 baseline>)so audit-event timestamps are deterministic. The defaultSystemClockstamps each run's audit events with wall-clock time, which would make A1's audit-stream bytes — and so the compression ratio — differ run-to-run; RFC0006.7 demands bit-identical measurements across reruns. The test runs the bench twice on the seed corpus (all gates) and asserts byte-identical JSON modulotimestamp.RFC0006.2 (mismatch sub-criterion) — replaced the
#[ignore]'dunimplemented!()end-to-end stub with a colocated unit test (c1::tests::reconstruction_mismatch_is_counted_as_failure). The real miner never produces a non-lossy reconstruction mismatch (the H7.1 property), so the path is only reachable via a hand-forged record — a unit-level fixture, not an integration test that would need a fault-injection hook the harness deliberately lacks. The test forges a[Fixed("alpha")]template + a record reconstructing to"alpha"against an input line of"beta"and assertspass = false/rate = 0.main.rsmapspass = falseto a non-zero exit (§3.4.2).docs/rfcs/0006-bench-harness.mdfrontmatterstatus: red→green; crate docs + a stalec1::finalizedoc (still callingmain.rsa red-stage scaffold) updated.Note on the one remaining
#[ignore]The ≥ 1 M-line C2 end-to-end test stays
#[ignore]'d for the per-PR loop (§3.7: the bench runs on-demand, not per-PR). It passes viacargo test -p ourios-bench -- --ignored, and its convergence math is covered by default by the colocatedc2unit tests at ≥1M scale. So the criterion is met; green is honest.Validated(terminal stage) comes when the gates are measured on a real corpus + the §1 hardware baseline.Test plan
cargo fmt --all --check— clean.cargo clippy --all-targets --all-features -- -D warnings— clean.cargo test --all-features— 278 passed / 19 ignored (was 276 / 21).mdbook build— clean (frontmatter flip renders).🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements
Tests
Documentation