Repository navigation
fix(javascript): preserve loader identity across terminal origins - #9107
Conversation
Normalize the loader reachability worklist to identifier references so unrelated terminal object origins cannot exhaust the alias-state budget. Keep the existing bound on actual alias walks and avoid copying initializer arrays while scheduling them. Refs #7253 Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
Codex Review Summary: ❌ FailedThis 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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no blocking issue was found. SummaryThe PR preserves Webpack loader identity beside large collections of proven separate values. The latest change keeps unresolved identifiers unknown instead of silently excluding them.
Reviews (3) · Last reviewed commit: "fix(javascript): preserve unresolved loa..." · Reviewed by Greptile |
Use shared fresh-value and literal facts to distinguish separate terminal values from expressions that may return the loader. Keep projected origins unknown and retain the actual alias-state budget. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
|
CI triage: the current static-check failure is unrelated to this diff. The job checked merge Greptile reviewed final |
An unresolved identifier is not proof that a possible getter receiver is separate from the loader. Preserve the unknown outcome and cover both short and overflowing unions. Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
Summary
A Webpack getter can lose Electron identity when an unrelated object has more than 512 possible literal initializers. The loader alias walk counted those terminal values against its selector budget, then treated an unrelated
.nwrite as a possible loader overwrite. The public CLI regression changes from zero windows/IPC operations to one of each.Refs #7253. This fixes a reproduced subcase; the full Bitwarden window/handler regression remains open.
Approach
Use the shared fresh-object and exact-literal facts to exclude proven separate terminal values before queuing identifier references. Unresolved identifiers, expressions that may return the loader, and projected initializers without a proven selected value, remain unknown. The real 512-alias bound remains. Iterate initializer collections without a concatenated temporary array; no new cache or retained index.
The shared CLI/MCP producer owns this change. Sibling CommonJS field and projected-origin walks were inspected: their terminal/projection work differs, so their bounds remain. Ordinary static-analysis fix within existing authority; third-party sources are parsed as inert data.
Validation performed
Node 24.22.1/npm 11.16.0, Linux x64. Expensive commands use two CPUs and wall/RSS guards.
npm run check:fast, focused build, formatting andgit diff --checkpassed.Real artifact: official
Bitwarden-2026.10.0-amd64.deb, SHA-256fcabfc7da3c327e2625b105e951cee4e60703bb8e256f0aac9cc9bc83ec7063f. Extracted privately, never executed.d3a4fc87c(two runs)6f701b985(one run)6f701b985(120 s source deadline)All preload controls retain the same semantic Evidence ID and 80 IPC operations. Final main/preload still has partial alias coverage, zero windows and 112 IPC operations. The main/preload base and one final-revision retry hit the 90-second per-source deadline (the final retry: 99.308 s wall / 1811.8 MiB sampled RSS, exit 1; CPU omitted because that receipt inherited earlier shell child accounting). The final 120-second run completed; different deadline settings and failed baselines do not establish an equivalent completed-task comparison. No throughput improvement is claimed; the completed preload control is slightly more expensive. No OOM or external resource guard stop occurred in these validations; the reported source deadline failure is retained. RSS is a 100 ms descendant sum, with possible shared-page double counting and missed short peaks; OS caches were uncontrolled. Actual model tokens and a separate real MCP client run were not measured. Summary selection and the retained Evidence entry point are unchanged.
Author readiness
@gensokyo-dev is exempt from the readiness declaration under CONTRIBUTING.md. No human-review attestation is made by this automation.