Repository navigation
perf(lint): add zod-prefer-lazy-schema oxlint plugin and Main/Shared ratchet - #50160
Merged
Merged
Conversation
nwparker
changed the base branch from
perf/cache-resolve-environment-misses-and-require-store-file
to
main
November 26, 2026 23:44
18 of 20 tasks
10 of 11 tasks
10 of 11 tasks
AmoabaKelvin
added a commit
that referenced
this pull request
Nov 27, 2026
…schema (#50170) * fix(i18n): drop the stale Traditional Chinese MCP remove message on the phone #49475 replaced mobile mcpServers.removeMessage; #50002 then translated the old key, failing mobile locale validation on main. * fix(connectors): build the wake reply place schema lazily #49406 added an eager schema to connector-params.ts while #50160 set its ratchet baseline, failing ratchets on main.
10 of 11 tasks
Daily-AC
added a commit
to Daily-AC/orca
that referenced
this pull request
Nov 30, 2026
Upstream main now ratchets eager top-level Zod schemas in src/main and src/shared to zero for new files (stablyai#50160). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a custom oxlint JS plugin rule (
zod-prefer-lazy-schema/prefer-lazy-schema, modeled onbun/zod-prefer-lazy-schema) and a downward-only count ratchet acrosssrc/mainandsrc/shared:config/oxlint-plugins/zod-prefer-lazy-schema.mjs: reports eager module-load Zod schema construction (z.*(...)and top-level.extend/.omit/.pick/.partial/.merge/.required/.nullable/.optional/.arrayon*Schema/*Params/*Bodyidentifiers), while allowinglazyZodSchema(() => ...),z.lazy(() => ...), function-scoped schemas, and non-schema utilities (z.globalRegistry,z.toJSONSchema,z.compile, etc.).config/oxlint-zod-prefer-lazy-ratchet.json,config/scripts/static-analysis/ratchets/main-startup/check-zod-prefer-lazy-ratchet.mjs,config/zod-prefer-lazy-baseline.txt: ratchets the remaining 1,529 grandfathered eager schemas across 384 files downward and blocks any new eager top-level Zod schema insrc/mainorsrc/shared.package.json(check:zod-prefer-lazy-ratchet),config/oxlint-performance-audit.json,check-changed-selection.mjs, andrun-lint.mjs.Performance
pnpm check:changed.Verification
pnpm check:zod-prefer-lazy-ratchetpasses (1,529 grandfathered across 384 files).pnpm check:changed --base=perf/cache-resolve-environment-misses-and-require-store-filepassed all 53 checks.