Skip to content

test(ingester): red-gate the OTLP receiver — rfc0003.1–.15 acceptance stubs - #128

Merged
jensholdgaard merged 2 commits into
mainfrom
feat/otlp-receiver-red-gate
Jun 6, 2026
Merged

test(ingester): red-gate the OTLP receiver — rfc0003.1–.15 acceptance stubs#128
jensholdgaard merged 2 commits into
mainfrom
feat/otlp-receiver-red-gate

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jun 6, 2026

Copy link
Copy Markdown
Owner

What

Advances RFC 0003 (OTLP receiver) specified → red. The spec landed in #127; this encodes its §5 contract as 15 #[ignore]'d acceptance tests, one file per scenario (the WAL rfc0008_N pattern), so the contract is now greppable, failing-by-default tests rather than prose.

Each test carries the /// Scenario RFC0003.<m> — <title>. doc comment the spec mandates (per docs/verification.md §2.3 — the doc line is the contract, not the fn name) and an unimplemented!() body sketching the assertion from §5/§8.

Scenarios

id scenario id scenario
.1 WAL-before-ack [§3.4] .9 edge OTLP fields pass through
.2 crash-before-ack: at-least-once .10 dropped_attributes_count verbatim
.3 tenant fan-out [§3.7] .11 transport errors are controlled
.4 tenant resolution failure .12 empty request → success, no WAL write
.5 gRPC ≡ HTTP/protobuf decode .13 compression (identity + gzip MUST)
.6 JSON ↔ protobuf decode .14 default /v1/logs + override
.7 Body::Structured verbatim .15 concurrent WAL-before-ack [§3.4]
.8 Body::String unwrapped L_raw

Scope

Deliberately tests only — no receiver API surface and no wire-stack deps (tonic/axum/opentelemetry-proto/prost) yet. Those land in the green slices that flip these tests live, one group at a time per §8, where they're exercised under review (and adding unused deps now would just be CI dep-lint noise). The receiver module + crate docs are updated to reflect the red gate.

Verification

  • cargo test -p ourios-ingester ✓ — all 15 register as ignored ("RFC 0003 red gate — implementation pending").
  • cargo fmt --all --check
  • cargo clippy --all-targets --all-features -- -D warnings ✓ (workspace)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Updated crate-level documentation to reflect RFC0003 specification status.
    • Added comprehensive test placeholders documenting RFC0003 acceptance criteria (tests 1–15) covering WAL durability, crash resilience, tenant fan-out, transport error handling, compression, and other protocol requirements.
  • Tests

    • Added 15 new placeholder test files for RFC0003 specifications, currently marked as ignored pending implementation.

… stubs

