Repository navigation
fix(docker): report each image tag instead of the first - #593
Merged
Merged
Conversation
vibgrate-team
force-pushed
the
cursor/fix-docker-image-tag-dedupe-8e29
branch
from
November 4, 2026 13:28
77e15f2 to
c9ce37c
Compare
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
scanDockerdeduplicated images by name and kept only the first tag. A Dockerfile that pinsgolang:1.21in a builder stage andgolang:1.23in a test stage, or a Compose file with services onpostgres:13andpostgres:16, produced one row. The other pin never appeared, so its drift was missing from the scan.Rows are now unique on name and tag. They are sorted by name, then tag, so order does not follow the file and stays the same across runs. The registry version lookup still runs once per image name; each row computes its own drift from that shared latest version.
parseDockerfileis unchanged.Tests
test/docker-image-tags.test.tscovers:minor-behindvscurrent,major-behindvscurrent)name:tagused twice produces one rowimage:lines, with and without a file cachepnpm test,pnpm lint, andpnpm typecheckpass.Related issues
Closes #579
Checklist
pnpm testpassespnpm lintis cleanpnpm typecheckis cleangraph.json/ report output (content-hashed IDs, stable sorts; no time, randomness, or filesystem-order dependence)git commit -s, DCO)Notes for reviewers
Dedup and row building in
scanDockerare the only scanner changes. The registry lookup list is the sorted unique image names, not one entry per tag.