Repository navigation
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Merged MCP tool schemas now describe which fields each tag requires, with the tool-list size fixture updated accordingly. Existing validation and tool behavior remain unchanged. You can add or adjust custom eligibility rules. Learn more. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Merging a tagged union into one object kept only the fields every branch requires, so models launched worktree threads without baseRef and T3 rejected the call. The tag now names each branch's own required fields.
2a443bd to
351024d
Compare
…a-required-fields # Conflicts: # apps/server/src/provider/agentContextBudget.json
|
Note Written by Merged current
|
…a-required-fields # Conflicts: # apps/server/src/provider/agentContextBudget.json
|
This PR conflicts with See the conflict window. |
Records the measured tool-list budget on top of main's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Computing each branch's required fields before the tag property removes the index offset and the cast, and puts the description where other tag text would join it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The automated pipeline stopped on this pull request and will not merge it: these checks fail on 2beb493, also when run again: Agent context budget, and the rework changed nothing: No code change was needed this pass, so nothing was pushed and the head is unchanged. (1) Agent context budget failure: reproduced locally with the workflow's jq comparison against main's agentContextBudget.json: mcpToolListJsonBytes 57321 -> 57786 (+465). The growth is the fix itself: five merged tagged-union schemas now carry a tag description (preview_navigate target.kind, schedule_task schedule.type, t3_thread_transfer sourcePoint.type, t3_thread_launch workspaceStrategy.type, t3_project_update projectIcon.kind). The workflow is a deliberate gate that a maintainer clears with the agent-context-increase label. Cutting the text would remove the fix. The committed fixture matches the measured bytes (AgentContextBudget.test.ts passes). The branch is 9 commits behind main, none touching apps/server/src/mcp or packages/contracts, so the fixture is not stale and no merge was needed (git merge-tree reports a clean merge despite the needs-rebase label). (2) Evals: ran the 10 mcp-tool-use cases that exercise the touched schemas (5 schedule_task cases and 5 t3_thread_launch worktree/baseRef cases) on gpt-6.1-sol, with gpt-6.1-terra as the shell model through the Codex proxy, 2 samples each. One run used main's advertisedJsonSchema.ts and one used the branch's. Scores were identical: 9/10 cases at 100% on both. tt-another-thread-worktree fails on both in every completed sample because Sol passes baseRef 'origin/main' (with startFromOrigin) while the case's grader requires exactly 'main'. That is a problem in the case and predates this change. One branch sample errored at the proxy. Claude models were not run (no Anthropic key). No new eval case was added. (3) #28147 is still open, so the coordination note stays. It stays open for a person to finish or close. |
Problem
advertisedJsonSchemamerges a tagged union into one object schema for providers that cannot takeoneOf. The merged schema'srequiredkeeps only fields that every branch requires, and nothing tells the model which fields a particular tag needs. Fort3_thread_launchthat meansbaseRef, which the worktree branch requires, is invisible as a requirement: models launch worktree threads without it and T3 rejects the call.This is a small, focused fix for that defect (contributing guide's "obvious bug" exception): it changes only the generated description of the merged schema, not tool behavior.
Fix
When merging, the tag property gets a description naming each branch's own required fields, for example "
worktreerequiresbaseRef." Fields every branch requires stay inrequiredas before, and the schema is otherwise unchanged.The advertised tool list grows by 465 bytes, so
agentContextBudget.jsonis updated and this PR needs theagent-context-increaselabel.Evidence
apps/server/src/mcp/advertisedJsonSchema.test.ts: the extended assertion fails on currentmain(25bf84a) and passes with the fix.AgentContextBudget.test.tspasses with the updated budget;vp run check:changedpasses.evals/mcp-tool-useon GLM-5.3-Flash (local server), the five worktree-launch cases, 3 samples each: through Pi 3/15 -> 9/15 passing (launches missingbaseRef2 -> 0); through Codex 8/15 -> 10/15 (5 -> 3).