Skip to content

feat(console): live governed Query adapter and reader exchange - #396

Merged
debuggingfuture merged 16 commits into
mainfrom
surface/console-live-207
Oct 8, 2026
Merged

debuggingfuture merged 16 commits into
mainfrom
surface/console-live-207

Conversation

@debuggingfuture

Copy link
Copy Markdown
Member

Summary

  • Connect Query to the governed MCP context.describe and context.query tools, with question-directed selection of one admitted data table and a typed refusal when selection is unclear.
  • Exchange each verified operator assertion for a reader credential. A shared credential is used only after a typed 401/403 mint refusal; transport failures, service failures, and empty minted tokens remain refusals.
  • Send only sourced rows to the fixture model, cap both model context and visible sources at eight, and exclude declared memory tables by engine-provided kind.
  • Serve /auth/exchange from contextful serve; an unconfigured exchange returns ExchangeUnconfigured 404 before waiting for a body.

Verification

Stacked on surface/console-hosted-383. Includes the #207 turn policy core from surface/console-turn-207.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://surface-console-live-207.spec.contextful.work (commit 1e204b3)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://93fc4bf2.spec.contextful.work 1e204b3 2026-10-08T17:27:36.257Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://46891a9b.spec.contextful.work 715a6f5 2026-10-06T17:32:08.740Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b9467d2d.spec.contextful.work fb92c58 2026-10-06T16:13:49.794Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://38b4e544.spec.contextful.work c63eb52 2026-10-06T09:03:04.213Z Visit the dashboard ↗

@debuggingfuture
debuggingfuture changed the base branch from surface/console-hosted-383 to main October 6, 2026 18:41
@debuggingfuture
debuggingfuture force-pushed the surface/console-live-207 branch from 715a6f5 to 1e204b3 Compare October 8, 2026 17:26
@debuggingfuture
debuggingfuture marked this pull request as ready for review October 8, 2026 17:26
@debuggingfuture
debuggingfuture merged commit 9636480 into main Oct 8, 2026

@flaredispatch-fractalboxdev flaredispatch-fractalboxdev 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.

AI code review — 🛑 Request changes

Risk tier: full · 1 critical · 1 warnings · 0 suggestions

Reviewers: security ⚠️ · performance ⚠️ · code-quality ⚠️ · documentation ⚠️ · release-management 1 · compliance 1 · agents-md 0

1. 🛑 Critical — Console startup now hard-fails when model configuration is absent

📍 apps/console/src/entry.ts:85-88

The default console path eagerly calls 'createLiveTurn', which throws 'ConsoleModelUnconfigured' when 'CONTEXTFUL_MODEL_ENDPOINT' or 'CONTEXTFUL_MODEL_ID' is unset. This changes the previous behavior of starting with unavailable adapters into a process startup failure, so existing deployments that do not configure the new model service will fail to release or boot at all. Defer this validation until a query is made, or preserve the unavailable-adapter fallback when the model is not configured.

2. ⚠️ Warning — Live queries forward every column to the model

📍 apps/console/src/live.ts:95

The live path uses 'SELECT *' and subsequently sends the complete returned rows to the configured model endpoint. This violates data-minimization expectations because governed tables may contain sensitive columns unrelated to the question. Select only approved/needed columns (or redact policy-disallowed fields) before including rows in the model request.

📋 View full logs & reviewed diff ↗

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.

1 participant