Repository navigation
fix(javascript): preserve wide async chunk collection - #10362
Conversation
[Medium impact] The reviewed changes appear safe to merge. SummaryThe collector now appends async chunk keys one at a time instead of passing them all as function arguments.
Reviews (3) · Last reviewed commit: "test(javascript): bound the public check..." · Reviewed by Greptile |
|
CI also exposed an oversized public test workload: the 300,000-call acceptance case hit its caller-selected 30-second analysis deadline after 32.0 seconds on the runner. The 130,000-key source regression passed. The public checkpoint control only needs enough static facts to exceed 8 MiB. I am reducing that control to 50,000 calls and including JSON stdout in failure diagnostics; the original 130,000-key producer regression still catches the actual call-spread defect. The public case is now explicitly a working admission control, not a second baseline-failing regression. The larger compiled CLI before/after was executed locally and remains manual evidence. No timeout or production budget is raised. The separate Linux lifecycle-marker failure is tracked in #10366. One unchanged-head retry is running; it is not a claimed fix. A slow local Linux VM-image download was stopped before any guest test ran. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
`target.push(...items)` passes every item as a call argument and overflows the stack once a target-sized array grows past the engine's argument limit. This class was fixed one site at a time in #10304, #10343, #10362 and #8632. Add one shared appendAll helper in src/domain and use it at the remaining sites whose arrays grow with the input: XML member counting, app-task row suggestions, native call routes and unresolved calls, call-path caveats, environment-manifest merges, reference-source import entries, dyld trace edges and JS symbolic flow values. The web bundle merge from the previous commit now uses the shared helper too. Bounded spreads (fixed literals, page-sized reads) are left as they are. Refs #10445 Refs #10342 Co-Authored-By: gensokyo-dev <[email protected]>
Refs #8545. This changes the bundler collector independently of #10355/#10356/#10359. Related #9500 changes bootstrap recognition in the same file; its collector is unchanged. Earlier #8568 is closed without merging.
Problem and change
recoverBundlerModulesexpands a factory's async keys into call arguments. A valid 1.45 MB Webpack source with 130,000 distinct keys overflows the source collector. The production worker's larger stack admits that case, but 300,000 calls still overflow and retain a generic memory constraint with misleading heap guidance.Append keys by iteration at their owner, preserving normalization, deduplication, module order, unknown counts, source digests and ranges. Oversized facts reach the existing 8 MiB checkpoint owner and receive its exact transport ceiling and recovery. This does not make an oversized public graph admissible. No limits, schema, provider, execution authority or downstream error projection change. Ordinary correctness fix; advance scope approval is not applicable.
Executed verification
Base
bbe2bcc979be747698d9ad9ce87af017b92e0f10; macOS arm64, Node 24.22.1 / npm 11.16.0.npm run test:focused -- tests/boundary/javascript/asyncChunkCapacity.test.ts tests/acceptance/javascriptAsyncChunkBudget.test.ts src/domain/javascript/javascriptBundlerRegistrationIdentity.test.ts src/domain/javascript/javascriptFactoryExportRoles.test.ts src/domain/javascript/javascriptStaticAnalysisModuleIndex.test.ts src/domain/javascript/javascriptStaticAnalysis.no_finding_caps.test.ts— 140 passed in 6 files, 7.05 seconds for the selected suite.resource: transportwith the checkpoint bytes and unchanged 8 MiB ceiling, and explains that increasingmax_heap_mbcannot raise it. No source code executes.npm run check— passed; typed lint: 7,254 files, 0 errors, 4,987 advisory warnings.npm run verify:test-discovery— 3,508 files exactly once. Diff and commit/push hooks passed.CI follow-up: the initial 300,000-call acceptance case hit its selected 30-second analysis deadline after 32 seconds on the runner. The final public control only generates the facts needed to exercise checkpoint refusal; the original 130,000-key capacity regression remains. No timeout was raised. Separately, the unchanged Linux desktop cleanup fixture failed once and passed an unchanged-head retry; #10366 retains that unresolved intermittent failure. No lifecycle fix or blanket retry policy is claimed. Fresh-head Actions at
ce17ee28153ba80e810b2c45aec0a78d413d4215completed: 25 distinct successful checks, 22 skipped, none failed or running (latest result per check name; repeated metadata runs excluded). Automated review has no actionable findings.No runtime speedup is claimed; CPU, agent tokens and process-family peak were not benchmarked. No real Electron application, external provider, stdio MCP or Windows/Linux workflow was verified locally.
Author readiness
Human owner: @kaoru0822-kitauji
The author is exempt from the declaration check under CONTRIBUTING.md. Ready status records technical readiness; no human review is attested here. The
PR readinessstatus passes under the verified author-ID exemption.