Skip to content

test(rfc0016): red — §5 query-endpoint stubs + status - #282

Merged
jensholdgaard merged 1 commit into
mainfrom
rfc0016-red
Jun 22, 2026
Merged

test(rfc0016): red — §5 query-endpoint stubs + status#282
jensholdgaard merged 1 commit into
mainfrom
rfc0016-red

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jun 22, 2026

Copy link
Copy Markdown
Owner

RFC 0016 — query-serving endpoint (red)

Encodes the seven §5 acceptance scenarios as #[ignore]d todo!() stubs and flips the RFC status specified → red (its RFC 0017 dependency — the typed-row payload — is now green in main).

Scenario What it pins
.1 POST /v1/queryrun_query → 200 with rows + pruning stats
.2 X-Ourios-Tenant enforced at the API; missing header → 400 pre-scan
.3 drift … routes to run_driftDriftResult
.4 malformed DSL → 400, no DataFusion/SQL/plan leak (H6)
.5 role env-gated + graceful shutdown
.6 pruning observable + OTel query metric
.7 receiver + querier compose in one binary

Bare todo!() bodies (no impl refs) → the stubs compile and are #[ignore]d, so default cargo test / CI stay green. Green follows scenario-group by scenario-group (transport + handler, then env-gating/main wiring, then metrics).

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Tests

    • Added acceptance test stubs for the query endpoint functionality.
  • Documentation

    • Updated RFC status metadata for the query serving endpoint specification.

Encode the seven RFC 0016 §5 acceptance scenarios as #[ignore]d todo!()
stubs (greppable RFC0016.N ids, verification.md §2.3 doc format) and flip
the RFC status specified -> red:

.1 serves a DSL query end-to-end; .2 tenant header enforced at the API;
.3 drift routes to run_drift; .4 malformed DSL → 400 no engine leak (H6);
.5 role gating + graceful shutdown; .6 pruning observable + OTel metric;
.7 receiver + querier compose in one binary.

Stubs are #[ignore]d so default cargo test (and CI) stays green while the
querier role lands; green fills each body and removes the #[ignore].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jensholdgaard
jensholdgaard requested a review from Copilot June 22, 2026 09:32
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 13a4b7f3-a792-43cb-bd9b-cbb171f521ab

📥 Commits

Reviewing files that changed from the base of the PR and between 5d548b0 and 1b6a85f.

📒 Files selected for processing (2)
  • crates/ourios-server/tests/rfc0016_query_endpoint.rs
  • docs/rfcs/0016-query-serving-endpoint.md

📝 Walkthrough

Walkthrough

Adds a new test file crates/ourios-server/tests/rfc0016_query_endpoint.rs with seven #[ignore]d acceptance-test stubs (all using todo!()) for RFC0016 §5 scenarios. The RFC document's status front-matter is changed from specified to red.

Changes

RFC0016 Red-phase test stubs and status update

Layer / File(s) Summary
RFC status set to red
docs/rfcs/0016-query-serving-endpoint.md
The status front-matter field is changed from specified to red.
RFC0016 acceptance-test stubs (all ignored)
crates/ourios-server/tests/rfc0016_query_endpoint.rs
New test file with module-level docs and seven #[ignore]d test functions (rfc0016_1rfc0016_7), each with a todo!() body. Scenarios cover end-to-end query execution with pruning stats/OTel metrics, tenant scoping header enforcement, drift query routing, malformed DSL 400 responses without leakage, env-gated querier lifecycle and graceful shutdown, pruning observability, and combined receiver+querier role composition.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • jensholdgaard/ourios#259: Originally added the RFC0016 query-serving-endpoint documentation whose status field is being changed to red in this PR.

Poem

🐇 A stub is a promise, a todo! in place,
Seven red tests, each holding their space.
The RFC says "red" — the future is near,
When assertions replace every todo! here.
Hop by hop, green will eventually appear! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description covers the RFC context, scenario details, and implementation approach, but lacks explicit reference to the provided template sections like Summary, Related, and Checklist items. Consider following the standard template structure with explicit Summary, Related, and Checklist sections for consistency with repository conventions.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding RFC0016 §5 query-endpoint test stubs and updating the RFC status to red.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rfc0016-red

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 advances RFC 0016 (query-serving endpoint) from specified to red by adding compile-only, #[ignore]d acceptance-test stubs (that fail via todo!() when run with ignored tests), and updating the RFC’s frontmatter status accordingly.

Changes:

  • Flip RFC 0016 status from specifiedred in the RFC frontmatter.
  • Add seven #[ignore]d todo!() acceptance-test stubs in ourios-server covering RFC 0016 §5 scenarios (.1–.7).

Reviewed changes

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

File Description
docs/rfcs/0016-query-serving-endpoint.md Updates RFC 0016 frontmatter status to red to reflect the presence of red-gate stubs.
crates/ourios-server/tests/rfc0016_query_endpoint.rs Adds #[ignore]d todo!() stubs for each RFC 0016 §5 acceptance scenario, following the project’s red-gate testing pattern.

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

@jensholdgaard
jensholdgaard merged commit 2fb278b into main Jun 22, 2026
22 checks passed
@jensholdgaard
jensholdgaard deleted the rfc0016-red branch June 22, 2026 10:07
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