Skip to content

fix: retry atomic snapshot pushes#33

Merged
steipete merged 1 commit into
mainfrom
codex/atomic-snapshot-push
Jun 19, 2026
Merged

fix: retry atomic snapshot pushes#33
steipete merged 1 commit into
mainfrom
codex/atomic-snapshot-push

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Summary

  • atomically push snapshot branches and tags with non-fast-forward recovery
  • rebase local commits and retarget unpublished tags before one retry
  • preserve legacy current-branch backup repositories
  • reject refspec syntax in caller-provided tag names

Proof

  • go test ./...
  • go test -race ./...
  • GOWORK=off go vet ./...
  • autoreview clean

@clawsweeper

clawsweeper Bot commented Jun 19, 2026

Copy link
Copy Markdown

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.

@steipete
steipete merged commit ca6cd66 into main Jun 19, 2026
6 checks passed
@steipete
steipete deleted the codex/atomic-snapshot-push branch June 19, 2026 11:39
@steipete

Copy link
Copy Markdown
Contributor Author

Landed in ca6cd668be8be7a2fb536f46796fc655c6dc00a5.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 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".

Comment thread mirror/history.go
if err := ValidateTag(ctx, opts, tag); err != nil {
return err
}
refs := []string{"HEAD:refs/heads/" + opts.Branch, "refs/tags/" + tag}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant