Skip to content

Resolve calls through glob imports and shared module files - #57

Merged
VirtualMachinist merged 12 commits into
mainfrom
feat/w13-dogfood
Nov 15, 2026
Merged

VirtualMachinist merged 12 commits into
mainfrom
feat/w13-dogfood

Conversation

@VirtualMachinist

Copy link
Copy Markdown
Member

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

  • Glob imports. A bare name or Type::assoc reached only through a use 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.
  • Shared module files. A file declared by mod from several crate roots, such as tests/common/mod.rs reached 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.
  • Re-exported paths: not done. The bucket turned out to be mostly trait-impl calls through a type path, which is later work. This is recorded in the README.
  • Fuzz harness. An input that is not valid UTF-8 is refused before parsing, exactly as the indexer refuses such a file, and counted. Slow parses inside the parser's error recovery on non-code text are recorded as a known limit.
  • Surfaces.
    • status and doctor report the stamp-11 refusal until re-index.
    • README "Resolution" covers both cures.
    • A new README "Quality" section holds the measured resolution, gate, fuzz, map, network-less and timing figures.
  • Test configuration. A per-test ci timeout override for two budget tests that run slowly under virtualization.
  • Includes the two store fixes merged into the previous gate after this branch started.

Checks

fmt, clippy (--workspace --all-targets --all-features --locked -D warnings), cargo deny check and nextest all pass. No new package, no new crate, no .github change. Store schema 3, with no migration.

🤖 Generated with Claude Code

VirtualMachinist and others added 12 commits November 14, 2026 17:09
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>
@VirtualMachinist
VirtualMachinist merged commit 78a1912 into main Nov 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant