Repository navigation
feat(pool): a pool names MCP upstreams for its members (ADR-0069 option B) - #349
Merged
Merged
Conversation
…on B) A pool's coordinator keeps a list of MCP upstreams (name, https URL, prefix, allowlist, how it logs in; never a secret, never a command) in upstreams.json. Admins change it with `devstack pool upstreams add|remove` or in the pool area of the dashboard, each change audited; members read it with GET /v1/upstreams (404 from an earlier coordinator reads as none). Each member's hub asks its pools every minute, off the requests, and offers the entries on the MCP upstreams page. One is used, as `<pool>:<name>`, only once the user accepted it at the URL the pool names; a new URL asks again and forgets the old login. The user's own upstreams go first, a declined entry stays declined, two pools' entries with one prefix wait for the user to give one another, and an entry the pool drops or of a pool left goes with its login. The Windows Credential Manager lost writes and deletes made side by side (seen in the hub's tests, which also shared the user's keychain service): the hub now makes one keychain call at a time, and its tests use a keychain service each. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7schmiede
force-pushed
the
feat/pool-upstreams
branch
from
October 28, 2026 14:05
55d7d2b to
d203b6e
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A pool's coordinator keeps a list of MCP upstreams for its members; each member's hub offers them in the dashboard and uses one only once its user accepted it, with that user's own login (ADR-0069 option B, postponed there until now).
Review card
Approved by the owner in the conversation on 2026-10-28: all five points.
noneandtoken).upstreams.jsonin its directory); an admin changes it with the CLI or in the pool area of the dashboard, each change inaudit.jsonl; members read it withGET /v1/upstreams, a coordinator of an earlier release answers404, read as an empty list.members.json.Decided on my own: the CLI is
devstack pool upstreams [list|add|remove]; the hub asks its pools every minute in a background thread (a coordinator that does not answer takes up to 15 s, so not in a request) and at once after its own admin changed a list, keeping the lists inpool-upstreams.jsonand the last one of a pool that does not answer; an accepted entry is<pool>:<name>in the hub (keychain entry, tool descriptions); the dashboard says "from pool X"; an entry the pool drops, or of a pool the machine left, goes with its decision and login; the URL ishttps://only (a pool'slocalhostis each member's own machine) and a token login names no environment variable (a pool could otherwise send a member's environment to its URL); a change of prefix, allowlist or login kind by the pool needs no new acceptance, only a new URL does; a pool names at most 64 entries; the ADR is an addendum to ADR-0069.Found on the way
The hub's upstream tests failed now and then on Windows, on
maintoo: the Windows Credential Manager lost writes and deletes made side by side from several threads, and the tests also wrote into the user's real keychain service under shared names (tracker). The hub now makes one keychain call at a time (parallel tool calls refreshing tokens could hit the same), and each test uses a keychain service of its own. 8 runs in a row green afterwards.Checked
cargo fmt,cargo clippy --workspace --all-targetscleancargo test -p devstack-node -p devstack-hub -p devstack -p devstack-skills(Windows): green; newcrates/devstack-node/tests/upstreams.rs(members read, only admins change, audited, https only) and hub tests (accept, URL change, a pool that does not answer, decline, own-first, two pools with one prefix, dropped entry and pool left)ui: build and vitest green; the pages screenshotted in mock mode (pool entries on MCP upstreams, the list in the pool area)🤖 Generated with Claude Code