Skip to content

Fix Zod v4 function schema API compatibility#456

Merged
xuyushun441-sys merged 7 commits into
mainfrom
copilot/fix-action-step-error-yet-again
Feb 1, 2026
Merged

Fix Zod v4 function schema API compatibility#456
xuyushun441-sys merged 7 commits into
mainfrom
copilot/fix-action-step-error-yet-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 1, 2026

Zod v4 changed the function schema API from chainable methods to an object-based approach. The CI build failed because 80+ function definitions still used the v3 syntax.

API Change

// Before (Zod v3)
z.function().args(z.string()).returns(z.number())

// After (Zod v4)
z.function({
  input: z.tuple([z.string()]),
  output: z.number()
})

Files Updated

  • data/ - data-engine.zod.ts (7), driver.zod.ts (24)
  • system/ - events.zod.ts (4), job.zod.ts (1), plugin.zod.ts (18), worker.zod.ts (1)
  • api/ - protocol.zod.ts (17)
  • auth/ - config.zod.ts (7)
  • ui/ - widget.zod.ts (1)

Schema generation now completes successfully (939 schemas).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/colinhacks/zod/releases/tags/v4.0.0
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
  • zod.dev
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

引用: https://github.com/objectstack-ai/spec/actions/runs/21557959519/job/62117435052#step:8:1


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 1, 2026

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Feb 1, 2026 8:01am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Convert all z.function(args, returnType) calls to z.function({ input: args, output: returnType }) format across:
- driver.zod.ts (24 functions)
- auth/config.zod.ts (7 functions)
- api/protocol.zod.ts (17 functions)

Verified with successful pnpm gen:schema run generating 939 schemas.

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix action step error in CI run Fix Zod v4 function schema API compatibility Feb 1, 2026
Copilot AI requested a review from hotlong February 1, 2026 06:34
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Feb 1, 2026
@xuyushun441-sys xuyushun441-sys marked this pull request as ready for review February 1, 2026 08:00
@xuyushun441-sys xuyushun441-sys merged commit 5342987 into main Feb 1, 2026
10 of 11 checks passed
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 file documentation Improvements or additions to documentation protocol:ai protocol:data protocol:system protocol:ui size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants