Repository navigation
Imports never resolve to config/data/prose files (Fixes #4943) - #4947
Merged
Merged
Conversation
CI workflows became scanned files (#4928), so `.github/workflows/dart.yml` entered the name index and a Dart `dart` token drew 5 false edges (graph-accuracy-audit, dart-lang/http). _resolve_target now refuses a yaml/json/markdown/plaintext/csv/pbtxt target unless the token spells that file's own extension. The same guard drops Go `import "unsafe"` -> ansible unsafe.yml from the golden corpus. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 12, 2026 03:20
squid-protocol
enabled auto-merge (squash)
October 12, 2026 03:20
Contributor
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.
Fixes #4943.
Cause: #4928 made CI workflow YAML scanned, so
.github/workflows/dart.ymlentered the resolver's name index; a baredarttoken (stem search) in dart-lang/http drew 5 false edges. Reproduced with a 3-file fixture in_resolve_edges.Fix:
NetworkRiskSensor._resolve_targetnow wraps the existing resolver and refuses a target whose language is yaml/json/markdown/plaintext/csv/pbtxt unless the token spells that file's own extension (require("./data.json")still works). Workflows are still scanned.Class: import resolution to a non-importable target, any importer language (name stem, Stage 1-3, path resolvers all go through the wrapper). Decoy tests cover yaml/json/md/txt/csv decoys for dart, python, go, ruby, java, plus positive cases.
Evidence:
import_graph_accuracy.py --ciall 20 languages OK, dart 100.0%/100.0% (FP 0).pr_gates --fast5/5,--ratchets7/7. Decoy test fails 8/11 without the fix.Golden bless (both legs): only Go files drift:
import "unsafe"was resolving toyaml/ansible/.../unsafe.yml(same false-edge class); that edge is gone from go/core/*.go and go_runtime_rand/rand.go, plus derived graph/popularity/fingerprint values.Cross-repo: none.
🤖 Generated with Claude Code