Skip to content

fix(mcp): declare every probe field, and ship the manifest to Vercel - #30

Merged
simonmak-ascent merged 1 commit into
mainfrom
fix/live-surface-contract
Oct 29, 2026
Merged

simonmak-ascent merged 1 commit into
mainfrom
fix/live-surface-contract

Conversation

@simonmak-ascent

Copy link
Copy Markdown
Owner

Two contracts broke on the live surface that the local suite could not see. Both are now covered by a test or by an explicit deployment setting.

inspect_target failed with a schema error

Live:

MCP error -32602: Structured content does not match the tool's output schema:
data must NOT have additional properties (×5)

The probe gained opencodeVersion and skillsCount, but the tool's output schema never declared them — and the MCP SDK rejects unknown fields in structuredContent. The five offenders were those two plus shell, osIdLike and npmPrefix, which had been emitted but undeclared all along and only surfaced once the call was exercised end to end.

Fix: declare all five and export the schema. mcp-server/test/inspect-output.test.ts now parses the probe and fails if it emits a field the schema does not describe — so this class of break is caught in CI, not by a user.

describe_workbench returned no versions

versions was null in production while working locally. The manifest is read with readFileSync, which Vercel's file tracer cannot see, so workbench.versions.json never entered the function bundle and the read threw (caught, returning undefined).

Fix: includeFiles: "workbench.versions.json" on api/mcp.js.

Worth noting the asymmetry that hid this: describe_workbench's existing fields come from code constants, not from files, so nothing had ever exercised a runtime file read on that path.

Verification

No compute box, so CI gates the TypeScript. What I can assert directly:

  • the schema's declared keys now equal the probe's emitted keys exactly (checked by script before committing)
  • vercel.json parses, and the diff is the two lines shown
  • the test is written against the probe source, so it needs no fixture to stay current

After merge I will re-run the live checks that exposed both bugs: inspect_target on opencode-workbench.simonmak.com/mcp and describe_workbench.versions.

Two contracts broke on the live surface that the local suite could not see.

inspect_target: the probe gained opencodeVersion and skillsCount, but the
tool's output schema did not declare them, and the MCP SDK rejects unknown
fields in structuredContent — so the call failed with 'data must NOT have
additional properties' for five fields (the two new ones plus shell,
osIdLike and npmPrefix, which had been undeclared all along and only
surfaced now). Declare all five, export the schema, and add a test that
fails when the probe emits a field the schema does not describe, so this is
caught in CI rather than by a user.

describe_workbench: the versions summary was null in production because the
manifest is read with readFileSync, which Vercel's tracer cannot see, so the
file never entered the function bundle. includeFiles puts it there.
@vercel

vercel Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
opencode-workbench Ready Ready Preview Oct 29, 2026 4:26pm UTC

Request Review

@simonmak-ascent
simonmak-ascent merged commit 53f917a into main Oct 29, 2026
7 checks passed
@simonmak-ascent
simonmak-ascent deleted the fix/live-surface-contract branch October 29, 2026 16:28

This branch was successfully deployed

1 active deployment
Preview — 3f1b2b7d Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant