Skip to content

[Fix] Fast turns fail with integration tool schema errors - #2295

Merged
roomote-roomote[bot] merged 1 commit into
developfrom
fix/fast-integration-schema-0rej1pnufadho
Sep 6, 2026
Merged

[Fix] Fast turns fail with integration tool schema errors#2295
roomote-roomote[bot] merged 1 commit into
developfrom
fix/fast-integration-schema-0rej1pnufadho

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

​Opened on behalf of @daniel-lxs. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

Fast's integration-call wrapper now emits concrete, non-recursive JSON value alternatives instead of z.json(). Nested arrays and objects remain unrestricted on the wire and recursively validated by the unchanged server-side schema. Integration lookup, required identifiers, optional arguments, and the shared MCP schema are unchanged.

Regression tests load the generated native modules, apply OpenCode's registry normalization, serialize the result, and compile every native tool schema with Ajv Draft 2020-12. They also cover nested JSON round trips and a recursive negative control.

Why this change was made

#2237 introduced z.json() in Fast to avoid unconstrained argument schemas collapsing downstream. OpenCode 1.18.10 converts that to Draft 2020-12, then renames $defs to definitions without updating #/$defs/... references. The resulting schema cannot resolve its own references. The prior test checked raw Zod output before that rename and therefore missed the regression.

The fix preserves concrete JSON value types without depending on recursive references or reverting #2237.

Impact

Removes the malformed Fast integration wrapper schema introduced in v1.3.1. No runtime dependency upgrade, deployment, or database change is included; Ajv is test-only and already present in the lockfile.

The new tests failed against the original implementation with can't resolve reference #/$defs/__schema0 and pass with the fix. All 258 focused Fast tests pass on the current base, as do package TypeScript checks and the full pre-push lint, fast typecheck, and knip gates. One unrelated widget test timed out while competing with the full pre-push checks; the same suite passed on rerun without source changes.

An isolated OpenCode 1.18.10 process loaded the exact generated module and returned a reference-free schema from /experimental/tool; Ajv and Effect conversion accepted it and preserved nested arguments. This verifies the serialization boundary, not live provider acceptance or the exact downstream HTTP 400 stack. Browser proof is not applicable to this non-visual change.

@roomote-community

roomote-community Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

No code issues found. See task

Reviewed b511ec6

@roomote-roomote
roomote-roomote Bot marked this pull request as ready for review September 6, 2026 17:07
@roomote-roomote
roomote-roomote Bot merged commit b85611e into develop Sep 6, 2026
18 checks passed
@roomote-roomote
roomote-roomote Bot deleted the fix/fast-integration-schema-0rej1pnufadho branch September 6, 2026 17:28
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