fix(tsjs): resolve Effect-TS wrapper-named functions and service receivers - #15
Merged
Merged
Conversation
…ivers
Two resolution gaps severed the call graph on Effect-TS codebases:
1. The extractor names a function node after a wrapper debug string
(Effect.fn("Ns.name")), but call sites use the binding's bare name and
function-local consts are unindexed — exact-name matching failed or
bound a same-named function in an unrelated file. matchWrappedLocalName
bridges the names: a bare call resolves to the unique same-file
wrapper-named function visible from the call site's scope, and runs
before global exact-name matching so a same-file target beats a
cross-file bare name.
2. Member calls on service locals (const x = yield* Ns.Service) had no
source-level receiver type. The mc-effect-svc branch recovers the
namespace from the receiver's own declaration (one Ns.create() factory
hop included), requires the file to import it, and resolves a unique
Ns.method node. Shadowing and non-service re-binds decline.
A pre-filter escape (matchesWrapperNamedMember) lets tail-named refs reach
these strategies — a pass buys a lookup, not an edge.
On an Effect-heavy repo this replaces hundreds of wrong cross-file
bare-name edges (test helpers, unrelated classes) with correct targets.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two uniqueness/scope/import-gated resolution strategies for Effect-TS codebases, plus the pre-filter escape that lets tail-named refs reach them. Full rationale in FORK.md's patch table and CHANGELOG; regression cover in
__tests__/effect-ts-resolution.test.ts(8 tests). Verified on an Effect-heavy monorepo: +641/−308 TS call edges, every sampled removal replaced by a demonstrably correct target. Suite: 3065 passed, only the 10 pre-existing environment failures (git-fixture dependent) remain, identical to baseline.