[ENG-4061] Resolve map bindings and helpers by scope, and report only served routes - #308
Merged
Merged
Conversation
…ved routes Taint roots and same-file helpers are now keyed by the declaration an identifier resolves to, not by its name. A block-scoped binding, a callback parameter or an inner function's own request parameter that shares a name with a request binding is a different variable and no longer proves a flow. A binding that is assigned again after its declaration still proves reachability, but not an exact value. A route registration needs a URL path as its first argument, server actions no longer take a route from their file location, and Nuxt file routes come only from server/api and server/routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Implements correct scope-based binding resolution and filters only served routes. 🎯 Quality: 84% Excellent · 📦 Size: Extra Large — strongly consider breaking this down 🛡️ Standards: Not checked — 654 lines changed, over your team's 400-line limit, and nothing checked before it was opened. Coding agents can call the 📈 This month: Your 159th PR — above team average · Averaging Good |
patchstackdave
added this pull request to stack #316
September 29, 2026 08:02
Contributor
Author
|
/review |
mariojgt
approved these changes
Sep 29, 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.
Refs ENG-4061
The input map now resolves each identifier to the variable it refers to, instead of matching on its name. It also only reports routes the app actually serves.
Request bindings follow scope
requestthat shares a name with a request binding is a different variable. It no longer proves a flow, and fields read off it are no longer inventoried as request inputs.++/--, or afor…ofhead) still proves reachability, but only attransformed-local, notexact-local. The same applies to anything derived from it, and toargumentUseon dependency-input links.Helpers follow scope
runnow get their own sinks.Routes are ones the app serves
/…or*) as its first argument, socache.get('user', fn)is no longer an endpoint.server/apiandserver/routes.server/routes/hello.tsis now/hello, not/routes/hello.Effect on map output
Some flows move from
exact-localtoheuristicortransformed-local, and some endpoints lose a route or disappear. Every one of those removed coordinates was not one the app reads or serves.Validation: full suite (3,464 passed, 7 skipped), typecheck, build. New regression tests fail on
main, and each rule has its own test.🤖 Generated with Claude Code