Skip to content

Keep nested pins whose owner/repo case differs from the lockfile - #260

Merged
nodeselector merged 1 commit into
mainfrom
nodeselector-dependabot-drops-nested-lock-pin
Nov 2, 2026
Merged

nodeselector merged 1 commit into
mainfrom
nodeselector-dependabot-drops-nested-lock-pin

Conversation

@nodeselector

Copy link
Copy Markdown
Collaborator
  • A default run loads the lock's lowercased owner/repo into the resolver cache. When a bumped composite names an unchanged child in mixed case, such as DamianReeves/write-file-action, the cached answer came back under the lowercase name.
  • Parents are matched by the spelling the composite wrote, so the child lost its edge and was pruned as unused. The run exited 0, and only --verify caught it.
  • Cache hits now come back under the spelling the composite wrote, so the entry and its edge are kept.
  • Fixes:

A default run seeds the resolver cache from actions.lock, which stores
owner/repo lowercased. When a bumped composite names an unchanged child
in mixed case, the cache hit came back under the lowercase name, so the
child's key missed its parent edge and the lockfile pruned it as an
orphan. Answer cache hits under the spelling the composite wrote.

Fixes #257
@nodeselector
nodeselector requested a review from a team as a code owner November 2, 2026 18:38
Copilot AI adaptive review requested due to automatic review settings November 2, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change preserving owner/repository casing on resolver cache hits.

No open issues 🎉

What changed in this PR

Fixes #257 by preserving the composite manifest’s owner/repository casing on resolver cache hits, preventing unchanged nested dependencies from losing their parent edges and being pruned.

Changes:

  • Adjusts cached dependency copies to match the requested owner/repository spelling when only casing differs.
  • Adds resolver and CLI regression tests covering child retention, parent edges, and subsequent --verify success.
File Description
internal/​resolve/​discovery.go Preserves requested owner/repository casing on cache hits.
internal/​resolve/​discovery_test.go Checks that lockfile-seeded children retain their spelling and parent edge.
cmd/​gh-actions-lock/​run_test.go Tests a composite bump retaining its mixed-case child and passing verification.

Review effort: Balanced (auto)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dependabot drops an unchanged transitive dependency when bumping a composite action

2 participants