RFC 0003 reached `specified` (#127), so this advances it `specified → red`:
encode the §5 contract as 15 `#[ignore]`'d acceptance tests, one file per
scenario (the rfc0008_N pattern), each carrying the greppable
`/// Scenario RFC0003.<m> — <title>.` doc comment per docs/verification.md
§2.3 and an `unimplemented!()` body sketching the assertion from §5/§8.

Scenarios: WAL-before-ack (.1), crash-before-ack at-least-once (.2), tenant
fan-out (.3) + resolution-failure (.4), gRPC≡HTTP-protobuf (.5) and
JSON↔protobuf (.6) decode equivalence, body Structured-verbatim (.7) /
String-unwrapped (.8), edge OTLP fields (.9), dropped_attributes_count
(.10), transport errors (.11), empty-request success (.12), compression
(.13), path config (.14), concurrent WAL-before-ack (.15).

No API surface or wire-stack deps yet — those land in the green slices that
flip these tests live, under review (and avoid unused-dep noise here). The
receiver module + crate docs are updated to reflect the red gate.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jensholdgaard, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 46 minutes and 49 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a4f1a934-bd57-46a9-b7ea-8fd195a1424b

📥 Commits

Reviewing files that changed from the base of the PR and between 64f8e20 and 3916155.

📒 Files selected for processing (15)
  • crates/ourios-ingester/tests/rfc0003_10_dropped_attributes_count.rs
  • crates/ourios-ingester/tests/rfc0003_11_transport_errors.rs
  • crates/ourios-ingester/tests/rfc0003_12_empty_request_success.rs
  • crates/ourios-ingester/tests/rfc0003_13_compression.rs
  • crates/ourios-ingester/tests/rfc0003_14_path_config.rs
  • crates/ourios-ingester/tests/rfc0003_15_concurrent_wal_before_ack.rs
  • crates/ourios-ingester/tests/rfc0003_1_wal_before_ack.rs
  • crates/ourios-ingester/tests/rfc0003_2_crash_before_ack.rs
  • crates/ourios-ingester/tests/rfc0003_3_tenant_fanout.rs
  • crates/ourios-ingester/tests/rfc0003_4_tenant_resolution_failure.rs
  • crates/ourios-ingester/tests/rfc0003_5_grpc_http_protobuf_equivalence.rs
  • crates/ourios-ingester/tests/rfc0003_6_json_protobuf_equivalence.rs
  • crates/ourios-ingester/tests/rfc0003_7_body_structured_verbatim.rs
  • crates/ourios-ingester/tests/rfc0003_8_body_string_lraw.rs
  • crates/ourios-ingester/tests/rfc0003_9_edge_otlp_fields.rs
📝 Walkthrough

Walkthrough

Updated OTLP receiver documentation from "drafted" to "red" status and added 15 ignored placeholder acceptance tests scaffolding RFC0003.1–.15 criteria (WAL-before-ack, crash resilience, tenancy, protocol equivalence, payload handling, error control, and configuration), each with unimplemented!() bodies pending implementation.

Changes

RFC0003 Acceptance Test Scaffolding

Layer / File(s) Summary
Documentation & RFC0003 status updates
crates/ourios-ingester/src/lib.rs, crates/ourios-ingester/src/receiver.rs
Crate documentation updated to reflect RFC0003 status change from "drafted" to "red", and enumerated RFC0003.1–.15 acceptance criteria as ignored tests under tests/rfc0003_*.
WAL & durability acceptance tests (RFC0003.1–.2)
crates/ourios-ingester/tests/rfc0003_1_wal_before_ack.rs, crates/ourios-ingester/tests/rfc0003_2_crash_before_ack.rs
RFC0003.1–.2 ignored tests document WAL-before-ack ordering (response success only after Wal::sync) and crash-before-ack at-least-once semantics (SIGKILL tolerance, no loss under retry) as placeholder functions.
Routing & tenancy acceptance tests (RFC0003.3–.4)
crates/ourios-ingester/tests/rfc0003_3_tenant_fanout.rs, crates/ourios-ingester/tests/rfc0003_4_tenant_resolution_failure.rs
RFC0003.3–.4 ignored tests document tenant fan-out (separate per-tenant streams without cross-contamination) and tenant resolution failure (all-or-nothing batch rejection with error reporting).
Protocol equivalence acceptance tests (RFC0003.5–.6)
crates/ourios-ingester/tests/rfc0003_5_grpc_http_protobuf_equivalence.rs, crates/ourios-ingester/tests/rfc0003_6_json_protobuf_equivalence.rs
RFC0003.5–.6 ignored tests document gRPC/HTTP/protobuf decode equivalence (byte-equal payloads) and JSON/protobuf equivalence (AnyValue tree structural equality under OTLP-JSON rules).
Payload handling acceptance tests (RFC0003.7–.9)
crates/ourios-ingester/tests/rfc0003_7_body_structured_verbatim.rs, crates/ourios-ingester/tests/rfc0003_8_body_string_lraw.rs, crates/ourios-ingester/tests/rfc0003_9_edge_otlp_fields.rs
RFC0003.7–.9 ignored tests document Body::Structured verbatim AnyValue preservation, Body::String unwrapped UTF-8 handoff, and edge field pass-through (severity_number 0, scope_name None, observed_time_unix_nano 0None without coalescing or substitution).
Error handling & configuration acceptance tests (RFC0003.10–.15)
crates/ourios-ingester/tests/rfc0003_10_dropped_attributes_count.rs, crates/ourios-ingester/tests/rfc0003_11_transport_errors.rs, crates/ourios-ingester/tests/rfc0003_12_empty_request_success.rs, crates/ourios-ingester/tests/rfc0003_13_compression.rs, crates/ourios-ingester/tests/rfc0003_14_path_config.rs, crates/ourios-ingester/tests/rfc0003_15_concurrent_wal_before_ack.rs
RFC0003.10–.15 ignored tests document dropped attributes preservation (not recomputed), transport error control (malformed protobuf, oversize bodies, unsupported content types → gRPC/HTTP error codes; no panic; no frame appended), empty request success (no WAL write), HTTP compression equivalence (identity/gzip treated equally; unsupported encodings → HTTP 415), configurable HTTP path (/v1/logs default, 404 override behavior), and concurrent WAL-before-ack ordering (per-call independent ack-after-sync ordering).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • jensholdgaard/ourios#127: Both PRs align RFC0003 status/acceptance-criteria definitions: the referenced PR updates docs/rfcs/0003-otlp-receiver.md from drafted→specified with RFC0003.1–.15 scenarios, while this PR updates ourios-ingester receiver documentation and test scaffolding to reflect those same criteria as ignored tests.
  • jensholdgaard/ourios#101: Both PRs update the crates/ourios-ingester/src/receiver.rs receiver placeholder module documentation, reflecting RFC0003 status and acceptance-criteria intent, though the referenced PR adds compactor scaffolding separately.

Poem

🐰 Fifteen tests in red await their time,
Each one a promise, placeholders sublime.
From durability's dance to tenant's refrain,
Protocol whispers and payload's campaign—
When WAL and gRPC together shall meet,
These tests will spring forth and their verdicts complete! 🌱

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'test(ingester): red-gate the OTLP receiver — rfc0003.1–.15 acceptance stubs' clearly and concisely summarizes the main change: adding 15 RFC0003 acceptance test stubs to the ingester crate with a red-gate status.
Description check ✅ Passed The description follows the template structure with a clear 'What' section, related links (RFC 0003, PR #127), and comprehensive verification details. It documents the 15 test scenarios, scope limitations, and test results.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/otlp-receiver-red-gate

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 and usage tips.

@jensholdgaard
jensholdgaard requested a review from Copilot June 6, 2026 12:37
@jensholdgaard

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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

Adds the red-gate acceptance-test stubs for RFC 0003 (OTLP receiver) in ourios-ingester, so the spec’s §5 contract is represented as greppable, failing-by-default (#[ignore]) integration tests while the receiver implementation is still pending.

Changes:

  • Added 15 #[ignore]’d integration test stubs (rfc0003_1rfc0003_15), one scenario per file, each unimplemented!()’d as the red-gate TODO list.
  • Updated ourios-ingester crate/module docs to reflect RFC 0003’s transition to specified → red and to point to the new test stubs.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
crates/ourios-ingester/tests/rfc0003_1_wal_before_ack.rs Red-gate stub for WAL-before-ack acceptance scenario
crates/ourios-ingester/tests/rfc0003_2_crash_before_ack.rs Red-gate stub for crash-before-ack / at-least-once scenario
crates/ourios-ingester/tests/rfc0003_3_tenant_fanout.rs Red-gate stub for tenant fan-out scenario
crates/ourios-ingester/tests/rfc0003_4_tenant_resolution_failure.rs Red-gate stub for tenant resolution failure semantics
crates/ourios-ingester/tests/rfc0003_5_grpc_http_protobuf_equivalence.rs Red-gate stub for gRPC vs HTTP/protobuf decode equivalence
crates/ourios-ingester/tests/rfc0003_6_json_protobuf_equivalence.rs Red-gate stub for JSON vs protobuf equivalence per OTLP-JSON rules
crates/ourios-ingester/tests/rfc0003_7_body_structured_verbatim.rs Red-gate stub for Body::Structured verbatim AnyValue semantics
crates/ourios-ingester/tests/rfc0003_8_body_string_lraw.rs Red-gate stub for Body::String pass-through/unwrapped semantics
crates/ourios-ingester/tests/rfc0003_9_edge_otlp_fields.rs Red-gate stub for edge-field preservation and wire→Option mapping
crates/ourios-ingester/tests/rfc0003_10_dropped_attributes_count.rs Red-gate stub for preserving dropped_attributes_count verbatim
crates/ourios-ingester/tests/rfc0003_11_transport_errors.rs Red-gate stub for controlled transport error handling
crates/ourios-ingester/tests/rfc0003_12_empty_request_success.rs Red-gate stub for empty request success/no WAL write
crates/ourios-ingester/tests/rfc0003_13_compression.rs Red-gate stub for HTTP compression support requirements
crates/ourios-ingester/tests/rfc0003_14_path_config.rs Red-gate stub for default path + override behavior
crates/ourios-ingester/tests/rfc0003_15_concurrent_wal_before_ack.rs Red-gate stub for concurrent export WAL-before-ack invariants
crates/ourios-ingester/src/receiver.rs Updated placeholder docs to reflect RFC 0003 specified→red and new tests
crates/ourios-ingester/src/lib.rs Updated crate docs to reference RFC 0003 red-gate tests and status

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

//! lands. The implementing PR removes the `#[ignore]` and the
//! `unimplemented!()` body together.

/// Scenario RFC0003.1 — WAL-before-ack.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 3916155 across all 15 stubs (this same comment landed on each file). The /// See docs/rfcs/0003-otlp-receiver.md §5. line now sits in the per-test doc comment directly under /// Scenario RFC0003.<m> — <title>., matching the docs/verification.md §2.3/§6.3 canonical pattern; the redundant module-level //! See line was dropped.

//! lands. Per §8 this uses a child-process harness mirroring
//! `wal_crash_fixture` (PR #126).

/// Scenario RFC0003.2 — Crash-before-ack: at-least-once with retry tolerance.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.3 — Tenant fan-out.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.4 — Tenant resolution failure rejects the entire batch.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.5 — gRPC ≡ HTTP/protobuf decode equivalence.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.11 — Transport-level errors are controlled, not panics.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.12 — Empty `ExportLogsServiceRequest` returns success without WAL write.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.13 — Compression over HTTP: identity and gzip MUST be supported.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.14 — Default `/v1/logs` path with configurable override.
//! Red gate (`specified → red`): `#[ignore]`'d until the receiver
//! lands.

/// Scenario RFC0003.15 — Concurrent `Export` calls each obey WAL-before-ack independently.
`docs/verification.md` §2.3/§6.3 pins the greppability convention as a
*per-test* doc comment carrying both the `/// Scenario <id> — <title>.`
line and the `/// See <rfc> §5.` line. The red-gate stubs had the `See`
reference on the module-level `//!` doc instead, so the per-test comment
didn't match the documented pattern. Moved `See` to a per-test `///`
line on all 15 rfc0003 stubs (and dropped the now-redundant module-level
one). Surfaced in review.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

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 17 out of 17 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