test(ingester): red-gate the OTLP receiver — rfc0003.1–.15 acceptance stubs - #128
Conversation
… 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>
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughUpdated 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 ChangesRFC0003 Acceptance Test Scaffolding
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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 unit tests (beta)
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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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_1–rfc0003_15), one scenario per file, eachunimplemented!()’d as the red-gate TODO list. - Updated
ourios-ingestercrate/module docs to reflect RFC 0003’s transition tospecified → redand 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. |
There was a problem hiding this comment.
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>
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 WALrfc0008_Npattern), 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 (perdocs/verification.md§2.3 — the doc line is the contract, not the fn name) and anunimplemented!()body sketching the assertion from §5/§8.Scenarios
[§3.4]dropped_attributes_countverbatim[§3.7]/v1/logs+ overrideBody::Structuredverbatim[§3.4]Body::StringunwrappedL_rawScope
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). Thereceivermodule + crate docs are updated to reflect the red gate.Verification
cargo test -p ourios-ingester✓ — all 15 register asignored("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
Tests