Skip to content

typescript: a class in one program is not a structural implementor of another program's global - #1779

Merged
swapnilpaliwal-sd merged 1 commit into
0.1.9from
loop/to-t3
Sep 29, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
0.1.9from
loop/to-t3

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

A class in one TypeScript program was still counted as a structural implementor of a global declared in another program: a production class with map "implemented" a test fixture's hand-written interface Array. Fixture xs.map(cb) then dispatched into production code, and production this.items.map(f) dispatched into fixture classes. Callback reach went across every program in the repo.

  • A structural pair is now dropped when the target is a client global and neither program can see the other's file (the same test program_sees uses). Root globals keep nested conformers, and same-program pairs are unchanged.
  • New golden case 82 (sibling programs). Control: the fixture's own Bag keeps its dispatch from rows.map.
  • Checked: TS golden suite 94/94 passed on the VM (run before rebasing). In case 82, 11 edges went to 9 (both cross-program dispatches removed, both controls kept).

Closes #1574

… another program's global

A client global belongs to one program (#1574 scoped name lookup and merging),
but structural satisfaction still paired every same-shaped class with it. A
production class with a `map` became an implementor of a test fixture's
hand-written `interface Array`, so fixture `xs.map(cb)` dispatched into
production code and production `this.items.map(f)` dispatched into fixture
classes; callback reach then crossed every program in the repository.

A structural pair is dropped when the target is a client global and neither
program sees the other's file (same governed-by / under-directory test as
program_sees). Root globals keep nested conformers; same-program pairs and
modules with no tsconfig are untouched.

Golden case 82 (sibling programs) with a control: the fixture's own Bag keeps
its dispatch from rows.map.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@swapnilpaliwal-sd
swapnilpaliwal-sd changed the base branch from 0.1.8 to 0.1.9 September 29, 2026 06:04
@swapnilpaliwal-sd
swapnilpaliwal-sd merged commit 08bf938 into 0.1.9 Sep 29, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the loop/to-t3 branch September 29, 2026 06:44
@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor Author

Verified on this repo after rebase (TS graph, branch engine vs 0.1.9 engine):

  • call edges 40048 -> 39980, dispatch candidates 2241 -> 2083; all 117 removed edges crossed between separate fixture programs
  • 49 added: 25 fixture xs.map/filter calls upgraded multi_inferred -> known_edge to their own program's Array.map, 24 callback edges to the arrow at the call site
  • path jsxTagReference '*': 5 methods (was 2140 in the report); the repro path has no chain
  • TS golden 95/95, JS golden 84/84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant