docs(rfc-0001): extend §5 with OTLP-receiver acceptance criteria - #25
Merged
jensholdgaard merged 2 commits intoMay 14, 2026
Merged
Conversation
The §6.1 amendment (PR #21) and §6.2 algorithm rewrite (PR #23) moved the miner's contract to consume `OtlpLogRecord` and added the `body.kind` fork plus the `(severity_number, scope_name, ...)` template-key tuple — but no §5 acceptance criteria covered the new commitments. RFC 0003 (PR #24) settled the receiver side; this PR closes the corresponding gap on the miner side. Added scenarios: - §5.1 H1.4 — `severity_number` is part of the template key; no silent INFO/ERROR merge. - §5.1 H1.5 — `scope_name` is part of the template key; no cross-scope merge; `None` is its own bucket. - §5.2 §3.7.3 — Tenant derivation runs per `ResourceLogs`, not per export batch. - §5.3 RFC0001.9 — `body_kind = Structured` short-circuits to a structured-template id (locks the §6.2 step-0 fork). - §5.3 RFC0001.10 — `time_unix_nano` preserved verbatim from the wire (gates `docs/benchmarks.md` B1). - §5.3 RFC0001.11 — `severity_number = 0` and `scope_name = None` are distinct key buckets. Scenario IDs follow the existing `H<n>.<m>` / `§3.<n>.<m>` / `RFC0001.<m>` grammar from `docs/rfcs/README.md` (no new namespace introduced). §6.x design content unchanged; this is purely §5 acceptance criteria. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
jensholdgaard
force-pushed
the
docs/rfc-0001-otlp-receiver-acceptance-criteria
branch
from
May 14, 2026 15:58
f1adcf8 to
4141b89
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates RFC 0001’s §5 acceptance criteria to cover miner-side commitments introduced by the OTLP alignment work (severity/scope in the template key, structured-body short-circuit, per-ResourceLogs tenancy fan-out, and timestamp carry-through).
Changes:
- Add hazard scenarios ensuring
severity_numberandscope_nameparticipate in the template key (preventing silent cross-bucket merges). - Add an invariant scenario pinning tenant derivation to per-
ResourceLogssemantics (not per export batch). - Add RFC-internal scenarios for the structured-body fork, verbatim
time_unix_nanopreservation, and edge buckets (severity_number=0,scope_name=None).
Comments suppressed due to low confidence (1)
docs/rfcs/0001-template-miner.md:577
- Scenarios RFC0001.9–RFC0001.11 add new acceptance-criteria ids, but there are no matching test stubs yet (e.g.
crates/ourios-miner/tests/rfc_internal.rscurrently stops at RFC0001.8). To preserve the documentedgrep -R "RFC0001.9" .bidirectional mapping (RFC §5 preface /docs/verification.md§2.3), please add ignored test stubs for RFC0001.9–.11 (and update the §8 testing-strategy coverage lists accordingly).
> **Scenario RFC0001.9 — `body_kind = Structured` short-circuits to a structured-template id**
> - **Given** an `OtlpLogRecord` whose `body` is `AnyValue::Kvlist`
> (or any non-`String` `AnyValue` variant)
> - **When** the record is ingested
> - **Then** the §6.2 algorithm skips tokenize/mask/descend per
> step 0 and allocates or reuses the structured-template id
> for `(severity_number, scope_name, BodyKind::Structured)`
> - **And** the emitted record has `body_kind = Structured`
> - **And** the `body` column carries the OTLP-canonical JSON
> encoding produced upstream per RFC 0003 §6.4
> - **And** `params` and `separators` are empty
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses PR #25 review (verification.md §2.3 greppability): every scenario id must appear in a test doc comment so `grep -R "<id>" .` resolves bidirectionally between RFC and tests. New stubs (all `#[ignore]` per the existing Red-gate pattern, each with a `todo!()` pointing at the §6 section the implementation lives in): - crates/ourios-miner/tests/hazards.rs - H1.4 — `severity_number` is part of the template key - H1.5 — `scope_name` is part of the template key - crates/ourios-miner/tests/invariants.rs - §3.7.3 — Tenant derivation runs per `ResourceLogs`. The test's doc comment also clarifies the layer split: this stub asserts the miner-side contract (per-record `tenant_id` correctness once records arrive); the receiver-side derivation test belongs to RFC 0003 §6.3. - crates/ourios-miner/tests/rfc_internal.rs - RFC0001.9 — body_kind = Structured short-circuit - RFC0001.10 — time_unix_nano preserved verbatim - RFC0001.11 — severity = 0 / scope_name = None edge buckets RFC 0001 §8 (Testing strategy) extended with two bullets so the new ids are mapped to techniques in the same place §3.7.1/§3.7.2 and the existing scenarios are mapped: - "Per-`ResourceLogs` tenant derivation (miner-side stub)" — covers §3.7.3, calls out the receiver-side ownership split. - "OTLP-aligned template-key tests" — covers H1.4, H1.5, RFC0001.9, RFC0001.10, RFC0001.11. Verified locally: `cargo fmt --check`, `cargo clippy --all-targets --all-features -- -D warnings`, `cargo test --all-features` (3 passed, 10 ignored, 0 failed), `mdbook build`, and `grep -RIn <id>` resolves to RFC + test + §8 mapping for each new id. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
5 tasks
2 tasks
jensholdgaard
added a commit
that referenced
this pull request
May 22, 2026
* docs(roadmap): refresh §3 — Phase 2 closed, Phase 3 unblocked Brings the "current state" snapshot up to date now that PR-D through PR-G have landed `ourios-parquet` end-to-end. - Date stamp bumped 2026-05-13 → 2026-05-22. - RFC 0001 §5 scenarios green: 6 / 29 → 18 / 35 (the +6 is RFC 0001's OTLP scenarios added in PR #25; the +12 green is Phase 1's miner work — widening, type expansion, degenerate guard, three-zone confidence, reconstruct, OVERFLOW). - Test-count headline: 48 / 23 → 225 / 18. - Adds an `ourios-parquet` block listing the §3.2 / §3.7 / §3.4 / §3.9 surfaces actually in place: schemas, writer, reader, audit writer, audit reader, partition derivation, atomic publish + poisoning contract. - Updates the per-crate `ourios-core` and `ourios-miner` blocks for the additions since the last snapshot (TenantConfig per-tenant overrides, AuditEvent / ParamType::Unknown, best-candidate attach, OVERFLOW, reconstruct). - Updates the "blockers for thesis gates" table: A1/B1/B2 now name `ourios-bench` and `ourios-querier` as the remaining pieces; the Parquet writer and reader are no longer blockers. - Notes RFC 0005's status frontmatter is still `drafted` while 10 / 11 acceptance criteria are green — a follow-up maintainer sign-off bumps it to `green` once RFC0005.6's corpus fixture lands (or is explicitly deferred via §7's open question on slow-test CI cadence). §4 (phase scope) and §5 (deferred capabilities) are unchanged — WAL durability and OTLP wire endpoints stay post-MVP per the existing deferral rationale. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fixup! docs(roadmap): refresh §3 — Phase 2 closed, Phase 3 unblocked Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The §6.1 amendment (#21) and §6.2 algorithm rewrite (#23) moved the miner's contract to consume
OtlpLogRecordand introduced thebody.kindfork plus the(severity_number, scope_name, …)template-key tuple — but no §5 acceptance criteria covered those commitments. RFC 0003 (#24) settled the receiver side; this PR closes the corresponding gap on the miner side. Wave 3 of the OTLP-alignment sequence (#20 → #21 → #22 → #23 → #24 → this).Changes
Added six scenarios under the existing §5 structure (no new subsection, no new ID namespace):
severity_numberis part of the template key; no silent INFO/ERROR merge.scope_nameis part of the template key; no cross-scope merge;Noneis its own bucket.ResourceLogs, not per export batch.body_kind = Structuredshort-circuits to a structured-template id (locks the §6.2 step-0 fork).time_unix_nanopreserved verbatim from the wire (gatesdocs/benchmarks.mdB1).severity_number = 0andscope_name = Noneare distinct key buckets.Scenario IDs follow the
H<n>.<m>/§3.<n>.<m>/RFC0001.<m>grammar already specified indocs/rfcs/README.md.Invariant / hazard touch
ResourceLogsderivation rule; previously §3.7 only had cross-tenant scenarios at the cluster level.H3 / §3.4 (WAL-before-ack) intentionally not added to RFC 0001's hazards-in-scope: the miner crate does not enforce H3 — RFC 0003 §6.5 (receiver) and the future
ourios-walRFC do.Test plan
mdbook buildclean locally🤖 Generated with Claude Code