Repository navigation
fix(infra): resolve source worker preload off the main thread - #200565
Conversation
Reproduce and fix cold worker creation's synchronous loader resolution. Observe pump delivery directly instead of depending on truncated stack traces. Co-authored-by: RomneyDa <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesMove Node’s source-worker loader resolution into the worker and replace a stack-dependent SQLite test assertion with direct observation. Example: Node starts a TypeScript worker that creates a nested SQLite database.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains This PR addresses a concrete source-worker startup defect and should remain open, but its new preload URL breaks the sealed recovery bundles’ asset-closure checks. Priority: P2 Before merge
Findings
Agent review detailsHow this fits togetherThe runtime worker helper converts worker URLs and runtime selection into launch arguments consumed by worker pools, SQLite brokers, and background services. flowchart LR
A[Worker pool or SQLite broker] --> B[Runtime worker argument owner]
B --> C[Node source worker]
C --> D[Source preload]
D --> E[tsx ESM loader]
E --> F[TypeScript worker entry]
Technical reviewBest possible solution: Keep worker-local source loading and use the existing sealed-build mechanism to eliminate the unused source-preload reference from recovery bundles. Do we have a high-confidence way to reproduce the issue? Current-main source directly shows synchronous loader resolution in worker launch preparation, and the PR reports baseline failures; this read-only review ran no target code. Is this the best way to solve the issue? Deferring resolution through a source-relative preload is a focused fix that preserves foreign-working-directory and Bun behavior, but the sealed build must exclude its unused source-only asset reference. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bdd7cd53a397. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
Likely related people:
PR surfaceSource +2, Tests +29, Other +2. Total +33 across 6 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 17, 2026, 6:29 AM ET / 11:29 UTC. |
Sealed recovery bundles contain compiled workers. Keep the source-only preload out of their dependency closure; staging regressions pass without adding neighboring assets. Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 234be12)
Reproduce and fix cold worker creation's synchronous loader resolution. Observe pump delivery directly instead of depending on truncated stack traces. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit eceb208)
…aw#200565) Reproduce and fix cold worker creation's synchronous loader resolution. Observe pump delivery directly instead of depending on truncated stack traces. Co-authored-by: RomneyDa <[email protected]>
Problem
FRV3 reproduces two failures in nested SQLite creation. Source worker startup resolves
tsx/esmsynchronously on the spawning thread, recording a realpathSync call before the worker starts. The pump-delivery assertion also depends on a ten-frame stack trace that can omit its caller.Changes
Evidence
Scope
Main-first repair for 2026.11.10-beta.1. This does not resolve the independently recurring Bun chat authorization failures or the proxy-retention failure. Independent review waived by release owner; required qualification gates remain.
Simplification: no cache, startup warmup, or public option; the two-line source preload moves resolution to its owning worker. Six files, 39 insertions / 6 deletions.
CI correction at 4fa7c31
The source-only preload URL was retained in sealed recovery bundles, causing both staged managed/package runtime closure tests to fail. The existing SEALED_RUNTIME_BUILD contract now omits source-only loader setup from compiled sealed workers. No missing-asset exception or weakened assertion was added.