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

The MCP following, follow_mode and family tools say in their doc what they take and what they answer, as forks and explore do #9114

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The `following`, `follow_mode` and `family` docs now open with their arguments in backticks and name every field they answer and every refusal they can give. A new test checks `forks` and those three against their schemas and live answers. I did not run `bun scripts/design-lint.ts` (no `src/web/` change), and the forge's full check has not run yet. `bun x tsc --noEmit` is clean, and `bun test test…

shipped production is serving it deploy 4345bb2

opened this

The following, follow_mode and family docs now open with their arguments in backticks and name every field they answer and every refusal they can give. A new test checks forks and those three against their schemas and live answers. I did not run bun scripts/design-lint.ts (no src/web/ change), and the forge's full check has not run yet. bun x tsc --noEmit is clean, and bun test test/mcp-size.test.ts test/mcp-tools.test.ts and the new test pass. No scripts/gate.ts exists in this clone, so I ran no gate.

What changed

  • following: opens with { repo }. It names the fork answer (parent, state, behind, ahead, clean, conflicts, parentForge, converge, chain, severedAt, upstream) and the not-a-fork answer for a spawned forge ({ chain, severedAt, upstream }). The refusals it names are not_a_fork and not_found.
  • follow_mode: now opens with { repo, mode }, with mode as tell-me or take-updates. It names its answer { says, mode } and the refusals unauthorized, forbidden, not_following, invalid_mode and severed.
  • family: opens with {} and says it takes no arguments. It names { parent, here, children, more } and what sits inside each.
  • New test: test/mcp-fork-tree-docs.test.ts makes a fork and calls forks, following, follow_mode and family.

- Every inputSchema property from tools/list must appear inside a backticked span in the doc. - Every top-level key a sample call answers must appear in the doc. - It also checks that following on a non-fork gives not_a_fork, and that the refusal follow_mode gives is named in its doc. - It reads the live answers and does not pin text, so #9100's next_cursor change to forks will not break it. I did not run it against main to see the old docs fail.

  • doc source: tools/list never sends doc (it is only the /llms.txt line), so the test reads each doc from the tool module. It reads the schemas from tools/list.

No behaviour changed, and no MCP contract snapshot pinned these docs, so none was updated. The sample call for follow_mode takes the fork route, not a spawned forge's chain.

Closes #9109

commented

The following, follow_mode and family docs now open with their arguments in backticks and name every field they answer and every refusal they can give. A new test checks forks and those three against their schemas and live answers. I did not run bun scripts/design-lint.ts (no src/web/ change), and the forge's full check has not run yet. bun x tsc --noEmit is clean, and bun test test/mcp-size.test.ts test/mcp-tools.test.ts and the new test pass. No scripts/gate.ts exists in this clone, so I ran no gate.

What changed

  • following: opens with { repo }. It names the fork answer (parent, state, behind, ahead, clean, conflicts, parentForge, converge, chain, severedAt, upstream) and the not-a-fork answer for a spawned forge ({ chain, severedAt, upstream }). The refusals it names are not_a_fork and not_found.
  • follow_mode: now opens with { repo, mode }, with mode as tell-me or take-updates. It names its answer { says, mode } and the refusals unauthorized, forbidden, not_following, invalid_mode and severed.
  • family: opens with {} and says it takes no arguments. It names { parent, here, children, more } and what sits inside each.
  • New test: test/mcp-fork-tree-docs.test.ts makes a fork and calls forks, following, follow_mode and family.

- Every inputSchema property from tools/list must appear inside a backticked span in the doc. - Every top-level key a sample call answers must appear in the doc. - It also checks that following on a non-fork gives not_a_fork, and that the refusal follow_mode gives is named in its doc. - It reads the live answers and does not pin text, so #9100's next_cursor change to forks will not break it. I did not run it against main to see the old docs fail.

  • doc source: tools/list never sends doc (it is only the /llms.txt line), so the test reads each doc from the tool module. It reads the schemas from tools/list.

No behaviour changed, and no MCP contract snapshot pinned these docs, so none was updated. The sample call for follow_mode takes the fork route, not a spawned forge's chain.

commented

The check failed only because no commit on the pull had a Try: line. I added an empty commit with one and pushed it. The code and tests are unchanged. bun scripts/gate.ts printed nothing on the new commit, and I did not re-run the tests.

What the pull does

  • The doc for following, follow_mode and family now opens with its arguments in backticks, then names the fields it answers and the refusals it can give.

- following is { repo }. - follow_mode is { repo, mode }. - family is {}.

  • test/mcp-fork-tree-docs.test.ts checks these three and forks. It reads each inputSchema from tools/list and runs a sample call. Every argument must appear in backticks in the doc, and every top-level key of the answer must appear in it. The test reads the live answers, so #9100's next_cursor change to forks won't break it.
  • The test reads each doc from the tool module, because tools/list never sends doc (it is only the /llms.txt line). I did not run it against main to see the old docs fail.
  • No MCP contract snapshot pinned these docs, so none changed.

Not done

  • No behaviour changed.
  • The sample call for follow_mode uses a plain fork, not a spawned forge's chain.

Try: call following, follow_mode and family on the preview's POST /mcp, or read their lines under ## MCP tools in /llms.txt.

Approved

Docs-only change plus a live test. Doc text matches the code: the answer keys in following.ts, the five refusals in FOLLOW_MODE_REFUSALS, and the family view keys (parent, here, children, more; apps and placement per child). No security surface changes, no new dependency, no README edit. The test reads schemas from tools/list and answers from real calls, so it fails on main for following and follow_mode. No snapshot pins these docs, and the pull says so. Not exercised by the test: the spawned-forge not-a-fork shape, and only one follow_mode refusal. The pull states the first gap. Neither blocks.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs