get_dependencies importers are matched by file stem: 15/30 rows wrong on zod; relative specifiers are never resolved and stem matches are not marked #544
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
h-dv/code-index#544
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
get_dependencieslists a file's importers by matching the file stem, and never resolves relative specifiers. On a monorepo with common file names, about half the rows are wrong.get_dependencies(v4/classic/schemas.ts): 15/30 importer rows are wrong. They arev4/core/*files importing their own./schemas.js.external.ts: 8/12 rows are wrong (the v3 and miniexternal.ts).lib/y/util.tslistssrc/u.ts, which imports../lib/x/util.js.importers_of_file(crates/daemon/src/local_index.rs:4755) builds aMatchKeyfromfile_stem. Its doc comment says "Best-effort by design: a file with a very generic stem (mod,index,util) can attract importers of a same-named file elsewhere". The reply does not mark which rows are stem matches, so an agent cannot tell.Proposal
./and../specifiers against the importer's directory, with extension andindexprobing, before any stem fallback. Use the module map (see #543) for bare and aliased specifiers.match: "stem"and counted separately, so the disclosure lives in the payload.importrefs, so one module-resolution function serves both tools.Acceptance
schemas.tsandexternal.tsimporters are exact.Related: #31, #526 (crate/mod edges for
get_dependencies).Filed from the per-language review on 2026-11-09: 8 agents, one per language plus one for Vue/Svelte/XAML/timeline, run against copies of the pinned corpus repos (
tests/corpus/corpus.toml) using installed build2dcfc615, which differs from master only by XAML/CI commits. The top claim of every issue was spot-checked in the main session. Artifacts live under the review session's scratchpadlang-out/<lang>/and are available on request.Consolidated into #543 during the 2026-11-09 triage. The remaining scope of this issue is tracked there as a checklist item; this report stays as the detailed evidence.