Skip to content

docs(rfc-0003): resolve §9 process model + add RFC0003.16 served-binary scenario - #139

Merged
jensholdgaard merged 5 commits into
mainfrom
docs/rfc0003-served-amendment
Jun 6, 2026
Merged

docs(rfc-0003): resolve §9 process model + add RFC0003.16 served-binary scenario#139
jensholdgaard merged 5 commits into
mainfrom
docs/rfc0003-served-amendment

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jun 6, 2026

Copy link
Copy Markdown
Owner

What

Spec-first step for the served-socket-binary slice (the entry point chosen for the §9 work). Doc-only RFC 0003 amendment that:

  1. Resolves the §9 Receiver process model open question — the receiver is a config-toggled role of the ourios-server binary (not a separate sidecar), sharing that binary's tokio runtime alongside the other roles (e.g. the compaction daemon). Default ports 4317 (gRPC) / 4318 (HTTP) per §6.1 (was "TBD, likely…").
  2. Adds §5 scenario RFC0003.16 — the end-to-end served contract: both transports bind, a real OTLP client export over each socket round-trips (transport success only after the batch is WAL-durable), and shutdown is graceful (no mid-fsync Wal drop, no loss of an acked batch).
  3. §8 maps RFC0003.16 to a real-socket integration test on ephemeral ports — the only scenario that crosses a socket (.1–.15 are in-process).

Status

