Skip to content

chore(deps): bump zod from 3.25.76 to 4.5.4 in /src/mcp-server - #2479

Merged
vybe merged 2 commits into
devfrom
dependabot/npm_and_yarn/src/mcp-server/dev/zod-4.5.4
Sep 3, 2026
Merged

vybe merged 2 commits into
devfrom
dependabot/npm_and_yarn/src/mcp-server/dev/zod-4.5.4

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Sep 1, 2026

Copy link
Copy Markdown
Contributor

Bumps zod from 3.25.76 to 4.5.4.

Release notes

Sourced from zod's releases.

v4.5.4

Commits:

  • 84e416fbf4740527bbc8f319634f4e1b065bb42c fix(v4): stop the cycle walk from firing a default factory (#6500)
  • e8e206fa33ac5fe7ce20a2beb12d57b1cb3df653 4.5.4

v4.5.3

Commits:

  • e6b6ab347675cd2bd54b1bdbed16f98c59be82a9 docs(blog): widen the z.compile example to a 20-property schema
  • 87d6464418582bb96fc665a01f852ca6da324ad0 fix(docs): drop the OG description when the title wraps past two lines
  • 99fce394a026823e602b9c30d8d5d9f5f1932ce7 bench(v4): z.compile() against zod-compiler (#6499)
  • e3a695b6bf3f0d591ea682816e3cdaea04b0f967 docs(v4): record the email regex and container output-shape findings under Open
  • 7e24a24288183ce02554f1ded7775d0650a7b7e6 docs(blog): drop the reading time and put a GitHub link in the navbar
  • eab51ff3592b2d11d863f4ee4d5452f31a3de1b6 fix(v4): emit record numeric keys as strings in toJSONSchema (#6497)

v4.5.2

Commits:

  • a354314ac04fdd5484aa62dd5c3a4b553211a0e4 fix(docs): keep blog posts out of the docs collection (#6484)
  • d378c42aff6869f0929058a7923cd775880f5c4c ci: drop canary publishing from the release workflow (#6487)
  • 212b941791e7faae078e17645eb612824fd8f79a fix(v4): let a prototype method getter answer a bare call so vi.spyOn works (#6488)
  • e7576f542a7bc7ef3cc5eeec237714fd0e6b6e98 docs(blog): let the page show through the navbar in dark mode (#6489)
  • fedb06fafe33a66ce0b5c236ad2557e0a5a170fe fix(docs): match the blog TOC hover bar to the 2px active indicator
  • 6c932fcb2eea6eb671710ea058ca9fdc382ada89 chore: bump devcontainer image to Node 24 (#6470)
  • 6635d9dd367a664109de83c021995821f48efa29 docs(blog): soften the "method memoization" attribution
  • 019ae299cc75daa132bf1acf59086a520abf6b85 fix(docs): drop ISR on the docs route so the home page hydrates
  • 652bb438aa4c626c1cd7948c6849c4691239fca7 chore(docs): drop the scroll log from the route-change scroller
  • 571c8e8a3d73b4305f4abfdd6977773cc12f2bf5 fix(docs): render blog tabs with the stock fumadocs tab card
  • 9a193aa24b4efa3b315b91d4c56c8bc385b8513f 4.5.2

v4.5.1

Commits:

  • 2e862dbf89da2835e5206a8fd3d3be61afe3cf7f ci: gate the GitHub release and JSR publish on the version being live on npm
  • 8e03380510db36fa6fda979fc78a375fdea8021c 4.5.1

v4.5.0

Zod 4.5 is now available.

npm install zod@latest

At a glance:

... (truncated)

Commits
  • e8e206f 4.5.4
  • 84e416f fix(v4): stop the cycle walk from firing a default factory (#6500)
  • 1a16102 4.5.3
  • eab51ff fix(v4): emit record numeric keys as strings in toJSONSchema (#6497)
  • 7e24a24 docs(blog): drop the reading time and put a GitHub link in the navbar
  • e3a695b docs(v4): record the email regex and container output-shape findings under Open
  • 99fce39 bench(v4): z.compile() against zod-compiler (#6499)
  • 87d6464 fix(docs): drop the OG description when the title wraps past two lines
  • e6b6ab3 docs(blog): widen the z.compile example to a 20-property schema
  • 9a193aa 4.5.2
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for zod since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [zod](https://github.com/colinhacks/zod) from 3.25.76 to 4.5.4.
- [Release notes](https://github.com/colinhacks/zod/releases)
- [Commits](colinhacks/zod@v3.25.76...v4.5.4)

---
updated-dependencies:
- dependency-name: zod
  dependency-version: 4.5.4
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot @github

dependabot Bot commented on behalf of github Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Labels

The following labels could not be found: mcp-server. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency label Sep 1, 2026
zod v4 removed the single-argument `z.record(valueSchema)` form; the key
schema is now required. Five call sites failed `tsc` with TS2554, which is
what broke the mcp-server image build (`npm run build`, exit 2) and took
journey-smoke down with it.

All five keys were already strings at runtime — MCP tool arguments arrive
as JSON objects — so `z.record(z.string(), X)` states what was implied.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01CRWTVnJVjydCyLxHE1bMvP
@obasilakis

Copy link
Copy Markdown
Contributor

Pushed the compile fix (5dccf56) — z.record(V) was removed in zod v4, so all five call sites now pass an explicit key schema (z.record(z.string(), V)). That was the tsc TS2554 break that failed npm run build and took journey-smoke with it.

Verified locally against this branch: npm run build clean, npm test 280/280.

One behaviour change still open before this merges. fastmcp converts the tool parameters to JSON Schema for tools/list, and zod v4 emits a different document than v3 for the same object:

v3:  "additionalProperties": false   ← at the object root
v4:  (absent)                        ← plus "propertyNames": {"type":"string"} on records

So every MCP tool schema this server advertises becomes permissive — unknown keys in a tool call are no longer rejected by schema validation. Compilation and the unit suite cannot see this; it only shows up in what clients are told a tool accepts.

Worth a deliberate call before merge: either accept the looser schemas, or restore strictness explicitly (.strict() on the tool parameter objects) so the wire contract is unchanged by the upgrade.

Not merging this one — flagging for review.

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated with /validate-pr. zod 3→4 is a major bump; the one breaking use (z.record needing an explicit key schema) is fixed in the follow-up commit. Verified locally in a node:22 container at head 5dccf56: tsc build clean, mcp-server suite 280/280 passing (the mcp-server tests are not run by CI, only the image build is). Backend pytest matrix green except one hung head-seed job, re-run now; merging once it lands.

@vybe
vybe merged commit 104ade4 into dev Sep 3, 2026
31 of 32 checks passed
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/src/mcp-server/dev/zod-4.5.4 branch September 3, 2026 15:58
vybe pushed a commit that referenced this pull request Sep 3, 2026
Brings the branch onto dev at 36e6e1a: #2509 (main reconcile), #2479 (zod 4),
#2513 (pull: scheduled work reaches the durable queue), plus #2500/#2480. The
only shared file with #2513 is task_execution_service.py; git merged the import
block cleanly and the four scrub blocks in _write_terminal_and_gate /
apply_result are untouched (#2513 adds build_pull_queue_payload above them and
widens _admission_gate, which the ent#279 allowlist already names).
vybe pushed a commit that referenced this pull request Sep 4, 2026
`z.record(z.unknown())` is the zod v3 spelling. dev bumped zod 3.25.76 -> 4.5.4
in #2479, where `record` requires an explicit key schema, so the mcp-server
image build failed at `tsc`:

    src/tools/canvas.ts(94,33): error TS2554: Expected 2-3 arguments, but got 1.

which took down `journey-smoke` ("Boot the stack") and `e2e` ("Start Trinity
stack") — both failed building the mcp-server image, before any test ran.

The merge was clean at the TEXT level, which is exactly why this got through:
#2479 migrated every existing `z.record(` call site to the two-arg form, but
canvas.ts did not exist on dev yet, so nothing rewrote it and nothing
conflicted. The five sibling call sites (agents.ts x2, events.ts,
notifications.ts, reports.ts) already carry the two-arg spelling; this makes
canvas.ts the sixth.

`z.record(z.string(), z.unknown())` is semantically identical to what v3's
one-arg form meant (string keys, unknown values) — no behaviour change.

Verified against a real `npm ci` at zod 4.5.4: `tsc --noEmit` clean, and
mutation-checked by reverting the fix, which reproduces TS2554 at 94,33.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HAw7x7VwACVjc58pPPi3Th
vybe pushed a commit that referenced this pull request Sep 4, 2026
…trinity-enterprise#438) (#2484)

Merged after conflict resolution + one real fix found by post-merge CI.

**A latent break the text-level merge hid.** dev bumped zod 3.25.76 -> 4.5.4 (#2479),
where `record` requires an explicit key schema. #2479 migrated every existing call
site, but `canvas.ts` did not exist on dev yet — so nothing rewrote it and, crucially,
nothing conflicted. `journey-smoke` ("Boot the stack") and `e2e` ("Start Trinity
stack") both failed building the mcp-server image:

    src/tools/canvas.ts(94,33): error TS2554: Expected 2-3 arguments, but got 1.

Fixed to `z.record(z.string(), z.unknown())` — the spelling the five sibling call
sites already use, and semantically identical to what v3's one-arg form meant, so no
behaviour change. Verified against a real `npm ci` at zod 4.5.4 and mutation-checked
by reverting (reproduces TS2554 at 94,33). Both jobs now pass.

**Docs conflicts**: `feature-flows.md` and `requirements/core-agent.md` were
append-collisions, both sides kept. The canvas requirement is renumbered 5.16 -> 5.18,
since dev now carries 5.16 (#2163) and 5.17 (#2515).

The existing approval and the "merge as-is" PM note both predate these merge commits;
`dismiss_stale_reviews` is off, so the approval stands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants