Repository navigation
Conversation
… at a rebinding The mock-restore scan tracked a module object by identifier name, so a parameter or local that shadowed an imported namespace was reported, and a guarded-global or module-object alias stayed an alias after its binding was reassigned to a local value. Resolve the module object through the binding's scope (the scope walk the guarded analysis already uses) and record alias events by position, so a rebinding ends the alias for the reads after it while a member assignment before the rebinding is still reported.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sweep — cli#587 (PR #588)Scope: every sentence this PR adds or changes, in
Claim types checked
FixedNothing — no sentence failed its check, so none was changed after the commit. |
|
Closing without merging. Adjudication found that ending an alias at a rebinding, and resolving a module alias by binding, each open a way for a real patch to go unreported: a rebinding inside a branch, a function that never runs, a hoisted function called before the rebinding, a The over-reports #587 targets fail closed (they ask for |
Closes #587
The mock-restore scan tracked a module object by identifier name, so a parameter or local that shadowed an imported namespace was reported, and a guarded-global or module-object alias stayed an alias after its binding was reassigned to a local value.
This change resolves the module object through the binding's scope — the same scope walk the guarded-global analysis already uses — and records alias events by position, so a rebinding ends the alias for the reads after it while a member assignment before the rebinding is still reported.
The existing red fixtures stay red; three fixtures are added: a green for the shadowed parameter, a green for the alias after rebinding, and a red for the member assignment before the rebinding.
Evidence (measured on 45e7d03, main 63f581e):
bun run test: agent 194 pass / 0 fail; cli 3028 pass / 0 fail (196 files); root-test 243 pass / 2 todo / 0 fail.bun run lint:ci: exit 0.node scripts/changelog-fragments.mjs check: exit 0.Mutations (fix reverted, test restored green):
mod.method);g.fetch).