Skip to content

test(browser): preserve unknown with-scope dependency bindings - #610

Closed
rudycelekli wants to merge 1 commit into
morluto:mainfrom
rudycelekli:campaign/rea-source-map-with-scope-followup-20261005
Closed

rudycelekli wants to merge 1 commit into
morluto:mainfrom
rudycelekli:campaign/rea-source-map-with-scope-followup-20261005

Conversation

@rudycelekli

Copy link
Copy Markdown

Summary

Follow up on merged #588: correct the recovered-source regression to preserve the existing unknown-binding contract inside a dynamic with scope. This is the shared shard 3/4 failure observed on #601 and #603–608.

No separate issue: this is a focused CI regression found in the maintainer-expanded coverage of #588, with direct failed job logs and local reproduction.

Problem and expected behavior

The new recovery fixture expects require("./c.js") inside with(scope) to establish a host-loader dependency. The existing semantic producer deliberately marks that binding unknown because the object can supply its own require. Emitting that edge would guess an identity.

The corrected fixture retains the ambiguous call and checks that it is omitted, adds a genuine unbound loader call outside the scope, retains the recovered static import, and still requires partial status and its limitation. Production behavior is unchanged.

Contract and boundary impact

  • Owner: source-map dependency recovery verification. No production changes, schemas, tool inventory, metadata, authority or installation changes.
  • Unsupported/unknown results are preserved; no new provider claim.

Evidence and regression coverage

  • Fresh bae87b4 reproduces the same failing test as the hosted shard.
  • Actual Node execution of the owned with example calls the object's loader once and the host loader zero times.
  • Actual REA semantic analysis reports the inner reference as unknown and the outer reference as unbound.
  • The complete focused source-map test file passes with the corrected fixture. Existing shadowed-require and unparsable-source controls remain intact.

Validation performed

  • npm run build:cached — passed.
  • npm run test:focused -- tests/boundary/browser/webSourceMapFetcher.test.ts — passed.
  • npm run check — passed.

Current ordinary-fix policy after #599 makes the complete local check:pr optional. Hosted aggregate coverage remains separate; no hosted pass is claimed here.

Compatibility, safety and review

Test-only correction; no migration, provider, package or runtime behavior change. Owned fixed inputs were executed locally; no caller or ambient code was evaluated. Full Hopper/Ghidra/native-browser verification is not relevant to this test-only change.

The diff was peer-reviewed; the commit is signed with DCO sign-off. Prepared with AI assistance.

@rudycelekli

Copy link
Copy Markdown
Author

The shared CI fixture is now corrected upstream in #609, including the recovered outer loader call. That supersedes this patch; I am closing this duplicate and updating the affected branches to preserve the owner’s fixture. The native Node and semantic-boundary evidence remains recorded for the review.

@morluto

morluto commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thanks, @rudycelekli, for your work on “test(browser): preserve unknown with-scope dependency bindings.” I appreciate your contribution to REA.

@morluto morluto added area: tests Test suite and verification area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Oct 14, 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 area: tests Test suite and verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants