Repository navigation
Resolve calls through glob imports and shared module files - #57
Merged
Merged
Conversation
A call or macro-argument path that the base tiers leave unresolved, whose first segment no local item, non-glob use or shadowing binding of its module binds, now looks up that name in each workspace module a glob use of the module reaches. When exactly one item is found across them, the call walks from that module by the existing tiers, with the new reason use-glob at 0.85. Two candidates or none give no edge, and a call the base tiers place keeps its edge. The extractor version goes to 12. The store and the command-line reason tables gain use-glob. The resolve fixture gains its two glob calls as use-glob edges, and the scorer case for the glob bucket keeps its miss with a second globbed module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A non-inline mod declaration naming a file another root already reached now gives that later claimant a module row of its own on the file. The file keeps one row in files and in symbols, its first module, and its own declarations are read once, from its first claimant. The resolver answers a lookup in any module row from the first module of its file and scope, so the file items resolve from every claiming root by the existing tiers and reasons. The store picks a file module, for files, symbols and the resolver input, as its first module row. The command-line tests that pin the reason table and the resolve fixture counts follow the use-glob edges, and the resolve-tests fixture gains the call its second test root makes into the shared file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fixture covers a shared test helper from two test roots, a glob with one candidate, two candidates left unresolved, a local item that wins over the glob, a call the base tiers already place, a two-hop re-export the base tiers follow and a re-export cycle they refuse. The resolver tests cover a shared module file reached from each claiming root by a path, a use and a glob, and the store test checks that the shared file keeps one file row, one symbol row and its first module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An import whose path now ends at a later claimant module row of a shared file names what it named before that row existed: the one mod item of that name in the parent module. So every existing link keeps its endpoints, and only links the shared file newly makes reachable are added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The glob cure picks the one function its walk names through a named helper, and a test keeps a use of another name from blocking it. The lang, lang-rust and extract instances list the Reason dispatch matches that the use-glob reason grows by one arm as CRAP exemptions, each with its reason and an expiry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The indexer refuses a file that is not UTF-8 before it parses it, and the random-bytes family now does the same: such an input is counted under refused_not_utf8 and never reaches the extractor, instead of going in lossily decoded. The token soup and mutation families are unchanged, and the full run still asserts no panic and 250 ms per input and lists every slow case by number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dexes status and doctor treat an index from extractor version 11 as they did the earlier stamps: stale in status, refused by reads, the same doctor checks. The README's Resolution gains the use-glob row and sections on glob imports, shared module files and re-exported paths, which the path rows already follow except through a glob re-export. A new Quality section gives the contract run's figures on three trees: precision for each reason and recall against rust-analyzer, the per-crate quality gate, the fuzz and map property runs with the accepted tree-sitter error-recovery miss, the network-less run and the timings. The extractor version reads 12 throughout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
every_budgeted_reply_is_the_fewest_drops_that_fit and impact_diff_fits_in_its_own_order are CPU-bound and run past the ci profile's 20 s kill on a slow or shared box, such as a network-less container, while native runs are fast. A ci override gives exactly those two a 10 s period with terminate-after 6. Nothing else changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Quality section now carries the review run's figures at c3185a0: recall and both bands, which equal the contract run's, the per-reason precision it measured, the gate on all eight crates, the 500000-case fuzz run with its accepted tree-sitter error-recovery miss, the map property, the network-less run and the timings. A new Agents part gives the 48-run comparison of two agent harnesses with and without fract mcp. Neither read fewer files with Phantom at an equal or better score, so the goal is not met; it is recorded as a miss accepted by the project's owner, and agent uptake is the next work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Lifts call resolution on foreign trees with two closed cures. Every existing edge and link is kept: the change is additive, and the extractor version moves to 12.
What changes
Type::assocreached only through ause p::*of a workspace module now resolves, when exactly one item of that name exists across the globbed modules in scope. These edges carry a new reason,use-glob, at confidence 0.85. Two candidates give no edge. A local item or an explicit import always wins.modfrom several crate roots, such astests/common/mod.rsreached from each integration test, now has a module row for every claiming root. Its items resolve from each root by the existing tiers. The store's file-to-module subqueries pick the first-declared row explicitly, so single-claim files keep exactly the rows they had.statusanddoctorreport the stamp-11 refusal until re-index.citimeout override for two budget tests that run slowly under virtualization.Checks
fmt, clippy (
--workspace --all-targets --all-features --locked -D warnings),cargo deny checkand nextest all pass. No new package, no new crate, no.githubchange. Store schema 3, with no migration.🤖 Generated with Claude Code