RFC0003.1–.15 are implemented and were green (#138). Adding RFC0003.16 (a new, not-yet-implemented acceptance criterion) re-enters the ladder at specified — honest per the maturity model. The implementation slice (red→green) restores green.

Why an amendment (not just code)

§9 was an explicit open question, and none of the existing §5 criteria covered "the served binary binds + a real client round-trips." Specifying it first matches how the receiver itself went (spec → red → green). Merging this PR is the spec approval; the implementation follows.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • RFC updated: receiver status changed to "specified" and a new amendment (RFC0003.16 — Served binary) added.
    • Defines served-binary contract for gRPC and HTTP ingestion with transport-level success tied to durable write-ahead logging.
    • Clarifies receiver runs as a configuration-enabled role (served binary), documents default ports and shutdown/durability semantics.
    • Adds an integration test strategy and resolves prior open questions.

…ry scenario

Spec-first step for the served-socket-binary slice (the §9 process-model
resolution). Resolves the "Receiver process model" open question — the
receiver is a config-toggled role of the ourios-server binary (not a
sidecar), sharing that binary's tokio runtime; default ports 4317 (gRPC) /
4318 (HTTP) per §6.1.

Adds §5 scenario RFC0003.16 — the end-to-end served contract: both
transports bind, a real OTLP client export over each socket round-trips
(success only after the batch is WAL-durable), and shutdown is graceful
(no mid-fsync Wal drop, no loss of an acked batch). §8 maps it to a
real-socket integration test on ephemeral ports (the only scenario that
crosses a socket; .1–.15 are in-process).

This new acceptance criterion re-enters the ladder at `specified` (.1–.15
remain implemented; .16 is pending its red→green pass).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jensholdgaard
jensholdgaard requested a review from Copilot June 6, 2026 20:02
@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.

@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 26 minutes and 48 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: 6c0e9d8d-b151-4a10-9496-274062b39640

📥 Commits

Reviewing files that changed from the base of the PR and between 6868668 and a10b3b6.

📒 Files selected for processing (1)
  • docs/rfcs/0003-otlp-receiver.md
📝 Walkthrough

Walkthrough

RFC 0003 moved to "specified" and added RFC0003.16 served-binary: an end-to-end real-socket acceptance contract (gRPC and HTTP) requiring WAL durability before transport success, graceful shutdown without losing acked batches, and a served-binary integration test using WAL::replay. Receiver is a role inside ourios-server on ports 4317/4318.

Changes

RFC0003 OTLP Receiver Specification

Layer / File(s) Summary
RFC0003.16 served-binary acceptance scenario
docs/rfcs/0003-otlp-receiver.md
RFC status updated to specified. Introduced amendment adding RFC0003.16 scenario: end-to-end real gRPC and HTTP socket contract with WAL durability verification via Wal::replay and graceful shutdown guarantee that must not drop already-acked batches.
Receiver implementation design and process model
docs/rfcs/0003-otlp-receiver.md
Clarified receiver as configuration-enabled role within ourios-server binary (not separate sidecar), sharing tokio runtime and binding operator-configured default ports 4317/4318. Resolved open "Receiver process model" question and tied served-binary contract to RFC0003.16.
Testing strategy and open questions
docs/rfcs/0003-otlp-receiver.md
Expanded testing strategy to include RFC0003.16 integration test: boots ourios-server on ephemeral ports, uses real gRPC and HTTP clients to export non-empty batch, verifies WAL durability via Wal::replay, asserts clean shutdown/join without losing already-acked batch; marked partial-success semantics resolved (all-or-nothing by default).

Possibly related PRs

  • jensholdgaard/ourios#127: Both PRs modify docs/rfcs/0003-otlp-receiver.md; #127 covered RFC0003.1–.15 framework while this PR adds RFC0003.16 served-binary.
  • jensholdgaard/ourios#65: Related RFC updates concerning WAL durability semantics and replay semantics referenced by RFC0003.16.

Poem

🐰 I nibbled through the spec tonight,
Served-binary shining in the light,
WAL replay keeps each batch in sight,
Ports 4317 and 4318 take flight,
Ourios-server hums—durable and right. 🚀

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: resolving an open question in RFC 0003 section 9 and adding a new served-binary scenario RFC0003.16.
Description check ✅ Passed The description provides comprehensive context (What, Status, Why sections), clearly explains the RFC amendment, and links RFC 0003. However, it does not follow the provided template structure with sections like Summary, Related, and Checklist.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docs/rfc0003-served-amendment

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.

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

This PR amends RFC 0003 (OTLP receiver) to specify the “served-binary” slice: it resolves the §9 receiver process model (receiver as a config-toggled role within ourios-server) and adds a new end-to-end acceptance scenario that exercises real sockets and graceful shutdown semantics, regressing the RFC status back to specified until that scenario is implemented.

Changes:

  • Regress RFC 0003 status from greenspecified due to the new not-yet-implemented acceptance criterion.
  • Add §5 Scenario RFC0003.16 defining the served-binary end-to-end contract (bind both transports, real client round-trip, WAL-before-ack, graceful shutdown).
  • Resolve §9 “Receiver process model” and specify default ports 4317 (gRPC) / 4318 (HTTP), plus map RFC0003.16 to a real-socket integration test in §8.

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

Comment on lines +1027 to +1036
- **Served binary** (RFC0003.16): an integration test boots the
`ourios-server` receiver role bound on ephemeral ports
(`:0`), exports a non-empty batch over each transport with a
*real* client — a `tonic` gRPC client and an HTTP client
(`reqwest`/`hyper`) — asserts transport success, then opens
the WAL and `replay`s to confirm each batch's `OtlpBatch`
frame is durable (WAL-before-ack over a real socket). A
second arm signals shutdown and asserts the server task joins
cleanly without losing an already-acked batch. Unlike
RFC0003.1–.15 (in-process: direct handler call / `oneshot`),

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 the latest commit. Both the §5 scenario and the §8 bullet now make the durability check explicitly follow graceful shutdown: the server task joins (releasing the single-writer Wal handle, RFC 0008 §3.1), and only then does the test open the WAL and run Wal::replay. The WAL cannot be reopened while the server holds it, so replay-after-shutdown is the only correct ordering. Also switched the awkward "replays" to an explicit Wal::replay.

…s the WAL

Review fix: the §5/§8 wording implied opening a second Wal for replay
while the server still held the single-writer handle. The durability
check necessarily follows graceful shutdown (which releases the Wal, RFC
0008 §3.1); reworded both, and reference Wal::replay explicitly.

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 1 out of 1 changed files in this pull request and generated no new comments.

…e-batch reject)

