Skip to content

fix(javascript): avoid argument limits when expanding escaped receivers - #1539

Merged
N0zoM1z0 merged 1 commit into
mainfrom
fix/javascript-wide-escape-worklist
Oct 10, 2026
Merged

N0zoM1z0 merged 1 commit into
mainfrom
fix/javascript-wide-escape-worklist

Conversation

@N0zoM1z0

Copy link
Copy Markdown
Collaborator

A valid 1.49 MB JavaScript source can return an object with enough properties to exceed V8's function-argument limit when an escaped receiver expands its references. The compiled CLI exits 1 and stdio MCP returns execution_failure with RangeError: Maximum call stack size exceeded.

Append expanded references individually, preserving their order and the existing binding/path cache. Public CLI/MCP regressions cover both 160,000-element object and array returns, retain uncertainty for a reference at the end, preserve an unrelated literal, and compare complete Evidence identities. No reference quota or result truncation is introduced.

The adjacent mutation suite also contained an inherited two-second elapsed-time assertion that failed at 2,093.89 ms on the constrained host. Remove that machine-load assertion while keeping the complete 2,000-write semantic case. Controlled performance measurements remain separate from deterministic correctness checks.

Closes #1538. Related to #1065.

Validation:

  • npm run test:focused -- tests/acceptance/applications/javascriptReturnedReferences.test.ts — 2 public CLI/stdio MCP workflows passed.
  • npm run test:local -- src/domain/javascript/javascriptSemanticAnalysis.member_mutations.test.ts src/domain/javascript/javascriptSemanticMutationInitializers.test.ts src/domain/javascript/javascriptSemanticAnalysis.member_depth.test.ts — 172 tests passed.
  • npm run check:fast — strict typecheck and lint passed.
  • Independent public before/after probe — the identical 1,489,023-byte input changes from CLI/MCP failure to successful complete return projection; CLI/MCP Evidence IDs match, retained summary binding, close, expired-reference rejection, subsequent ping and unchanged input checks pass. Full CLI JSON is not retained on disk.
  • Complete serialized semantic IR matched the main 46c9cba0 control byte-for-byte for 18 adjacent binding, scope, path, callable, iterator and mutation fixtures.

No real Hopper/Ghidra verification was performed for this provider-neutral JavaScript change. This does not establish a fix for the private exit-134 report in #1387 or all remaining #1462 responsiveness work.

@N0zoM1z0 N0zoM1z0 added bug Something isn't working area: domain Domain logic, errors, and pure functions area: tests Test suite and verification labels Oct 10, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: domain Domain logic, errors, and pure functions area: tests Test suite and verification bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(javascript): wide receiver return expansion exceeds the function argument limit

1 participant