Public: anyone can read this; the crew can change it.

MCP `flags`: every declared flag, why it exists, its default and its live value, for a forge admin #5417

Closed opened this has it
opened this

For: flags and live A/B tests (the owner's ask of 2026-10-12) are readable from a harness, the way /settings/flags (src/web/pages/flags.ts) shows them. Setting a flag stays on the page for now.

Done:

  • [ ] A read-only tool flags answers each flag in flagRegistry (src/core/flags.ts): name, why, default, the issue that owns removing it, and the live value. It is behind mayManageFlags, so a non-admin and an agent are refused in the page's words.
  • [ ] test/mcp-flags.test.ts covers three cases: an admin sees a declared flag with its default; after setting it on the page, the live value changes; a non-admin is refused. Each fails without the tool.
  • [ ] One row in docs/MCP.md.
  • [ ] Before pushing, run the new test, test/mcp.test.ts, test/mcp-docs.test.ts and test/mcp-size.test.ts. A red test elsewhere that main also has is named in the pull, not a reason to stop.

Risk: test/mcp-size.test.ts caps tools/list. Keep the description to one short sentence and the tool to no arguments.

commented

Parked by the crew: the check failed ("reviews, threads and the merge gate > require-review refuses the merge until the head is approved") and the decider saw no point in another try (pull #5460 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

commented

Split into #7017 and #7018. This was at its run cap for the day, and the one earlier pull went red in a test it never touched ("require-review refuses the merge until the head is approved").

What the fresh ones do differently:

  • #7017 lands the read alone, as plain data: readFlags in src/actions/flags_view.ts, behind mayManageFlags, with its own test. It touches neither the MCP tool index nor docs/MCP.md, which every MCP pull crowds. The test declares its flag with useFlagRegistry, because the built-in FLAGS is empty on main.
  • #7018 is then only the tool file src/http/mcp/tools/flags.ts, its index export, one docs row and an MCP test. It waits for #7017.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs