Skip to content

fix(javascript): retain wide function fingerprint inventories - #10355

Merged
kaoru0822-kitauji merged 1 commit into
mainfrom
codex/n13-0938-fingerprints-8545
Nov 13, 2026
Merged

kaoru0822-kitauji merged 1 commit into
mainfrom
codex/n13-0938-fingerprints-8545

Conversation

@kaoru0822-kitauji

@kaoru0822-kitauji kaoru0822-kitauji commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #8545; follows merged #10304 and the closed, unmerged #8568.

Problem and change

A valid 1.3 MB source containing 130,000 inert (()=>{}); expressions produces 130,000 function fingerprints. With the caller-selected 130,001 total/per-file node limits and sufficient parent result budget, the compiled application CLI exits 1 after worker transfer with execution_failure / RangeError: Maximum call stack size exceeded.

Replace the two data-sized fingerprint call spreads with ordered iteration at their shared graph owner: direct projection and adoption of worker results. Existing node/memory/transfer admission remains authoritative. No new cap, helper/lint migration, provider, schema, generated metadata, target execution, or mutation authority. Ordinary correctness fix; advance maintainer scope approval is not applicable. Canonical graph ordering and consumers are unchanged; both superseded append paths are removed.

Executed evidence

  • Base: bbe2bcc979be747698d9ad9ce87af017b92e0f10; macOS arm64, Node 24.22.1 / npm 11.16.0.
  • Both new main-thread regression paths fail on base at their respective appends. They use real source-derived IR and assert cardinality, one fingerprint per function, unique IDs, untruncated retention, artifact SHA-256, and first/last source locations.
  • npm run test:focused -- tests/boundary/javascript/semanticFingerprintAccumulation.test.ts src/application/javascript/JavaScriptSemanticGraphBuilder.test.ts — 82 passed in 2 files, including existing small, duplicate-fingerprint, exact-capacity, and budget-refusal cases.
  • npm run check — passed; typed lint: 7,252 files, 0 errors, 4,987 advisory warnings.
  • npm run verify:test-discovery — 3,507 test files exactly once. git diff --check passed.
  • Compiled CLI, before/after: node --max-old-space-size=6144 scripts/rea.mjs analyze-javascript-application <fixture-directory> --max-semantic-nodes 130001 --max-semantic-nodes-per-file 130001 --max-heap-mb 1536 --analysis-timeout-ms 45000 --format json — exit 1 before, exit 0 after. After: 130,001 nodes, 130,000 fingerprints referring to 130,000 distinct function nodes, zero unknown entries and no truncation/retention limits. Ordinary static relationship uncertainty remains visible. A 1536-MiB parent correctly refused its result budget before reaching the faulty append; this fix does not change that bound.
  • No target source was executed. Wide MCP, Windows/Linux, and external-provider workflows were not run locally. GitHub Actions checks at c3eb6dd4e72c18e3b21442468f1d46ef9c72c24d completed with 23 successful checks, 24 skipped, none failed or pending. No human verification is implied.
Bounded cost control

Equivalent 50,000-function analysis/projection/sealing tasks, first and repeated operation in one initialized process per revision; one sample each, same 1024-MiB heap request. Module startup is excluded and OS cache/host load are uncontrolled. No speedup is inferred.

Revision/run Elapsed CPU (user + system) Cumulative Node peak RSS
Base, first 3.701 s 5.041 s 635.3 MiB
Fixed, first 3.717 s 5.081 s 615.6 MiB
Base, repeated 3.837 s 5.252 s 765.8 MiB
Fixed, repeated 3.878 s 5.349 s 823.2 MiB

These process peaks exclude loader subprocesses; process-family peak, agent tokens, cold startup, and statistically meaningful variance were not measured. The wide task has no completed base run to compare.

Author readiness

Human owner: @kaoru0822-kitauji

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

The author is exempt from the declaration check under CONTRIBUTING.md. This draft does not attest that human review occurred.

The separate PR readiness commit status remains pending while this PR is a draft.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

The PR replaces two fingerprint call spreads with ordered loops, allowing admitted wide inventories to reach the finished graph.

  • Wide JavaScript analyses keep every admitted function fingerprint.

Reviews (1) · Last reviewed commit: "fix(javascript): retain wide function fi..." · Reviewed by Greptile

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T14:09:44.285970Z c3eb6dd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit 5d046b9 into main Nov 13, 2026
53 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the codex/n13-0938-fingerprints-8545 branch November 13, 2026 14:16
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants