MC
acme/web-app · Code migration · npm

zod

3.25.764.1.12Verified API changeReady for reviewMajor versionpackage.json
Requires human review.
  • Major version: zod 3 → 4.

Evidence trail

Every step Darwin took, from the records it keeps

  1. Found behind latest

    zod 3.25.76 is declared in package.json; the registry's latest is 4.1.12.

  2. Compared the release's API

    Zod 4 drops the required_error and invalid_type_error parameters in favour of a single error parameter. Verified against the package's declarations and the Zod 4 migration guide.

    CandidateResultReason
    4.1.12VerifiedIndependently verified
  3. Zod: required_error and invalid_type_error replaced by error

    Schema constructors take one error parameter; the two specialised message parameters are dropped.

    − z.string({ required_error: "Required" })
    + z.string({ error: "Required" })

    Evidence: Declarations at 4.1.12 (v4/core/params.d.ts) · Migration guide (zod.dev/v4/changelog · "drops invalid_type_error and required_error")

  4. Rewrote 2 call sites

    lib/forms/signup.ts:8
    − z.string({ required_error: "Email is required" })
    + z.string({ error: "Email is required" })
    lib/forms/billing.ts:15
    − z.number({ invalid_type_error: "Enter an amount" })
    + z.number({ error: "Enter an amount" })
  5. Validated with 684 tests

    Each check ran on the unmodified repository first; only checks that pass there judge the change. One repair attempt ran after the first failure.

    CheckFromUnmodifiedWith changeTests
    pnpm testci.yml · unitPassedPassed684

    Already failing before the change, so not counted against it: pnpm test:e2e

  6. Review gate approved the patch

    Messages preserved verbatim. One informed retry fixed a missed schema in lib/forms/address.ts.

    DeepSeek V4.1 Flash · Jev shadow review

  7. Opened #403 as a draft

    Zod 4: replace required_error and invalid_type_error (zod 4.1.12). Your repository's own CI judged it: CI passed

    CheckWorkflowVerdictNote
    unitci.ymlPassed4 min
    buildci.ymlPassed3 min
    e2ee2e.ymlAlready failingalso fails on main
  8. Waiting for a person to merge

    Migrated 6 schemas in 4 files; 684 tests passed; CI passed.

Summary

Repository
acme/web-app
Present
3.25.76
Latest
4.1.12
Proposed
4.1.12
Kind
Code migration
Checked
Oct 26, 02:10 UTC
Pull request
Ready for review#403
Reviewers
lee, maya

For agents

The same record, over MCP

dovel_get_update({
  id: "web-app--zod"
})