Repository navigation
fix(projectgraph): close reach gaps in Go, Rust, Python and JavaScript - #62
Conversation
The indexer stores the indexes of the files that finished before the context of the run ended, so the next run does not parse them again. It wrote them with a context that never ends, so a store that hangs blocked the run past the budget of the caller with no limit. The write now ends 10 s after the context of the run ends. The error of a write that fails after the deadline also wraps the error of the context, so a caller that checks for context.DeadlineExceeded still sees it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…rpus The build list of colly v2.1.0 holds golang.org/x/text v0.3.2, an affected version of GO-2020-0015. corpus.txt did not list it, so the method measure had no target for utf16Decoder.Transform and the govulncheck comparison left one symbol with no match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A call with an unknown receiver can run an object with __call__ that a class attribute holds, or a value that __getattr__ gives. No call edge names these methods, so a target that only they call read as not-found. Python now has implicit methods, as PHP and Ruby have. A reference edge joins each class to the __call__, __getattr__, __getattribute__ and __get__ that an instance of the class runs, from the class or from a base in its MRO. Code that makes an instance reaches the class, so the search reaches the method as it reaches a stored function value. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A framework loads a Vue, Svelte or Astro component by a route table with a dynamic import, a bundler alias, import.meta.glob or a file-based router. No static import of a reached file names such a component, so the search lost every call in it and its targets read as not-found. The rule node.component marks each component file as a root. The rules node.sveltekit.route and node.astro.page mark the route files of SvelteKit and the pages of Astro with their exports, as load of +page.ts and POST of +server.ts. A new rule field keeps_fallback stops these roots from turning off the library-surface roots, because they name the files that a framework loads and not the entry, as the index.html of a Vite app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A call of a parameter, a local or a range variable that holds a function had only a record with its name. A search from a source scoped that record to the definitions of the name, so a function that unreached code passes in read not-found. The link step now also gives such a site a function-value record. It does the same for a call of a typed local of a function type and for a call of a member that a field of the graph names. A search from the roots keeps its answers, and a search with a source answers uncertain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The index records the typed locals of a Go function with no extent, and the link step reads the type of the first local of a name. An inner block that binds the name again made a call on it resolve to a method of the outer type, and the method of the inner type read not-found. The index now checks that the binding in scope at a call or a method value is the one whose type the link step reads, or has the same type. Otherwise the site is an unknown-receiver record with the method name. A short variable declaration that assigns a name of its own block binds no new name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A range over a function value calls it, as Go 1.23 allows. The index recorded no reference to the range expression, so the function and its callees were lost. A range clause now holds a value, as an argument does, and the function gets a reference edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A Go function with no body, as a stub of assembly or a function that //go:linkname binds, runs code that the graph does not hold. A path ended at the stub, and what that code calls read not-found. The index now gives such a function a no-dependency-source record. The link step gives it a scope: the callback for code of the standard library, the unit for the assembly of a unit, and every target for the project or another package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A call through a map or a slice index at a variable key, as m[name](), gives a function-value record, as a constant key does. The case go/source-local-func now holds the form with a parameter map, whose record concerns every target in a search with a source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A path of a chained use, as util::helpers after use crate::deep and use deep::util, or of a glob use that brings such a binding, walked to the module of the binding and stopped there. A walk that ends on a unit fails, so the path named no module and a call under it got an external key with no record. resolveQualified now steps from unit to unit through such bindings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The call graph binds a name to the value of its first let. After a second let of the name with another type, a call on the name kept the method of the first type, and a method of the real type read as not-found. Such a call is now a record with the reason unknown-receiver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A macro of std binds no name of its caller, so the index trusted a call on a name that a vec! or a println! call held as a token. A macro_rules! or a use of the file can give such a name to a macro that binds the name. The call then kept the target of the first binding with no record, and a method of the real type read as not-found. The index now reads such a macro as a binder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The index keeps the uses of a file in one scope, and the link step reads a path of a use from the module of the file. So use self::tls::conn in mod client named the tls of the file, and use super::tls in mod client named a module of the parent of the file. A call through the use got the edge to the wrong function, and its real target read as not-found. The resolver now writes such a path from the module of the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The call graph finds the first name of a call path in the scopes that hold the call and reads no use and no type parameter. So util::wipe() after use crate::store::util in a block or an inline module went to a module util of the file, and Local::make() in fn build<Local: Maker>() went to a struct Local of the file. The real target read as not-found. The index now gives such a call the path of the use, and makes a call through a type parameter a record with the reason unknown-receiver. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The link step resolved a type that a field, a result or a call path of an inline module names at the root of the file. A type of the inline module with the name of a type of the root then sent a method call to the root type, and the method of the real type read as not-found. The Rust profile now looks for a type of the name in the inline modules that hold the name first, as Java does for nested classes. The index also drops the type of a field or of a result when a scope declares its first name in another way, as a type parameter of the struct or of the impl. It keeps a type that a struct, an enum, a union or a trait of the inline module declares, which the link step now reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
… unit A glob use of a module of another crate brought no name. So html after use dep::* read as a crate html, the call got an external key with no record, and dep::html::render read as not-found. render after use dep::html::* stayed a record. A path now reads a name that a glob use of a crate brings when a unit gives the crate and the name. #[macro_export] puts a macro at the root of its crate from any module. The provision of the unit now finds such a macro, and a call of a single name that no item binds gets the edge to an exported macro of a dependency. A single name can name a closure or a parameter, so such a call keeps its record. A macro now reads $crate::sink as crate::sink. A path of a unit that names a module, as dep::html, gets no external node, because the walk of its provision ends on a module and recorded the whole unit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
… module rustFromFile now joins the parts with slices.Concat, which also clears a staticcheck finding. The table checks a path that goes up past the module of the file, which no case of projectgraph reaches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…eeds The lookup of an exported macro for each single name that no item binds asked the provisions of each dependency, and the lookup of a nested type walked up the classes that hold each name. Together they made the link step of the Rust corpus a quarter slower. A table of the names of the exported macros and of the types of the inline modules now skips both for a name that no unit and no inline module defines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…writes The Rust profile of providers resolves a path of the unit, and that resolution can read the glob uses of a scope. A pass of a glob read that does not settle gives a part of the modules, and the providers memo kept the answer for the whole build. The write now logs an undo step, as the other memos that a glob read can feed do. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The Go, Rust and JavaScript fixes change what the indexer writes and what the link step builds. The reach and summary rules do not change, so reach.Version stays 5 and summary.Version stays 3. The golden files and the index fixtures change only in their version field. The new hash rows cover the new cases of the fixes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The timer of graceContext kept running for its whole grace after the write returned. It now stops when the returned context ends. A store error of a run whose context is still live now comes back as it is, and only a write that fails after the deadline joins the error of the context. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The binding check turned a call into a record when the typed local came
from an assignment and the binding in scope was a declaration with no
type, as cl in cl := o.c; cl = &client{}; cl.do() or a named result. The
record gave name edges to the methods of other types, so a target behind
one of them read found. A function that binds the name once has one
variable, so the assignment types it, and the call keeps its member edge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm
Signed-off-by: Claude <noreply@anthropic.com>
The link step counted every field name of every language as a member that
can hold a function, so a call as n.Name() on a range variable made each
target uncertain from a source when a struct had a field Name string. The
Go index now marks a field of a type of data with Data, and only a Go
field that can hold a function counts. A call of a local that the function
binds once to a function literal, as f() after f := func() {...}, runs
code that the index gives to the function already. The index now drops
that call, so it has no record.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm
Signed-off-by: Claude <noreply@anthropic.com>
A range over a parameter, a var or a field of a function type calls the function value, as a call seq(yield) does. It had no record, so a search from a source read not-found where the call read uncertain. The index now gives such a range a record, which the link step makes a function-value record. The docs also give the field and closure rules of the previous commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…ake an instance A reference edge joined each Python class to its __call__, __getattr__, __getattribute__ and __get__. Any reference to the class reached them, as isinstance(x, Proxy) or a call of a static method, so a target that only these methods call read as found when no code made an instance. The edge now goes from each edge that makes an instance: a call of the class, through export hops and the package edge of a unit. A reference to a metaclass, a class with the written base type, makes an instance at the class statement, so it gets the edges too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A route file of SvelteKit exports an object of actions, and SvelteKit calls each function of it by its name. The path rule marked the object, and no edge led from it to its functions, so their targets read as not-found. A path rule now marks each function under an exported object of its files. An import of $lib gave an external key with no record. The resolver now maps $lib to src/lib of the nearest package that depends on @sveltejs/kit. A svelte.config file can move the directory, so an import of $lib that names no file stays first party and gets a record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…ation
export const { GET } = handlers gave no export record, so a route rule
marked no root for GET, and a target that only its function calls read
as not-found. Each name of the pattern now gets an export record whose
target is the member that it takes, as handlers//GET, also through a
nested pattern and a rename. A name of an array pattern or a rest element
takes the object that holds it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm
Signed-off-by: Claude <noreply@anthropic.com>
A let counted from its start, so c.with_retry() in the value of let c = c.with_retry() read as a call after a second let and became a record. So did c.send() after it, though both lets hold a Client. The records gave the low name edges of send, and a target behind another send read found. A let now counts once its statement ends, and lets whose values have one type keep the target of the call graph. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A type that a field, a result or a let names through a use of an inline module, as Item after use crate::store::Item, was dropped. The call on the value then got a record and the low name edges of each method of the name. The index now writes the path of the use, and the link step reads such a path of a declared type as the alias of a type does. The call graph sends x.save() after let x = Item::new() to the Item of an outer module that it finds before the use. The index now gives such a method call the path of the use of the type name, so the save of the real Item is no longer not-found. The receiver row of a use of an inline module now reads found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
A name that the module of a glob use of a unit brings from another crate, by pub use inner::* or pub use inner::tools, or a child module that it brings by its own pub use crate::sub::*, named nothing. The path then read as a crate, got an external key with no record, and its target read not-found. A unit now gives such a name as the external key of the third crate, and a glob of a module of a unit brings its child modules and the names of its uses. Two crates can bring each other's names by glob uses, so a guard cuts the second read of a name. A provision that a guard cut is now not kept for the build, because the same path can resolve on another way in. Each cycle guard counts its cuts for that check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…nit ends on dep1::m2::f0 with pub use dep2::m4::f0 or pub use dep2::m4::* in the unit of dep1 walks to the key dep2//m4//f0. No call names that key, so it had no node, and linkProvision returned with no edge and no record. A target under it read not-found. The key now gets its node and the edge, and the next pass of linkPackages links it to the unit of dep2. A key of a module of a unit runs no code and gets no node. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
… for a self or super target rustRebinder read every item of each block and declaration list around each call. An impl body with many methods made that read grow with the square of the body. The uses of a list now stay in a table of the file. The walk of the binders of a function for a method call now runs only when a target starts with self or super, because no other target can change. The index does not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…t case The rows of fileindex 17, projectgraph 20 and reach 6 exist only on this branch, so they change in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
|
This pull request exceeds GitHub's diff limits and cannot be scanned. GitHub Limits:
Recommendations:
|
Codex Review Summary: ✅ CompletedThis 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. |
|
Important Review skippedToo many files! This PR contains 586 files, which is 486 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. Usage-priced reviews support at most 300 files.
|
vet Summary ReportThis report is generated by vet Policy Checks
Malicious Package AnalysisPackages were checked against SafeDep's known malicious packages database Malicious Package Analysis Report
Changed PackagesChanged Packages
|
Pin safedep/code at 0978580, the head of safedep/code#62. The reach corpus gives the same answers as with the earlier pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm
…ee package TestBuildRustKeepsNoGlobListThatACutGave indexes a crate, so it needs the tree-sitter parser and CGO. The package projectgraph builds without CGO, and the CGO-free job runs its tests. The test now sits in test/projectgraph, which holds the other tests that index a project. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #62 +/- ##
==========================================
- Coverage 76.59% 73.54% -3.06%
==========================================
Files 186 187 +1
Lines 19512 21163 +1651
==========================================
+ Hits 14945 15564 +619
- Misses 3668 4633 +965
- Partials 899 966 +67 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0978580088
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Two checks failed on 0978580.
Generated by Claude Code |
…ject A route rule marks each function under an exported object of the file, as the actions of a SvelteKit page. It also marked a function that a member defines inside its body. Such a helper runs only when a call reaches it, so a dead helper made its calls read found. A function under the object is a root now only when no other function of the file holds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
Pin safedep/code at c86e581, the head of safedep/code#62. The reach corpus gives the same answers as with the earlier pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm
…le text The guide now tells a caller what to call, what each call gives and what the answers mean. It keeps the steps, a short example per step, the options that a caller sets, the statuses and the uncertainty kinds, the node and edge kinds, the roots and sources, the versions and the known limits. The code, its comments and the cases under test/projectgraph/cases record each rule. So the guide no longer copies the rules of each language. Each code comment that sent the reader to the guide for a rule now states the reason in place and names the case that pins it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7eab88bb2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…inding A call of the first parameter of a classmethod makes an instance of its class, also from a function that the classmethod defines. The link step walked out to the classmethod and took a call of the name as such a call even when the nested function bound the name again, as a parameter or by an assignment. The instance methods of the class then read as reached. The index now gives ClassParam to a nested function only when it does not bind the name again, and the link step reads ClassParam of the function that holds the call. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The rows of fileindex 17, projectgraph 20 and reach 6 exist only on this branch, so they change in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…e of its own rustExports took a child module for an export because the module has a namespace unit. dep with mod hidden; and other with pub mod hidden; then gave hidden::run() after use dep::*; use other::* the edge to dep::hidden::run, and the real call through other read not-found. The index now holds the child modules that a file declares with no plain pub, and a glob use of another crate brings none of them. A glob use in the same crate still brings a private module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
The rows of fileindex 17, projectgraph 20 and reach 6 exist only on this branch, so they change in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
Pin safedep/code at de177cd, the head of safedep/code#62. The reach corpus gives the same answers as with the earlier pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de177cda1f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…nother module x.save() after use crate::b::Item and let x = a::Item::new() went to b::Item::save. The rule for a use that binds the name of a type again read only the last name of the class of the target, Item. The path a::Item names its type through a, which the use does not bind. The rule now reads the type path that the let of the receiver writes, and keeps the target when the first name of that path is not the name of the type. A let with a type reads that type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
An angle-bracket assertion of TypeScript, as <Handler>make(), holds its type first and its value last. The unwrap of an exported value took the first child, so it read the type, found no call and gave the export no opaque record, and a target that only the returned handler calls read as not-found. The indexer now uses Unparen of lang/ecmascript, which takes the last expression of the assertion, and the package gives Unparen as a function as well as a method of an analysis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…class A call of a class links __call__ of its metaclass. The link step took the first metaclass that a class of the MRO names, but Python takes the most derived of the metaclasses of all the bases, as Derived for a class with a base of metaclass Base1 and a base of metaclass Derived(Base1). The call then reached the wrong __call__, and a target of the right one read as not-found. The link step now collects the metaclasses of the MRO and takes the one that derives from all the others, or each of them when none does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
…ss cases Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm Signed-off-by: Claude <noreply@anthropic.com>
* [FOU-578] Take the reach gap fixes of safedep/code Pin safedep/code at the head of its branch claude/reach-mvp-precision. The link step now resolves a Rust glob use of a dependency module and an exported macro of a dependency, and it links a method call on a trait object with a cha edge. - rust/glob-use and rust/macro-import now read found, so their miss lines go. - rust/trait-object now reads a weak path. Its miss line now gives that reason. - The false negatives of the Rust corpus go from 20% to 0%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm * [FOU-578] Use an unknown extension in the unread-file test safedep/code now parses .jsx files (FOU-576), so a .jsx file no longer shows an extension that vet does not read. The test now uses a .coffee file, which no language of the index reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm * [FOU-578] Pin safedep/code at the head of its reach gap fixes Pin safedep/code at 0978580, the head of safedep/code#62. The reach corpus gives the same answers as with the earlier pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm * [FOU-578] Pin safedep/code at the head of its reach gap fixes Pin safedep/code at c86e581, the head of safedep/code#62. The reach corpus gives the same answers as with the earlier pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm * [FOU-578] Pin safedep/code at the head of its reach gap fixes Pin safedep/code at de177cd, the head of safedep/code#62. The reach corpus gives the same answers as with the earlier pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm * [FOU-578] Pin safedep/code to the receiver and metaclass fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm * [FOU-578] Pin safedep/code to the head of main Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFQbqPqd9xn1fT6hBsyoUm --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
This PR closes call graph gaps that gave a false
not-foundor a falsefoundin reach. vet turnsnot-foundinto "not called", so a falsenot-foundis the worst defect. Each fix keeps that order: a sounduncertainis better than a wrong answer.Changes
Go
(*p)()or(<-ch)()holds. A local bound once to a function literal gets no extra record.//go:linkname) gets a record. A linkname into a package of the graph becomes an edge.Rust
let, auseor type parameter that shadows a name, an inline-module type, a usermacro_rules!named like a std macro.use super::*thensub::f(),self::andsuper::in an inline module, a value path such asconfig::LIMIT.pubitems, a re-export through a third crate links into that crate, an exported macro resolves, and a crate macro shadows a dependency macro.$f()in a macro rule is a record.Python
__call__,__getattr__,__getattribute__and__get__through the MRO. This also coverscls()in a classmethod,type(self)(),functools.partial(C)and a metaclass. Anisinstance,issubclass,typing.castorhasattrargument does not count.JavaScript and TypeScript
.vue,.svelteand.astrofile outside a test path is a root. SvelteKit and Astro route files are roots, withactions, destructured exports and$lib. An opaque route export (export default NextAuth(...),sequence(...)) gives a record.Other
golang.org/x/textfor colly.fileindex.Versiongoes to 17,projectgraph.Versionto 20 andreach.Versionto 6. The golden files change only in their version fields.Soundness checks
test/projectgraph/casesthat fails without its fix.foundon main.foundat high confidence is 96 methods and 35 functions, against main's 95 and 35. Python has 5 morefound.Timing
Sums of best-of-3 on the method corpus, run against main's
corpus.txt:vet's default
--reach importlevel runs only the indexer.projectgraph.Buildruns only at--reach function.Known limits
These shapes give the same answer on main and on this branch:
useinside a block binds its name for the whole file.#[macro_use]module declared after a call still counts as in scope for that call.no-such-target.These cost precision but are sound:
uncertain.err.Error()becomes a function-value record when the graph has a function field namedError.Test plan
go test ./.... modgraphTestBuildHoldsEachEdgeOfGoListfails on main too.golangci-lint run ./...: 0 issues../langcode/ ./lang/grammar/ ./fileindex/... ./projectgraph/... ./internal/....go test -tags projectgraph -run 'TestPublicSets|TestGovulncheckTraces|TestVulnAgreement' ./test/projectgraph/.Generated by Claude Code