Repository navigation
Reuse the task model validation schema during cold open and writes - #696
Merged
Merged
Conversation
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.
Refs #602
Refs #544
Two Chromium CPU profiles of the 10,000-task cold open showed repeated construction of Zod optional schema wrappers under
validateTask → assertValid → create/update. The model package now reuses the identical partial schema already held by its document validator. Every generated task still runs validation. App and importer resolve the same exact patch through the workspace lock. The demo repository caches the Today badge counts by day and runtime timezone, invalidates them on edits and subtracts pending deletions by ID.The November 28 sign-in checks on #544 recorded zero fallback errors. The two remaining 401s were browser-generated network messages for SDK requests. The app has no direct callers of either endpoint. Its publisher already writes and verifies the fallback rewrites. There was no fresh production sign-in in this test.
Chromium workflow timings
At 10,000 tasks, cold-open p95 fell by 959 ms (35.7%). At 60 tasks, the median rose by 85.5 ms and p95 rose by 16 ms. Times below are milliseconds in Chromium 149.0.7827.55. Each cell uses 40 observations per build. The median averages ranks 20 and 21. Nearest-rank p95 is rank 38. Each build ran first in 20 pairs. Pairs 1–25 were retained and pairs 26–40 completed after the interruption.
Local validation passed for 2,382 unit tests with nine skips, typecheck, lint, and production, self-hosted, e2e and importer builds.
Reproduction
Run in Bash on a host with sandboxed Playwright Chromium, pnpm, rpnpm and Python 3. Both origins serve loopback e2e builds. Each pair uses a fresh Chromium process, both sizes, UTC, en-US, 1280 × 800, reduced motion, a fixed clock and blocked service workers. Each cold sample uses a fresh context. Warm workflows reload that context. The timer includes the DOM target and two animation frames.