Skip to content

Imports never resolve to config/data/prose files (Fixes #4943) - #4947

Merged
squid-protocol merged 1 commit into
mainfrom
churn/4943-non-importable-targets
Oct 12, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/4943-non-importable-targets

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #4943.

Cause: #4928 made CI workflow YAML scanned, so .github/workflows/dart.yml entered the resolver's name index; a bare dart token (stem search) in dart-lang/http drew 5 false edges. Reproduced with a 3-file fixture in _resolve_edges.

Fix: NetworkRiskSensor._resolve_target now 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 --ci all 20 languages OK, dart 100.0%/100.0% (FP 0). pr_gates --fast 5/5, --ratchets 7/7. Decoy test fails 8/11 without the fix.

Golden bless (both legs): only Go files drift: import "unsafe" was resolving to yaml/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

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]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 12, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 12, 2026 03:20
@squid-protocol
squid-protocol enabled auto-merge (squash) October 12, 2026 03:20
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 291886b into main Oct 12, 2026
34 checks passed
@squid-protocol
squid-protocol deleted the churn/4943-non-importable-targets branch October 12, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

graph-accuracy-audit red on main: Dart imports resolve to .github/workflows/dart.yml (5 FP edges)

1 participant