Files
reverse-engineering-anything/tests
morlutoandCursor Agent cb17828dd1 fix(reference): retain proven loader calls and unresolved targets (#9920)
* fix(reference): retain proven loader calls and unresolved targets

* refactor(reference): remove unused ancestor lookup

* fix(reference): drop loader calls that return a reassigned member

An immediate call could still use a member's original require initializer
because mutation facts were not built for a call-valued callee. A definite
assignment that precedes the call now replaces that initializer.

* fix(reference): select returned loaders from indexed read facts

* fix(reference): refresh loader facts for wrapped returned members

A sequence such as (0, box.load) still used the original require
initializer. Follow sequence, conditional, and logical returns to the
member before deciding whether a prior assignment replaced it.

* test(reference): record unresolved CommonJS targets in source evidence

unknown.cjs calls require with a non-literal target. The inventory now
keeps that coverage limitation on the file entry, and the boundary
fixture asserts it beside the resolved member relationships.

* fix(reference): cover opaque apply lists and assigned returned members

require.apply(null, args) has no normalized argument list, so the
inventory now records an unresolved target instead of complete coverage.
An assignment return such as f = box.load is followed to the member
before a prior replacement is trusted.

* fix(reference): keep self-defaulted module delegates loadable

Timing a member read at a later call made `box.load = box.load || null` observe its own write and drop the native delegate. Reads that already fed an earlier assignment stay at the member.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-11-11 18:23:15 +08:00
..