Skip to content

fix(javascript): retain unpaired return locations with empty opposite exports - #2803

Closed
chqcjq wants to merge 10 commits into
morluto:mainfrom
chqcjq:fix/export-unpaired-return-locations
Closed

chqcjq wants to merge 10 commits into
morluto:mainfrom
chqcjq:fix/export-unpaired-return-locations

Conversation

@chqcjq

@chqcjq chqcjq commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #2659. The core fix was integrated into main by b58adafa4, and the issue is closed as completed. This PR retains public CLI/stdio MCP regressions and directly related cleanup of the both-empty diagnostic.

Synchronization and remaining scope

Merged main cbc0e97c2 into the existing branch with merge commit 1b79f56ac. Maintainer commits and merge history are preserved; no rebase or force push.

The remaining diff has two files: six comparison scenarios per public adapter, and removal of the now-unreachable nonempty branch in the empty-shape diagnostic. Empty opposite exports keep per-variant unknown changes; both-empty exports retain a generic unknown diagnostic. No runtime behavior or added/removed correspondence is inferred.

Current validation

  • npm run check:ci — pass, including typecheck, lint, format, knip, metadata, duplication, module boundaries and architecture guards.
  • npm run docs:check — pass.
  • npm run verify:test-discovery — all 1,275 test files discovered exactly once.
  • npm run test:focused -- tests/acceptance/applications/unpairedExportReturnsCli.test.ts tests/boundary/filesystem/javascriptExportShapeComparison.test.ts — attempted; 50 tests fail before analysis because this Windows host's native private-runtime authority inspection is invalid (private-runtime-root-authority-unavailable). These failures do not reach export comparison, and no current runtime pass is claimed.
  • Normal pre-push check:fast — pass; no hook bypass.

Historical validation on the original fix: the new CLI/MCP regression failed before the fix, then the four focused files passed 69 tests on bb0a8b90c. That historical result is not validation of this newly synchronized head.

The previous format failure in packagePlatformDiagnostics.test.ts and Turkish README link drift have upstream corrections included in this merge. The full deterministic suite and public runtime verification remain for CI. This change is static analysis only; no native provider or target code execution is involved.

Author readiness

Human owner: @chqcjq

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

Draft pending the human owner's initial readiness declaration, as required by the current AGENTS.md/CONTRIBUTING.md.

@chatgpt-codex-connector

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

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T19:11:59.810025Z ded84e7 New commits
ℹ️ 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.

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

This PR simplifies the both-empty export diagnostic and adds public regression tests for retained return locations.

  • Empty-export diagnostics now say that both exports have no returns.

Reviews (7) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile

@morluto morluto added bug Something isn't working area: domain Domain logic, errors, and pure functions P2: medium Medium priority issue labels Oct 13, 2026
morluto and others added 8 commits October 13, 2026 23:09
* fix(comparison): preserve incomplete function call evidence

Keep missing, unknown, partial and unresolved call relationships unknown in function comparisons and reconstruction claims. Aggregate IDA caller and callee coverage without overwriting uncertainty.

Validate with 144 focused tests, typecheck/lint, docs checks and test discovery. Real providers were not verified; the full headless IDA session suite requires unavailable Windows native controls.

* fix(comparison): recheck historical calls-only changes

---------

Co-authored-by: morluto <[email protected]>
morluto added a commit that referenced this pull request Oct 14, 2026
Preserve CommonJS literal paths and confined ESM URL semantics, including package main fallback, directory intent, Unicode identity, and present opaque modules. Parse extraction inputs at their AST/source owner, retain skipped HTML and source-map coverage, and distinguish endpoint candidates from proven receiver facts. Version structural fingerprints with computed literal contents and propagate them through worker contracts.

Reviewed fixes include #1810, #1840, #2642, #2700, #2702, #2714, #2803, #2960, #2968, #2986, #3035, and #3036.

Validation: 158 resolver tests passed; public CLI/MCP module lookup controls, package-main/Unicode workflows, and six builtin workflows passed in the current compiled lane. Worker schema/fingerprint regressions passed. Large public pdf.js completion and real Electron analysis remain unverified.
@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.

@chqcjq
chqcjq marked this pull request as draft October 14, 2026 12:26
@chqcjq chqcjq closed this Oct 14, 2026
@morluto

morluto commented Oct 15, 2026

Copy link
Copy Markdown
Owner

Thanks, @chqcjq, for catching that an empty opposite export erased a return location that was still observed on the other side. Main now retains those unpaired locations and their coverage limits (main).

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 bug Something isn't working P2: medium Medium priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants