Skip to content

Revert "perf(rpc): compile Zod request schemas lazily" - #17368

Merged
nwparker merged 1 commit into
mainfrom
revert-17353-nwparker/zod-4.5-compile
Aug 30, 2026
Merged

nwparker merged 1 commit into
mainfrom
revert-17353-nwparker/zod-4.5-compile

Conversation

@nwparker

@nwparker nwparker commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 0 $\color{#cf222e}{\Huge{\mathbf{−}}}$​54 $\color{#cf222e}{\Huge{\mathbf{−}}}$​54
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​16 $\color{#cf222e}{\Huge{\mathbf{−}}}$​30 $\color{#cf222e}{\Huge{\mathbf{−}}}$​14

Reverts #17353

I want this but after age is good

@nwparker
nwparker merged commit 4bc2085 into main Aug 30, 2026
6 checks passed
@nwparker
nwparker deleted the revert-17353-nwparker/zod-4.5-compile branch August 30, 2026 08:21
@greptile-apps

greptile-apps Bot commented Aug 30, 2026

Copy link
Copy Markdown

Greptile Summary

Reverts lazy compilation of RPC request schemas, restoring direct Zod safeParse validation and Zod 4.4.3 while removing the optimization-specific tests and temporary release-age exception.

  • Removes the compiled-schema cache and calls each method’s schema directly.
  • Downgrades and relocks Zod from 4.5.0 to 4.4.3.
  • Removes the temporary Zod release-age exclusion.
  • Deletes tests specific to compiled-schema behavior.

Confidence Score: 5/5

The 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.

Important Files Changed

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

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ea921ffd-22f1-45ea-bdbd-bd046b73a926

📥 Commits

Reviewing files that changed from the base of the PR and between 316cb1c and 16ca774.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • package.json
  • pnpm-workspace.yaml
  • src/main/runtime/rpc/dispatcher-request-parsing.test.ts
  • src/main/runtime/rpc/dispatcher-request-parsing.ts

📝 Walkthrough

Walkthrough

The 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
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • zod downgrade to ~4.4.3 — package.json, pnpm-lock.yaml, and pnpm-workspace.yaml revert the zod 4.5.0 bump and drop the [email protected] entry from minimumReleaseAgeExclude, restoring the age gate.
  • Lazy compile path removed — dispatcher-request-parsing.ts goes back to method.params.safeParse(...) and drops the compile WeakMap 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.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

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