fix: retry atomic snapshot pushes#33
Conversation
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix: retry atomic snapshot pushes This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
|
Landed in Proof: full tests, race tests, vet, and autoreview passed locally. GitHub Linux, Windows, CodeQL, secret scanning, race, and vulnerability gates passed on the merged head. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2656f43d45
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if err := ValidateTag(ctx, opts, tag); err != nil { | ||
| return err | ||
| } | ||
| refs := []string{"HEAD:refs/heads/" + opts.Branch, "refs/tags/" + tag} |
There was a problem hiding this comment.
Ensure snapshot tags point at HEAD before pushing
When callers pass an existing tag that is not at the current commit, both new snapshot push helpers only validate the tag syntax and then include refs/tags/<tag> in the atomic push. Git accepts that refspec, so the remote branch can advance while the snapshot tag still points at an older commit, making tag-based archive reads return the wrong snapshot. Have these helpers create or verify the tag with the existing immutable-tag check before pushing, and ensure the retry path still publishes a tag retargeted to the rebased HEAD.
Useful? React with 👍 / 👎.
Summary
Proof
go test ./...go test -race ./...GOWORK=off go vet ./...