Skip to content

Route proxy cohort aggregates through a local guarded database (#220) - #332

Merged
jmmana merged 1 commit into
mainfrom
feat/220-proxy-cohort-database
Dec 4, 2026
Merged

jmmana merged 1 commit into
mainfrom
feat/220-proxy-cohort-database

Conversation

@jmmana

@jmmana jmmana commented Dec 4, 2026

Copy link
Copy Markdown
Owner

Refs #220. With --cohort-db-env NAME and a guarded-only map, the stdio proxy routes cohort-protected aggregates to the built-in MCP engine. The configured read-only database owns both the membership and aggregate reads in one snapshot. Other mapped queries still use the upstream, and the environment variable containing the cohort database URL is omitted from the upstream process. The proxy API returns the same structured row or privacy error envelope.

Local validation: Ruff, mypy, and 139 focused tests. The SQLite CLI regression checks refusal for nearby cohorts, acceptance for sufficiently different cohorts, credential-variable isolation, and that the protected calls never reach the upstream.

Copilot AI balanced review requested due to automatic review settings December 4, 2026 02:07

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@jmmana
jmmana merged commit 8856ebf into main Dec 4, 2026
31 checks passed
@jmmana
jmmana deleted the feat/220-proxy-cohort-database branch December 4, 2026 02:11
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