Repository navigation
Revert "perf(rpc): compile Zod request schemas lazily" - #17368
Conversation
This reverts commit 7b86833.
Greptile SummaryReverts lazy compilation of RPC request schemas, restoring direct Zod
Confidence Score: 5/5The PR appears safe to merge, with no concrete changed-code defect identified. The revert consistently restores direct RPC schema parsing and the compatible Zod 4.4.3 setup while retaining the existing optional-field workaround and its broader schema contract tests.
|
| Filename | Overview |
|---|---|
| src/main/runtime/rpc/dispatcher-request-parsing.ts | Restores direct schema parsing by removing lazy compilation and its WeakMap cache; no correctness defect was identified. |
| src/main/runtime/rpc/dispatcher-request-parsing.test.ts | Removes tests that existed specifically for the reverted compiled-schema path. |
| package.json | Restores the Zod 4.4.3 dependency range used with the repository’s existing optional-field compatibility workaround. |
| pnpm-lock.yaml | Consistently relocks Zod and dependent Playwright peer snapshots to 4.4.3. |
| pnpm-workspace.yaml | Removes the temporary Zod release-age exception after reverting from 4.5.0. |
Reviews (1): Last reviewed commit: "Revert "perf(rpc): compile Zod request s..." | Re-trigger Greptile
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe RPC request parser now calls the method parameter schema directly. It no longer compiles or caches schemas before validation. The Zod runtime dependency was downgraded to version 4.4.3, and its release-age exclusion was removed. ✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- zod downgrade to
~4.4.3—package.json,pnpm-lock.yaml, andpnpm-workspace.yamlrevert thezod4.5.0 bump and drop the[email protected]entry fromminimumReleaseAgeExclude, restoring the age gate. - Lazy compile path removed —
dispatcher-request-parsing.tsgoes back tomethod.params.safeParse(...)and drops thecompileWeakMap cache. - Test removed —
dispatcher-request-parsing.test.ts, added in #17353, is deleted in full.
Verified the revert is a complete inverse of #17353: no remaining references to [email protected], compile (from zod), getCompiledParams, or compiledParams anywhere in the tree, and the root and mobile/ workspaces are both pinned to ~4.4.3.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Reverts #17353
I want this but after age is good