Skip to content

docs(rfc): configuration file — YAML + env substitution (RFC 0020) - #320

Merged
jensholdgaard merged 1 commit into
mainfrom
docs/rfc-0020-config-file
Jun 30, 2026
Merged

jensholdgaard merged 1 commit into
mainfrom
docs/rfc-0020-config-file

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jun 30, 2026

Copy link
Copy Markdown
Owner

What

Specifies RFC 0020 — Server configuration file: a YAML config for ourios-server, selected with --config <path>, with OpenTelemetry-Config-WG-style environment-variable substitution (${env:NAME}, ${NAME}, ${env:NAME:-default}, $$ escape; scalar-only, non-recursive).

Per the maintainer's two design decisions:

  • File-authoritative (OTel-pure): when --config is given, config comes from the file; env participates only via ${env:…} inside it. No --config → today's pure-OURIOS_*-env path, unchanged (non-breaking).
  • New RFC (not an amendment): RFC 0004 stays the what (tunables vs invariants); this is the how (delivery mechanism). One resolved ServerConfig, one validation path.

Scope

  • Self-contained — no dependency on the storage/query/miner subsystems or the DataFusion/Arrow upgrade.
  • Secrets only via ${env:…} (never inline); extends RFC 0019 §3.4 secret-hygiene to the file path.
  • Substitution resolver is a pure, property-testable module; the OTel WG's published input→output vector table is adopted as the conformance set.
  • 6 acceptance scenarios (RFC0020.1.6). Helm chart migration to a ConfigMap is a tracked follow-on, out of scope here.

Status

specified (§§1–8 complete, §5 scenarios have ids). Holding implementation for maintainer sign-off per CLAUDE.md §5.3 — this PR is the spec to review/sign off, not a code change. Open questions in §7.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added RFC 0020 covering a new YAML-based server configuration file option.
    • Documented supported environment-variable substitution syntax, strict validation rules, and secret-handling safeguards.
    • Added the RFC to the project’s RFC index for easier discovery.

@jensholdgaard
jensholdgaard requested a review from Copilot June 30, 2026 13:17
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

Next review available in: 20 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e1dc49a-5299-4461-9fe2-b96fd9bda5be

📥 Commits

Reviewing files that changed from the base of the PR and between 3110d5f and 610f4c9.

📒 Files selected for processing (2)
  • docs/SUMMARY.md
  • docs/rfcs/0020-configuration-file.md
📝 Walkthrough

Walkthrough

Adds RFC 0020, a new 336-line document specifying a YAML-based server configuration file mechanism with environment-variable substitution, schema definition, alternatives considered, acceptance criteria, testing strategy, and open questions. Also adds the corresponding entry in docs/SUMMARY.md.

Changes

RFC 0020 — Configuration File

Layer / File(s) Summary
RFC design: purpose, motivation, and proposed spec
docs/rfcs/0020-configuration-file.md
Defines --config <path> CLI flag making a YAML file the authoritative ServerConfig source, env-variable substitution model (OTel grammar, scalar-only, non-recursive, $$ escaping), YAML schema with strict unknown-key handling, secret hygiene rules, and crate placement.
Alternatives, acceptance criteria, testing, and open questions
docs/rfcs/0020-configuration-file.md
Documents rejected alternatives (env layering, bespoke templating, TOML/JSON, multi-config merge), acceptance criteria scenarios, testing strategy (property/unit/regression tests), open questions, and references.
SUMMARY.md index entry
docs/SUMMARY.md
Inserts the RFC 0020 bullet link into the RFCs navigation list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A YAML file hops into view,
With --config to point the way through,
${env:NAME} swaps in secrets clean,
No bare credentials to be seen —
The rabbit approves this tidy new scheme! 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed, but it does not follow the required Summary/Related/Checklist template. Add the missing Summary, Related, and Checklist sections, including RFC link and status for fmt, clippy, tests, and docs updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the RFC and the configuration-file YAML substitution change.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/rfc-0020-config-file

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.

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 adds the RFC 0020 specification describing a new ourios-server YAML configuration file selected via --config <path>, including OpenTelemetry-style environment-variable substitution, and indexes it in the docs RFC summary.

Changes:

  • Adds RFC 0020 describing the configuration-file mode, substitution rules, schema shape, and acceptance scenarios.
  • Updates the mdBook docs/SUMMARY.md to include RFC 0020 in the RFC list.

Reviewed changes

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

File Description
docs/SUMMARY.md Adds RFC 0020 to the RFC index so it appears in the rendered book.
docs/rfcs/0020-configuration-file.md Introduces the full RFC 0020 spec for YAML config + env substitution and acceptance criteria.

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

