chore(dev): close the self-observation loop in dogfood (enable Ourios MCP) - #606
Conversation
…n telemetry Sets OURIOS_QUERIER_MCP_ENABLED=1 on dogfood-server and prints the `claude mcp add` line in dogfood-env. This closes the loop: a source (e.g. Claude Code) exports OTLP -> Ourios stores it -> the same source queries it back through Ourios's RFC 0027 MCP surface, discovering the DSL via the RFC 0032 ourios://query-schema resource. Open mode takes the tenant as a tool argument (no bearer), which is safe only because the recipe is loopback-bound. Signed-off-by: Jens Holdgaard Pedersen <Jens@holdgaard.org>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesDogfood MCP integration
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
Pull request overview
This PR updates the local dogfood just recipes to enable the Ourios querier MCP surface on the loopback-only dev server, and to print clear instructions for wiring a telemetry source to query its own ingested logs back via MCP (including discovering the query DSL via ourios://query-schema).
Changes:
- Enable the querier MCP surface in
just dogfood-serverviaOURIOS_QUERIER_MCP_ENABLED=1. - Update
dogfood-serveroutput to advertise the/mcpendpoint on127.0.0.1:4319. - Extend
just dogfood-envguidance to include theclaude mcp add --transport http .../mcpsetup and a self-query pointer.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Close the self-observation loop in the dogfood recipes
Follow-up to #605. That PR let a source export telemetry into a local Ourios; this one lets the same source query it back — closing a full loop entirely on loopback:
Changes (dev-ergonomics only,
justfile)dogfood-serversetsOURIOS_QUERIER_MCP_ENABLED=1— mounts the RFC 0027 MCP surface at:4319/mcp(defaults off;main.rs:194).dogfood-envprints the wire-up + a self-query pointer:ourios://query-schemaand query tenantagent-dogfood".Why it's safe / in scope
justfile— no product code, no new deps.check_tenanttakes the tenant as a tool argument with no bearer (mcp.rs:228); that's why the loopback bind from chore(dev): just recipes to dogfood OTLP telemetry into a local server #605 is load-bearing, not cosmetic.Verified live (not just plausible)
Booted the recipe, then over the actual MCP transport:
initializehandshake → 200, session established.tools/list→query_logs,list_templates,template_drift.query_logsagainst real, flushed self-telemetry (tenant=ourios-server,range(-24h, now)) →rows: 1, scanned: 1, pruned: 0, bytes_read: 129, returning a genuine record:event_name: "ourios.server.auth.open_mode",severity: WARN. The system read back its own open-mode warning.range(-1h, now)returnedscanned: 0, pruned: 1— the row group skipped via footer stats because the data sat outside the window.(Note: a just-ingested record stays in the WAL until it flushes to Parquet — the querier reads Parquet only, §3.6 — so an immediate query of a fresh record can return 0 rows until the flush; that's the durability contract, not a bug.)
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation