chore: keep JSON Schema goldens only for model tool inputs
Part of the time-to-merge rollout: delete the JSON Schema goldens, and the rule that records every schema, except for schemas a model is shown as a tool's input. A byte change only costs a prompt-cache prefix when the schema reaches a model, as #4165 notes. The rest made every wire change re-record and explain goldens (≈10% of recent merges touched packages/features/fixtures).
What changed
packages/features/src/hosted-wire-schemas.test.tsis gone. It recorded every export of 37 wire modules (exhaustive by type) and checked that the fixture directory held exactly that set. Its replacement,tool-input-schemas.test.ts, records only the 9 schemas below.- 412 non-model-facing goldens were deleted from
packages/features/fixtures/json-schema/. - 8 unchecked goldens were deleted from
apps/web/fixtures/json-schema/(see below). - The helper
packages/wire/src/testing/json-schema-golden.tsis now one function,settleJsonSchemaGolden(root, name, schema), plusjsonSchemaGoldenRoot. These were removed:settleJsonSchemaGoldenSet,matchJsonSchemaGolden,jsonSchemaOf,RecordedEffectJsonSchemas, and the related types. - 72 schemas knip reported as exported only for the old test are no longer exported. Three that nothing used are deleted:
inboxBlocksSchema,codingAgentDefaultAnswerSchema, andwrittenText. Eight@publicchat-wire aliases that only the old test read were dropped. No schema's shape changed. - The rule now speaks only of tool-input goldens:
packages/AGENTS.md, rootAGENTS.md(Testing) (the PR template row went with main's template trim).
Goldens kept, and why
Each is passed whole as a tool's inputSchema:
| Golden | Tool |
|---|---|
chat-wire-postChatAskInputSchema | coder post_chat (coder-host/chat.ts) |
chat-wire-readChatInputSchema | coder read_chat |
chat-wire-resolveAskInputSchema | coder resolve_ask |
chat-wire-editChannelInputSchema | coder edit_channel |
inbox-wire-inboxThreadPostInputSchema | coder post_to_inbox (coder-host/inbox.ts) |
inbox-wire-inboxWithdrawInputSchema | coder withdraw_ask |
inbox-wire-inboxReadInputSchema | coder read_inbox |
coding-agent-wire-codingAgentDelegationInputSchema | coder delegate (coder-host/delegation.ts) |
coding-agent-wire-codingAgentTodosInputSchema | coder write_todos (coder-host/todos.ts) |
apps/web plan-notes-output | brain edit_plan (brain-host/plan-edit.ts uses planNotesSchema as its input) |
Unsure, kept: packages/service/fixtures/json-schema/chapters-answer and chapters-repair-answer. Both reach a model, but as Output.object structured output rather than a declared tool. Depending on the model, the Anthropic provider may send them as a forced tool, so I kept them.
Deleted although model-facing: unchecked files
apps/web/fixtures/json-schema/{coder-bash,draw-on-board,queue-question,read-web-page,run-in-repository,run-on-mac,search-web,show-page}-tool-input.json have had no test reading them since #2420 removed theirs. show-page-tool-input already fails to match today's tool. Because nothing checks them, they pin nothing, so I deleted them rather than restore a test.
Checks
./scripts/repository-checks.shandpnpm knippass.- Typecheck passes for wire, features, service, host, panel, and web.
- The features and wire tests pass, along with the plan-notes and chapters golden tests.
- Locally,
src/agents/agent-runtime/prepare-script.test.ts(theclaude-agent-sdkinstall line) fails both with and without this change. This PR doesn't touch it.
Made with Luke