Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions crates/ourios-bench/tests/rfc0024_calibration.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//! RFC 0024 §5 — calibration extraction + calibrated-generator sanity
//! (`.1`/`.2`), plus the adversarial umbrella (`.7`). The per-property
//! scenarios live with the crates that own each invariant:
//! `.3` (P1 round-trip) in `ourios-parquet`, `.4`/`.5` (P2/P3) in
//! `ourios-miner`, `.6` (P4 query oracle) in `ourios-querier`.
//!
//! Stubs are `#[ignore]`d so the default run stays green while the
//! RFC is red; each names the green slice that discharges it.

/// Scenario RFC0024.1 — calibration extraction.
/// See `docs/rfcs/0024-otlp-envelope-property-testing.md` §5.
#[test]
#[ignore = "RFC0024.1 stub — implemented in the calibration green slice"]
fn rfc0024_1_calibration_extraction_is_deterministic() {
todo!(
"RFC0024.1 — `--calibrate` over a corpus produces a byte-identical \
manifest on rerun, committed alongside the corpus tag"
);
}

/// Scenario RFC0024.2 — calibrated generators are shaped by the manifest.
/// See `docs/rfcs/0024-otlp-envelope-property-testing.md` §5.
#[test]
#[ignore = "RFC0024.2 stub — implemented in the calibration green slice"]
fn rfc0024_2_calibrated_generators_match_manifest_moments() {
todo!(
"RFC0024.2 — gross distribution moments of N generated records fall \
within documented tolerance of the manifest's"
);
}

/// Scenario RFC0024.7 — adversarial mode finds nothing today.
/// See `docs/rfcs/0024-otlp-envelope-property-testing.md` §5.
#[test]
#[ignore = "RFC0024.7 stub — implemented in the oracle green slice (the umbrella runs last)"]
fn rfc0024_7_adversarial_mode_passes_the_full_property_set() {
todo!(
"RFC0024.7 — P1-P4 pass at an elevated case count on the adversarial \
generators; any failure is a minimal reproducer by construction"
);
}
28 changes: 28 additions & 0 deletions crates/ourios-miner/tests/rfc0024_properties.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//! RFC 0024 §5 — the miner-owned pipeline properties: P2 (no silent
//! merge, `.4`) and P3 (RFC 0023 bounds, `.5`) over generated OTLP
//! batches from `ourios-testgen`. See
//! `crates/ourios-bench/tests/rfc0024_calibration.rs` for the scenario
Comment thread
jensholdgaard marked this conversation as resolved.
Resolved
//! placement map.

/// Scenario RFC0024.4 — P2: no silent merge over generated batches.
/// See `docs/rfcs/0024-otlp-envelope-property-testing.md` §5.
#[test]
#[ignore = "RFC0024.4 stub — implemented in the pipeline-properties green slice"]
fn rfc0024_4_no_silent_merge_over_generated_batches() {
todo!(
"RFC0024.4 — every generated record's row carries a template its \
line attached to under §6.3, or NO_TEMPLATE with body retained — \
never another line's template"
);
}

/// Scenario RFC0024.5 — P3: RFC 0023 bounds hold over generated streams.
/// See `docs/rfcs/0024-otlp-envelope-property-testing.md` §5.
#[test]
#[ignore = "RFC0024.5 stub — implemented in the pipeline-properties green slice"]
fn rfc0024_5_bounds_hold_over_generated_streams() {
todo!(
"RFC0024.5 — with deliberately tiny bounds, template count / node \
fan-out / line length never exceed their caps mid-stream"
);
}
16 changes: 16 additions & 0 deletions crates/ourios-parquet/tests/rfc0024_properties.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//! RFC 0024 §5 — the storage-owned pipeline property: P1 (round-trip
//! fidelity, `.3`) over generated OTLP batches from `ourios-testgen`.
//! See `crates/ourios-bench/tests/rfc0024_calibration.rs` for the
Comment thread
jensholdgaard marked this conversation as resolved.
Resolved
//! scenario placement map.

/// Scenario RFC0024.3 — P1: round-trip fidelity over generated batches.
/// See `docs/rfcs/0024-otlp-envelope-property-testing.md` §5.
#[test]
#[ignore = "RFC0024.3 stub — implemented in the pipeline-properties green slice"]
fn rfc0024_3_round_trip_fidelity_over_generated_batches() {
todo!(
"RFC0024.3 — every generated record round-trips per the RFC 0017/0018 \
fidelity contract: string bodies bit-identical, structured bodies \
canonical-JSON equal, envelope fields preserved"
);
}
18 changes: 18 additions & 0 deletions crates/ourios-querier/tests/rfc0024_properties.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//! RFC 0024 §5 — the querier-owned pipeline property: P4 (the query
//! oracle, `.6`) over generated OTLP batches and generated predicates
//! from `ourios-testgen`. See
//! `crates/ourios-bench/tests/rfc0024_calibration.rs` for the scenario
Comment thread
jensholdgaard marked this conversation as resolved.
Resolved
//! placement map.

/// Scenario RFC0024.6 — P4: the query oracle.
/// See `docs/rfcs/0024-otlp-envelope-property-testing.md` §5.
#[test]
#[ignore = "RFC0024.6 stub — implemented in the oracle green slice"]
fn rfc0024_6_querier_agrees_with_the_naive_oracle() {
todo!(
"RFC0024.6 — for generated batches and generated predicates (every \
DSL operator class per field kind, incl. promoted and non-promoted \
attribute equality), the querier's count equals a naive linear-scan \
evaluator's"
);
}
17 changes: 9 additions & 8 deletions docs/rfcs/0024-otlp-envelope-property-testing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
rfc: 0024
title: OTLP-envelope property testing and corpus-calibrated generation (RFC 0006 amendment)
status: drafted
status: red
author: Jens Holdgaard Pedersen <jens@holdgaard.org>
drafting-assistance: Claude
created: 2026-07-05
Expand Down Expand Up @@ -101,9 +101,13 @@ RFC 0003 equivalence suites already cover):
timestamps, non-ASCII and confusable keys, text-heavy bodies past
`max_line_tokens` (the Collector-fronted-legacy shape).

Both modes share one strategy module (`ourios-bench` or a
`testsupport` dev-only crate — settled at implementation time; no
production crate grows a proptest dependency).
Both modes live in **`crates/ourios-testgen`**, a dev-only crate (no
production crate grows a proptest dependency; `ourios-bench` cannot
host them because it already depends on `ourios-querier`, and the
querier's P4 suite consuming generators from it would create a
dev-dependency cycle). The crate is test infrastructure named by
this RFC per `CLAUDE.md` §7's new-crate rule; it is never published
and nothing in the workspace's production graph depends on it.
Comment thread
jensholdgaard marked this conversation as resolved.
Resolved

### 3.3 The four properties

Expand Down Expand Up @@ -203,10 +207,7 @@ querier: P4) so a failure lands at the responsible boundary.
1. **Deep-run cadence.** A scheduled high-case-count run (nightly?
weekly?) vs CI-only defaults — decide once the suite's wall-clock
is known.
2. **Generator home.** `ourios-bench` vs a dedicated dev-only
`testsupport` crate (a new crate needs the §7 layout rule
honoured — likely an RFC note, not a new top-level commitment).
3. **Trace/metric envelopes.** Out of scope (logs backend), noted
2. **Trace/metric envelopes.** Out of scope (logs backend), noted
only because the demo capture contains correlated trace ids that
generators should populate realistically.

Expand Down