Skip to content

fix(javascript): preserve exact static CommonJS export keys - #1369

Closed
rudycelekli wants to merge 6 commits into
morluto:mainfrom
rudycelekli:fix/javascript-static-export-keys
Closed

rudycelekli wants to merge 6 commits into
morluto:mainfrom
rudycelekli:fix/javascript-static-export-keys

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 9, 2026 •

Copy link
Copy Markdown

Computed identifiers such as exports[key] were reported as a literal export named key, and joining member components misread module["exports.value"] as module.exports.value. Keep exact member segments for export-root identification, reuse static property-key parsing, and retain valid empty export names in assignments, object declarations, and Object.defineProperty.

The maintainer follow-up preserves member helper recognition: standalone d(...) does not declare exports, while this.d(exports, {...}) remains supported. Classify the callee before inspecting export arguments to avoid extra work for unrelated calls.

Validation on current main plus this branch:

  • Actual public CLI and pinned SDK MCP stdio analysis of an 833-byte, 11-module source: eight baseline cases change to the expected export names; ordinary and computed static controls remain correct.
  • Separate 296-byte and 113-byte public CLI/MCP controls reproduce the standalone-helper false positive and this.d regression before the follow-up, and verify both afterward. Controlled native Node snippets establish the expected helper behavior.
  • Complete CLI/MCP normalized Evidence and IDs agree, MCP text/structured payloads agree, targets remain unchanged, and subsequent MCP ping succeeds. Integrating current main leaves all three full CLI results equal to the already reviewed follow-up.
  • Real compiled producer plus a 43-byte Babel AST control: unrelated argument property reads are 0 on main, 16 on the original PR, and 0 after the follow-up. This is a structural count, not a throughput or billed-token measurement.
  • 126 tests across 10 source, composition, filesystem, cancellation, and public adapter test files; typecheck, lint/module boundaries, formatting, knip, duplication, generated docs, and architecture checks pass.

The historical alias-test CI failure does not reproduce on current main: its seven selected cases pass, and the full semantic graph builder suite is included in validation. The old separate signed test patch is not applied. Observational CLI/MCP traces retain explicit unknown/partial scope; no full control-flow precision claim is made.

During validation, the formatting failure on cca7bf00 was tracked in #1585 and verified resolved by the following main commit 65434052; no redundant patch is included.

No real native analysis providers, Notion, or Obsidian verification in this iteration. No arbitrary result truncation or Evidence removal. Original contributor authorship is preserved; maintainer commits use GitHub noreply identities. Prepared with AI assistance.

@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.

@rudycelekli

rudycelekli commented Oct 9, 2026 •

Copy link
Copy Markdown
Author

Merged upstream main 39dabd0, resolving the fingerprint import conflict while preserving current lexical binding and call-reference lifetime analysis. The final diff retains the original three export-key files. Six exact-key regressions still fail on unchanged main; the repaired merge passes 37 focused tests and 48 compiled lexical-binding CLI/MCP acceptance cases. Required npm run check passes six tasks plus architecture guards with existing warnings and no errors. No provider, package or full-suite verification is claimed.

@rudycelekli

Copy link
Copy Markdown
Author

The remaining shard-1 failure also reproduces on untouched current main 08ec2bf. Native Node false/true execution and compiled REA CLI/trace agree that the fixture's unconditional alias rebind protects the original shared object; the unknown-coverage assertion is testing a different scenario.

I prepared a focused test correction that makes the guarded write actually reach the shared object, keeps every original unknown assertion, and retains the old retargeted source as a separate known-origin/provenance control. Production code is unchanged. 289 relevant tests, required static checks and test discovery pass.

The reviewed, signed patch is c1655e6. GitHub currently refuses new PR creation for my account, so it is not yet filed as a separate PR. I have retained it separately from the export-key changes. Current hosted failures remain reported as failures; no full-suite pass is claimed.

@N0zoM1z0

Copy link
Copy Markdown
Collaborator

I am reviewing current 3ae5ac33 against main c19e15a2 in a new branch/worktree. I will independently run small public CLI/SDK stdio MCP fixtures for exact export keys and controls, retain the deep-member coverage, and reproduce the reported independent shard-1 fixture failure on current main before deciding whether to apply the separately prepared correction. No correctness or full-suite pass claim yet.

@N0zoM1z0

Copy link
Copy Markdown
Collaborator

All 20 checks passed on 28b1e5ca, but GitHub refused guarded rebase merge (HTTP 405, rebaseable: false). The source branch is preserved. #1600 carries the reviewed three-file result on current main, retains contributor authorship and source commit references, and reruns the real CLI/MCP probes and checks. This PR stays open until that integration is verified and merged.

@morluto

morluto commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Thank you for the exact CommonJS export-key fix and the public CLI/MCP verification. Closing this source PR as superseded by replacement PR #1600, whose description records that it carries the reviewed implementation and preserves contributor authorship while integrating current main. #1600 remains open for integration; this closure does not claim that the export-key fix has already landed on main. The source branch is preserved.

@morluto morluto closed this Oct 10, 2026
@morluto morluto added bug Something isn't working area: domain Domain logic, errors, and pure functions labels Oct 14, 2026
@morluto morluto added the area: evidence Evidence, artifacts, and reconstruction label Nov 23, 2026
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: evidence Evidence, artifacts, and reconstruction bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants