Repository navigation
spec(FIX-1903): epic amendment, FSD holds MCP keys per user #3179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,15 +15,15 @@ owns it and where it's checked. | |
| | ER-3 | A project's `repository` stays a remote. The host maps a remote to a checkout on its machine for the project ids its config names ([ER-13](#what-no-child-may-do)), and a run for a mapped project is a worktree of that checkout, its branch kept there, with the project's files beside the worktree and never in it ([D3](DECISIONS.md#d3)) | FIX-1906 decides · FIX-1904 consumes | FIX-1906's tests · the closure's `git worktree list` | | ||
| | ER-4 | Two runs on two projects mapped to one checkout, at once, get two worktrees and two branches, and both settle. A test proves it, with a control that gives both runs one place and must fail | FIX-1906 | FIX-1906's tests · the closure's leg b | | ||
| | ER-5 | A project may name MCP servers, by host-approved alias ([ER-14](#what-no-child-may-do)). A coding run gets its project's servers when it starts, read from the project its own task row names, never from a hand-over's payload. A run whose project has none gets none ([D4](DECISIONS.md#d4)) | FIX-1905 decides · FIX-1904 consumes | FIX-1905's goal check, on a run not handed over by a coordinator | | ||
| | ER-6 | No credential, endpoint or credential variable is stored on a project row. A row selects MCP servers by an alias the host approves; the host config gives each alias its endpoint and the environment variable that holds its credential, and the host reads it. The value reaches the MCP connection only: not the run's environment, a log, a session or the page. The dev profile's host config has one alias, `linear`, whose variable is `LINEAR_MCP_API_KEY`, the name the kitchen-sink's Linear capability reads (`apps/kitchen-sink/lib/mcp.ts`); each person signing in to Linear as themselves is a later epic | FIX-1905 | FIX-1905's tests · its spec review | | ||
| | ER-7 | A server whose credential variable is unset is said out loud, once when the server starts and on each run that misses it. The run still runs, and that is a degraded run, not a pass: with `LINEAR_MCP_API_KEY` unset, the closure's leg a must FAIL its title check ([ER-20](#the-closure)) | FIX-1905 | FIX-1905's tests · the closure, run with the variable unset | | ||
| | ER-6 | No credential, endpoint or credential variable is stored on a project row. A row selects MCP servers by an alias the host approves, and the host config gives each alias its endpoint. The key is each person's own: set on Shift Manager's Settings page, stored as a user-scoped record in the Lab's store, write-only, shown only as set or not set. A run uses its owner's key, resolved from the server-side identity the run records, never from a field a caller sends ([BP-031](../../../docs/contributing/best-practices.md)). FSD holds the MCP connection with that key (`createMcpManager`), and the run gets the servers' tools only: the key is not handed to its command line, environment, MCP config, a log, a session or the page. It is not unreachable: an unsandboxed run can read the Lab's store. The dev profile's host config has one alias, `linear`. `LINEAR_MCP_API_KEY`, the name the kitchen-sink's Linear capability reads (`apps/kitchen-sink/lib/mcp.ts`), seeds only the Lab's operator identity, for headless and CI runs, while it has no stored key. Signing in to Linear by OAuth is a later epic | FIX-1905 | FIX-1905's tests · its spec review | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When readers use the retained end-state figure embedded by Useful? React with 👍 / 👎. |
||
| | ER-7 | A missing key is said out loud: once when the Lab starts, for the operator identity, and in the session of each run whose owner has no key for a server it names. The run still runs, and that is a degraded run, not a pass: with no key on Settings and `LINEAR_MCP_API_KEY` unset, the closure's leg a must FAIL its title check ([ER-20](#the-closure)) | FIX-1905 | FIX-1905's tests · the closure, run with neither source holding a key | | ||
|
|
||
| ## What no child may do | ||
|
|
||
| | # | Rule | Because | | ||
| |---|---|---| | ||
| | ER-8 | Build on the coordinator's `handOff` tool, or add an MCP or checkout field to `dispatchTask` | [D4](DECISIONS.md#d4). `handOff` retires in FIX-1872; hand-over is FIX-1870's | | ||
| | ER-9 | Add anything to Layer 1 (core, engine, orchestration). `workspace` and `claude-code` get at most one generic option each: a remote-to-checkout mapping, and per-run MCP servers | MCP settings and checkouts are Workforce and host concepts | | ||
| | ER-9 | Add anything to Layer 1 (core, engine, orchestration). `workspace` and `claude-code` get at most one generic option each: a remote-to-checkout mapping, and `mcpTools`, in-process tools relayed from FSD's connection, with no URL, command or headers. `tools` gains only a call path on `createMcpManager`. Cursor and Codex get nothing in this epic | MCP settings, keys and checkouts are Workforce and host concepts (Layer 2) | | ||
| | ER-10 | Change DevTeam's projects, workstreams, ask or coder default | [D2](DECISIONS.md#d2). Five goal checks serve its config unedited | | ||
| | ER-11 | Put a machine's path in a project row, a `WORKER.md`, or a file the published package ships | [FIX-1762 BR-5](../../issues/FIX-1762/BUSINESS-RULES.md). A path belongs to the host that has it | | ||
| | ER-12 | Migrate stored projects. A row stored before FIX-1905 reads as a project with no MCP servers | [FIX-1786 ER-31](../FIX-1786/BUSINESS-RULES.md#what-no-child-may-do): no migrations while Workforce has no consumers | | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,8 +10,9 @@ Only lineage that spans children. Each child records its own specifics. | |
| | A repository project's run keeps the project's files in `project/` beside `checkout/`, never inside; FIX-1762 BR-28 | **Retained**, and extended to a local checkout | The local-repository mode in `packages/workspace/src/local-host.ts` refuses kept files beside the checkout today ("a source may not name kept files beside it") | ER-3; FIX-1906 owns | A fixed `sourceRepo` app (FIX-1762 BR-22) keeps today's behaviour | | ||
| | DevTeam's profile is what `shift-manager start` and `dev` open with no `--config`; `packages/shift-manager/scripts/checkout.mts` | **Amended** | D2: five goal checks need DevTeam unedited, and a dev Lab needs only the two dev projects | The dev profile is the default; DevTeam by `--config`; FIX-1904 owns | Any script that relied on the default passes `--config` with DevTeam's file | | ||
| | A served Lab never falls back to the scripted coder silently; `packages/shift-manager/teams/devteam/harness.mts`, `selectHarness` | **Retained** | Q1's recommendation keeps it: no credential refuses the start | ER-2; FIX-1904 owns | DevTeam's default stays the scripted coder | | ||
| | The Claude Code harness takes no MCP option, so a conductor-owned ask tool was refused as widening the framework; `packages/harness-manager/src/ask.ts` header, citing LAB-138's decision 3 (an incubation lab; no retained source) | **Amended** for MCP, retained for the ask | D4 adds a generic per-run MCP pass-through, which the Agent SDK already supports. It is not a conductor-owned tool, and the ask stays a file | ER-9; FIX-1905 owns; its spec rechecks the lab decision | Absent option means no servers, as today | | ||
| | The Claude Code harness takes no MCP option, so a conductor-owned ask tool was refused as widening the framework; `packages/harness-manager/src/ask.ts` header, citing LAB-138's decision 3 ([LAB-138's spec](https://linear.app/fixpoint-labs/document/lab-138-the-harness-manager-implementation-spec-8444a9f240f9), §6 item 3; [#1437](https://github.com/fixpoint-labs/flow-state-dev/pull/1437)) | **Amended** for MCP, retained for the ask | D4 adds one generic tools-only option, `mcpTools`, which the Agent SDK's in-process servers already support. It is not a conductor-owned tool, and the ask stays a file | ER-9; FIX-1905 owns; its spec rechecks the lab decision | Absent option means no servers, as today | | ||
| | A project's coding work was to get MCP servers from the coordinator that hands it over; FIX-1903's and FIX-1905's Linear descriptions | **Superseded** | A run started from Inbox or by the chief of staff passes through no coordinator; the run's own task row names its project on every path | D4, ER-5, ER-8 | Nothing built yet | | ||
| | This epic as merged in [#3164](https://github.com/fixpoint-labs/flow-state-dev/pull/3164): the key came from a host credential variable, and the harness got per-run MCP servers (D4's *Locks in*, ER-6, ER-7, ER-9) | **Superseded** by the owner on FIX-1905's spec review, [#3174](https://github.com/fixpoint-labs/flow-state-dev/pull/3174#issuecomment-6131359139): "D2 can't be through Claude … provide a settings page which allows keys to be configured" | FSD must control the connection and the key whichever harness runs; there is no admin, so each person sets their own key | D4, ER-6, ER-7, ER-9 as amended; [FIX-1905's evolution](../../issues/FIX-1905/EVOLUTION.md) lists each statement; FIX-1905 owns | Nothing built. `LINEAR_MCP_API_KEY` stays as the operator's headless seed. Row aliases and host-config endpoints (ER-14) unchanged | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This row points at |
||
|
|
||
| Nothing from [FIX-1870](../FIX-1870/SPEC.md) is changed: its hand-over tools are left alone | ||
| (ER-8). Re-check the cited intentions against current code before implementing. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ER-6 packs Settings UI, user-scoped store,
createMcpManager,mcpTools, operator seed, unsandboxed caveat, and OAuth deferral into one table row. Consider splitting (credential storage vs connection boundary) or a 5-step "key path" subsection — implementers will otherwise infer FIX-1905 solely from this cell.