Embed compile caches for Cloudflare and static Pyodide modules #8339
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 261 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.333
Real PR Conversation Timeline
1 comments
"Review active on #8339"
general
weight: 0.35
ryanking13
Cloudflare's builtin modules and the static Pyodide helpers should be able to load trusted V8 code caches generated alongside the executable. These bundles currently omit
gen_compile_cache, so loading their modules requires compiling source or consulting the shared runtime code cache, despite their source being fixed for the build.Enable the existing build-time cache generator for both bundles. Their module loaders already prefer embedded caches, so this avoids shared-cache lookups and runtime cache generation for these modules. The source remains embedded for V8's normal rejection fallback. This adds cache bytes to the executable; it does not eagerly compile lazy function bodies or remove runtime deserialization.
Represent Vectorize's error-message ellipsis with a JavaScript Unicode escape. The legacy builtin loader interprets raw bytes as Latin-1, whereas the generator and new module registry decode UTF-8. The literal ellipsis made their source lengths differ and caused V8 to reject the generated cache. The escape keeps the source ASCII and produces the intended ellipsis in both registries, also correcting the legacy loader's mojibake suffix. Extend the cache tests to require a cache for every JavaScript module in both bundles, compare the legacy and UTF-8 source strings, and assert that V8 accepts the cache.
The separately distributed, versioned Pyodide runtime bundle remains unchanged: its artifact identity does not include the consuming executable's V8 build and flags, so it needs separate coordination before embedding useful V8 caches.
The C++ encoding smoke suite runs its construction, encoder, decoder, and pipeline cases in one test, and the WebSocket kill-switch test accepts 32,770 sockets in one actor. Both workloads can outlast the downstream 15-second medium-test budget, as seen in the debug test timeouts. Classify them as large, matching the TypeScript encoding suite and neighboring WebSocket limit test. Every benchmark case and socket boundary check is retained.