Comment thread docs/rfcs/0020-configuration-file.md Outdated
Comment thread docs/rfcs/0020-configuration-file.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/rfcs/0020-configuration-file.md (1)

96-100: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Fix undefined non-terminals and notation label in §3.3 grammar.

The grammar block uses GENERIC-SUBSTITUTION (line 97) which is never defined — only ENV-SUBSTITUTION (line 98) exists. PREFIX (line 97) is also undefined. Additionally, the parenthetical calls this "PCRE2", but the notation is ABNF-style, not PCRE2.

📝 Proposed fix
-The grammar (non-normative PCRE2, normative ABNF is the WG spec):
+The grammar (non-normative ABNF; normative ABNF is the WG spec):
 
 ```text
-SUBSTITUTION-REF = ${ (PREFIX ":")? GENERIC-SUBSTITUTION }
+SUBSTITUTION-REF = ${ ( ( "env" ":" )? ENV-SUBSTITUTION ) }
 ENV-SUBSTITUTION = ENV-NAME ( ":-" DEFAULT-VALUE )?
 ENV-NAME         = [A-Za-z_][A-Za-z0-9_]*
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @docs/rfcs/0020-configuration-file.md around lines 96 - 100, Fix the §3.3
grammar so it only references defined non-terminals and uses the correct
notation label. Update the SUBSTITUTION-REF rule to point to ENV-SUBSTITUTION
instead of the undefined GENERIC-SUBSTITUTION, and replace the undefined PREFIX
token with the intended literal prefix form in the same grammar block. Also
change the parenthetical label from PCRE2 to ABNF-style notation to match the
syntax used by ENV-SUBSTITUTION and ENV-NAME.


</details>

<!-- cr-comment:v1:37b5d7f7fee12575bd475c73 -->

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @docs/rfcs/0020-configuration-file.md:

  • Around line 96-100: Fix the §3.3 grammar so it only references defined
    non-terminals and uses the correct notation label. Update the SUBSTITUTION-REF
    rule to point to ENV-SUBSTITUTION instead of the undefined GENERIC-SUBSTITUTION,
    and replace the undefined PREFIX token with the intended literal prefix form in
    the same grammar block. Also change the parenthetical label from PCRE2 to
    ABNF-style notation to match the syntax used by ENV-SUBSTITUTION and ENV-NAME.

</details>

---

<details>
<summary>ℹ️ Review info</summary>

<details>
<summary>⚙️ Run configuration</summary>

**Configuration used**: defaults

**Review profile**: CHILL

**Plan**: Pro Plus

**Run ID**: `fd531807-6a5a-4221-8896-bc14d81ce0cb`

</details>

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 697b771f224ecad715be66238806a82f94e58c31 and 3110d5f999af95dfd96cae72bbd0e92dfb24fea6.

</details>

<details>
<summary>📒 Files selected for processing (2)</summary>

* `docs/SUMMARY.md`
* `docs/rfcs/0020-configuration-file.md`

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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

Comment thread docs/rfcs/0020-configuration-file.md Outdated

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

Comment thread docs/rfcs/0020-configuration-file.md Outdated

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

Comment thread docs/rfcs/0020-configuration-file.md Outdated
Comment thread docs/rfcs/0020-configuration-file.md
Comment thread docs/rfcs/0020-configuration-file.md Outdated
Comment thread docs/rfcs/0020-configuration-file.md Outdated

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

Comment thread docs/rfcs/0020-configuration-file.md
Comment thread docs/rfcs/0020-configuration-file.md Outdated
Comment thread docs/rfcs/0020-configuration-file.md Outdated
…ecified)

A YAML config file for ourios-server (--config <path>) holding Ourios's
own data-plane tunables (storage / receiver / querier / compaction), with
OpenTelemetry-Config-WG env substitution (${env:NAME}/${NAME}, :-default,
$$ escape; on parsed scalar VALUES only — keys never candidates, results
never re-parsed into structure; type resolved on the substituted scalar;
malformed ${…} refs in value position are a whole-file error; undefined-
no-default is style-dependent). File-authoritative when --config is given;
the pure-OURIOS_*-env path is unchanged when absent (non-breaking).

Scope boundary (§3.8): the standard OTEL_* SDK environment is deliberately
NOT modeled in the config — it configures Ourios's own telemetry SDK and
is read by the SDK directly per the OTel env-var spec (no otel: section).
RFC 0004 stays the *what* (tunables vs invariants); this is the *how*.
6 §5 scenarios (RFC0020.1-.6). Held for maintainer sign-off (§5.3).

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