Skip to content

fix(extract): apply interop guard to type-match stub rewire (#2343) - #2365

Open
HaoChiBao wants to merge 1 commit into
Graphify-Labs:v8from
HaoChiBao:fix/stub-type-interop-guard-2343
Open

fix(extract): apply interop guard to type-match stub rewire (#2343)#2365
HaoChiBao wants to merge 1 commit into
Graphify-Labs:v8from
HaoChiBao:fix/stub-type-interop-guard-2343

Conversation

@HaoChiBao

Copy link
Copy Markdown

Summary

Test plan

…-Labs#2343)

The language-family gate from Graphify-Labs#1781 only ran on the unique-function
fallback in _rewire_unique_stub_nodes, so Swift/Python Path stubs still
bound to a lone JS class Path. Hoist the gate to every unique match and
cover type/same-family/native-family cases in tests.

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).


Graphify review — findings

This PR modifies the _rewire_unique_stub_nodes function in graphify/extract.py to apply the existing language-family interop gate to all unique-stub rewire matches (type exact, type case-insensitive, and function fallback), rather than only to the function fallback path. The intent, per referenced issue #2343, is to prevent a stub type reference in one language from binding to a same-named definition in an unrelated language family. The test file is updated to change an existing fixture from a cross-language (Python→C#) pair to a same-language (C#) pair, and adds three new tests covering cross-language type rewire blocking, same-family type rewiring, and native-family (Swift/ObjC) interop rewiring.

No blocking issues surfaced. 3 lower-confidence candidates did not survive cross-model review.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 1366 functions depend on the 467 functions this change touches.

Health — this change adds coupling hotspots:

  • worse: _rewire_unique_stub_nodes() — 9 callers, 6 callees

Verification — 1366 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 1239 function(s) in the blast radius were not formally verified this run

· 1 more finding(s) on lines outside this diff (see the check run).

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.

Interop guard missing on the type-match branch of stub resolution: Swift/Python Path binds to a JS class

1 participant