Skip to content

build(deps): move config to zod 4 and override zod to ^4.6.6 for GHSA-mrhx-c7xc-m3w5 - #1115

Merged
nc9 merged 2 commits into
mainfrom
build/config-zod4
Oct 26, 2026
Merged

nc9 merged 2 commits into
mainfrom
build/config-zod4

Conversation

@nc9

@nc9 nc9 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Clears Dependabot alerts #60 and #61 (zod, high) and drops the audit ignore for GHSA-mrhx-c7xc-m3w5.

  • packages/config: zod ^3.25.76 to ^4.6.6 (one z.ZodIssueCode.custom becomes "custom")
  • packages/crawler: unused zod dependency removed
  • root override zod ^4.6.6 collapses the remaining 4.1.x copy (lock now resolves one zod, 4.6.7)
  • zod 4 words type errors differently, so docs/cli/config.mdx and docs/configuration/index.mdx show Invalid input: expected number, received string

Verified: audit:dependencies clean with the ignore removed, notices:check, config + cli config tests, tsgo on packages/config and apps/cli, docs make validate.

Skill change: none (no user-facing flag or rule change).

@claude

claude Bot commented Oct 24, 2026

Copy link
Copy Markdown

Review of #1115 (zod 4 for config, override to ^4.6.6).

No blocking issues. The change is small and consistent. apps/cli, packages/rules and packages/config are now all on zod ^4.6.6, and the lock resolves a single zod, which removes the duplicate-copy risk. I did not run the tests or builds myself; the checks below come from reading the diff and grepping the config schema.

  • (low) apps/cli/tests/config.test.ts:107 The assertion '\\"quick\\"|\\"surface\\"|\\"full\\"' matches zod's internal message format after JSON.stringify. It will break on a cosmetic zod wording change. Consider asserting on issue.path and issue.code (invalid_value), or parsing issues[0].message before stringifying.
  • (low) package.json The root overrides entry zod: ^4.6.6 also forces zod 4 on any transitive dependency that still declares zod 3 only, for example @ai-sdk/*. Its peer range is ^3.25.76 || ^4.1.8, so that case is fine. Please confirm no other dependency is zod-3-only. Otherwise the override hides an incompatibility until runtime.
  • (nit) Zod 4 changed .default() so the default is no longer re-parsed. I checked the .default({}) uses in packages/config/src/schema.ts (the headers and providers records and rule_options). All are empty records with no nested defaults, so behaviour is unchanged. Keep this in mind if someone later adds .default({}) on an object with nested defaults.
  • (nit) The bun.lock diff includes an unrelated apps/cli version bump (0.0.129 to 0.0.133). That is harmless, but it is lockfile churn from the regeneration.

Positives:

  • The unused zod dependency in packages/crawler is removed.
  • The audit ignore for GHSA-mrhx-c7xc-m3w5 is dropped.
  • The third-party notices and the error-message docs are updated to match.

…-mrhx-c7xc-m3w5

packages/config moves to zod ^4.6.6, packages/crawler drops its unused zod dependency, and a root override collapses the remaining zod 4.1.x copy. The audit ignore for GHSA-mrhx-c7xc-m3w5 goes away. zod 4 words config errors differently ("Invalid input: expected number, received string"), so the two docs examples and one test assertion follow.

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9
nc9 force-pushed the build/config-zod4 branch from 16aa7d2 to c2029ea Compare October 26, 2026 01:20
@github-actions

Copy link
Copy Markdown
Contributor

Auto-review did not complete

The claude-review job failed before posting a review. This PR has not been auto-reviewed. Run a review manually (/review) before merging.

  • Result: success / is_error=true after 1 turns, 0 permission denial(s), $0.00
  • Job log

Partial findings recovered from the session (incomplete, unverified, and NOT a merge signal):

Show partial review

You've hit your session limit · resets 2:40am (UTC)

@github-actions

Copy link
Copy Markdown
Contributor

Auto-review did not complete

The claude-review job failed before posting a review. This PR has not been auto-reviewed. Run a review manually (/review) before merging.

  • Result: success / is_error=true after 1 turns, 0 permission denial(s), $0.00
  • Job log

Partial findings recovered from the session (incomplete, unverified, and NOT a merge signal):

Show partial review

You've hit your session limit · resets 2:40am (UTC)

@nc9
nc9 merged commit 287c668 into main Oct 26, 2026
14 of 15 checks passed
@nc9
nc9 deleted the build/config-zod4 branch October 26, 2026 01:58
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