From 5f3fbba122ef3cfbeda2c56f00024b59e443df88 Mon Sep 17 00:00:00 2001 From: Jens Holdgaard Pedersen Date: Mon, 15 Jun 2026 11:04:28 +0200 Subject: [PATCH 1/2] =?UTF-8?q?docs(rfc-0010):=20flip=20audit-stream/drift?= =?UTF-8?q?=20queries=20to=20green=20(=C2=A75=20RFC0010.1-.8=20pass)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/rfcs/0010-audit-stream-queries.md | 46 ++++++++++++++++---------- docs/roadmap.md | 7 ++-- 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/docs/rfcs/0010-audit-stream-queries.md b/docs/rfcs/0010-audit-stream-queries.md index df1829f66..ea05d813a 100644 --- a/docs/rfcs/0010-audit-stream-queries.md +++ b/docs/rfcs/0010-audit-stream-queries.md @@ -1,7 +1,7 @@ --- rfc: 0010 title: Audit-stream queries & template drift -status: specified +status: green author: Jens Holdgaard Pedersen drafting-assistance: Claude created: 2026-06-09 @@ -11,22 +11,34 @@ superseded-by: — # RFC 0010 — Audit-stream queries & template drift -> **Status note.** **`specified`.** The dedicated `drift` surface (a -> contained query head, not the general aggregation pipeline) was -> maintainer-confirmed 2026-06-09. This RFC fills the audit-stream -> query gap that RFC 0002 §6.3 deferred ("drift is an audit-stream -> property, not a column in the RFC 0005 data files, so it needs an -> audit-stream query path — a future capability"). It specifies a -> first-class, contained **`drift`** query over the per-tenant RFC 0005 -> `audit/` Parquet stream, encapsulating the fixed aggregation that -> RFC 0001 §6.7 wrote out as SQL "for spec clarity". The §5 criteria -> below flip RFC 0001 scenario **H5.3** -> (`crates/ourios-miner/tests/hazards.rs::h5_3_drift_query_returns_templates_that_gained_a_version`, -> currently `#[ignore]` / `todo!()`). This RFC **extends** RFC 0002 (it -> does not reopen or renumber it; RFC 0002 stays `green`) and **reads** -> the RFC 0005 audit schema (it does not redefine it). Hazard 6 -> (`CLAUDE.md` §4 — no DataFusion/SQL leakage) constrains the surface: -> drift is exposed through the DSL, never as raw SQL. +> **Status note.** **`green`** (2026-06-15) — all eight §5 acceptance +> scenarios (RFC0010.1–.8) have live, passing tests in +> `crates/ourios-querier/tests/drift.rs`: drift returns drifted templates +> with counts (.1), half-open `[from, to)` window (.2), `event_type` +> scoping excludes non-widenings (.3), tenant isolation (.4), +> empty-is-empty-not-error (.5), `widening_count` desc / `template_id` asc +> ordering (.6), aggregate version/time bounds (.7), no DataFusion/SQL +> leakage (.8). The dedicated `drift` surface (a contained query head, not +> the general aggregation pipeline) was maintainer-confirmed 2026-06-09; +> this RFC fills the audit-stream query gap RFC 0002 §6.3 deferred, +> encapsulating the fixed aggregation RFC 0001 §6.7 wrote out as SQL "for +> spec clarity". +> +> **RFC0010.1 discharges RFC 0001 H5.3.** That hazard test was *relocated* +> out of `ourios-miner/tests/hazards.rs` (now a relocation pointer there) +> to `ourios-querier/tests/drift.rs::h5_3_drift_query_returns_templates_that_gained_a_version`, +> where the `drift` surface lives — it is no longer `#[ignore]` / `todo!()`. +> +> This RFC **extends** RFC 0002 (it does not reopen or renumber it; RFC 0002 +> stays `green`) and **reads** the RFC 0005 audit schema (it does not +> redefine it). Hazard 6 (`CLAUDE.md` §4 — no DataFusion/SQL leakage) +> constrains the surface: drift is exposed through the DSL, never as raw SQL. +> +> **Open for `accepted` (non-gating for `green`, per §9):** the verb-head +> fork is resolved; the remaining §9 items (range-clause vs stage token, +> mandatory vs default window, tie-break stability, cross-kind version +> aggregation) are maintainer confirmations. General audit aggregation +> stays out of scope (§3.2). ## 1. Summary diff --git a/docs/roadmap.md b/docs/roadmap.md index 82dd2ebb0..3c568bf3b 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -2,8 +2,9 @@ > Living document. Refreshed at phase boundaries (§4) and whenever > a merged PR materially changes the *current state* in §3. -> Last updated: **2026-06-15** — RFC 0005 (Parquet storage) flipped to -> `green` (the RFC0005.6 row-group-sizing test landed). Earlier, on +> Last updated: **2026-06-15** — RFC 0005 (Parquet storage) and RFC 0010 +> (audit-stream / drift queries) flipped to `green` (RFC0005.6 row-group +> sizing landed; RFC 0010's eight §5 drift scenarios all pass). Earlier, on > 2026-06-14, RFC 0001, RFC 0008, and RFC 0011 flipped > to `accepted` (maintainer sign-off). RFC 0001 reached `validated` first > (C1/C2 pass authoritatively on the `benchmarks.md` §1 baseline hardware, @@ -108,7 +109,7 @@ captured by B1/B2 (see `benchmarks.md` §2 / §7). | 0007 | Querier (DataFusion + logs DSL) | **`validated`** | | 0008 | WAL | **`accepted`** | | 0009 | Background compaction | **`green`** — §5 RFC0009.1–.6 pass (manifest + `gc_orphans` + sweep; #206/#207/#208/#209); .7 (D2/D3 benches) deferred to `validated` | -| 0010 | Audit-stream / drift queries | `specified` — the `drift` surface is implemented; general audit aggregation deferred | +| 0010 | Audit-stream / drift queries | **`green`** — all 8 §5 scenarios pass (`ourios-querier/tests/drift.rs`); discharges RFC 0001 H5.3; §9 items are `accepted`-gating; general audit aggregation deferred (§3.2) | | 0011 | A1 re-scope | **`accepted`** | **Crates — all ten product crates are implemented** (`ourios-core`, From 1804c226185bd52096a725c787f8df4ca7d91c58 Mon Sep 17 00:00:00 2001 From: Jens Holdgaard Pedersen Date: Mon, 15 Jun 2026 11:10:07 +0200 Subject: [PATCH 2/2] docs(rfc-0010): use crates/-prefixed test paths (copilot) --- docs/rfcs/0010-audit-stream-queries.md | 4 ++-- docs/roadmap.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/rfcs/0010-audit-stream-queries.md b/docs/rfcs/0010-audit-stream-queries.md index ea05d813a..ee79fcf77 100644 --- a/docs/rfcs/0010-audit-stream-queries.md +++ b/docs/rfcs/0010-audit-stream-queries.md @@ -25,8 +25,8 @@ superseded-by: — > spec clarity". > > **RFC0010.1 discharges RFC 0001 H5.3.** That hazard test was *relocated* -> out of `ourios-miner/tests/hazards.rs` (now a relocation pointer there) -> to `ourios-querier/tests/drift.rs::h5_3_drift_query_returns_templates_that_gained_a_version`, +> out of `crates/ourios-miner/tests/hazards.rs` (now a relocation pointer +> there) to `crates/ourios-querier/tests/drift.rs::h5_3_drift_query_returns_templates_that_gained_a_version`, > where the `drift` surface lives — it is no longer `#[ignore]` / `todo!()`. > > This RFC **extends** RFC 0002 (it does not reopen or renumber it; RFC 0002 diff --git a/docs/roadmap.md b/docs/roadmap.md index 3c568bf3b..ab5512401 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -109,7 +109,7 @@ captured by B1/B2 (see `benchmarks.md` §2 / §7). | 0007 | Querier (DataFusion + logs DSL) | **`validated`** | | 0008 | WAL | **`accepted`** | | 0009 | Background compaction | **`green`** — §5 RFC0009.1–.6 pass (manifest + `gc_orphans` + sweep; #206/#207/#208/#209); .7 (D2/D3 benches) deferred to `validated` | -| 0010 | Audit-stream / drift queries | **`green`** — all 8 §5 scenarios pass (`ourios-querier/tests/drift.rs`); discharges RFC 0001 H5.3; §9 items are `accepted`-gating; general audit aggregation deferred (§3.2) | +| 0010 | Audit-stream / drift queries | **`green`** — all 8 §5 scenarios pass (`crates/ourios-querier/tests/drift.rs`); discharges RFC 0001 H5.3; §9 items are `accepted`-gating; general audit aggregation deferred (§3.2) | | 0011 | A1 re-scope | **`accepted`** | **Crates — all ten product crates are implemented** (`ourios-core`,