The maintainer OTLP review confirms the all-or-nothing batch contract
(§6.3 / RFC0003.4) is spec-compliant: OTLP mandates only 400 + no-retry
for permanently-bad input and does not require accepting a valid subset;
partial_success is supported but optional. Mark the §9 partial-success
open question resolved (keep whole-batch reject; defer partial_success).

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 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread docs/rfcs/0003-otlp-receiver.md Outdated
Comment on lines +560 to +563
> - **When** a real OTLP client exports a non-empty batch
> (resolvable tenant) over each bound socket — gRPC `Export`
> and HTTP `POST /v1/logs` (`application/x-protobuf`) — and
> the server is then signalled to shut down

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.

Fixed in the latest commit — the When clause now states the client receives each transport response and only then is shutdown signalled (the steady-state export→ack→shutdown path), matching §8. In-flight-during-shutdown behaviour is explicitly out of scope for this scenario.

Review fix: the When clause was ambiguous about in-flight-during-shutdown.
Make explicit that the client receives each transport response and only
then is shutdown signalled (the steady-state export→ack→shutdown path),
matching §8; in-flight-during-shutdown is out of scope for this scenario.

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 1 out of 1 changed files in this pull request and generated 1 comment.

Comment on lines +1035 to +1038
- **Served binary** (RFC0003.16): an integration test boots the
`ourios-server` receiver role bound on ephemeral ports
(`:0`), exports a non-empty batch over each transport with a
*real* client — a `tonic` gRPC client and an HTTP client

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.

Fixed — changed :0 to 127.0.0.1:0 (read back the OS-assigned port), which is a valid SocketAddr literal; the bare :0 was ambiguous.

Review fix: bare :0 is not a valid socket-address literal; the integration
test binds 127.0.0.1:0 and reads back each OS-assigned port.

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 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +555 to +559
> - **Given** `ourios-server` started with the receiver role
> enabled (config-toggled per the §9 resolution), the gRPC
> listener bound on its configured port (default 4317) and
> the HTTP listener on its (default 4318), both sharing one
> `IngestPipeline` over a single `Wal`

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.

Addressed in #140 — the HTTP-listener Given clause now reads "bound on its configured port (default 4318)".

Comment on lines +573 to +575
> without dropping it mid-fsync or losing a batch that was
> already acked (no in-flight, already-fsync'd batch is lost
> on the way out)

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.

Addressed in #140 — reworded to "no already-acked batch is lost on the way out", dropping the contradictory "in-flight, already-fsync'd" phrasing.

@jensholdgaard
jensholdgaard merged commit 31c6455 into main Jun 6, 2026
11 checks passed
@jensholdgaard
jensholdgaard deleted the docs/rfc0003-served-amendment branch June 6, 2026 22:02
jensholdgaard added a commit that referenced this pull request Jun 6, 2026
Red-gate step for the served-binary slice (docs/verification.md §3
two-loop): an #[ignore]'d ourios-server integration stub for RFC0003.16,
greppable to the scenario, flipped by the implementation.

Also folds in the two trailing Copilot prose nits on the RFC0003.16
scenario (from #139): the HTTP-listener Given clause now reads "bound on
its configured port (default 4318)" (was missing the noun), and the
shutdown bullet drops the contradictory "in-flight, already-fsync'd"
phrasing for "no already-acked batch is lost on the way out". No semantic
change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jensholdgaard added a commit that referenced this pull request Jun 6, 2026
#140)

Red-gate step for the served-binary slice (docs/verification.md §3 two-loop):
an #[ignore]'d ourios-server integration stub for RFC0003.16, plus the two
trailing Copilot prose nits on the RFC0003.16 scenario from #139 (HTTP-listener
Given clause noun; shutdown-bullet rewording). No semantic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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