fix(detector): anchor nodes on 5 remaining detectors#140
Merged
Conversation
Five remaining detectors emitted file-path → external-name edges without anchor CodeNodes; Snapshot's phantom filter dropped every edge. Apply base.EnsureFileAnchor + base.EnsureExternalAnchor (the pattern from Phase 4 TS/Python/Rust/C++). Detectors updated: - iac/bicep.go — 1 anchor pair (module depends_on) - iac/dockerfile.go — 1 anchor pair (FROM depends_on) - script/shell/bash.go — 2 anchor pairs (source imports + tool calls) - script/shell/powershell.go — 1 anchor pair (Import-Module + dot-source) - proto/structure.go — 1 anchor pair (proto import) Each gets a survives-snapshot test asserting MODULE + EXTERNAL anchor nodes and the relevant edge kind are present in the detector result. Smoke: fixture-multi-lang phantom drop count = 4 (unchanged; fixture contains no bicep/dockerfile/shell/proto files, so these detectors don't fire on it — drop count reflects pre-existing Java/Python/TS phantom edges not in scope for this fix). Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
Per-detector changes
iac/bicep.go— 1 anchor pair on moduledepends_onedgeiac/dockerfile.go— 1 anchor pair on FROMdepends_onedgescript/shell/bash.go— 2 anchor pairs:sourceimports + toolcallsscript/shell/powershell.go— 1 anchor pair onImport-Module/ dot-sourceimportsproto/structure.go— 1 anchor pair on protoimportedgeTest plan
go test ./internal/detector/iac/... -count=1passes (14 tests)go test ./internal/detector/script/... ./internal/detector/proto/... -count=1passes (10 tests)go test ./internal/detector/... -count=1passes (377 tests)go test ./... -count=1passes (833 tests)🤖 Generated with Claude Code