Skip to content

fix(retract): reliably push generated tag batches - #4885

Merged
asim merged 4 commits into
masterfrom
codex/4884-fix-tag-push-batching
Aug 11, 2026
Merged

fix(retract): reliably push generated tag batches#4885
asim merged 4 commits into
masterfrom
codex/4884-fix-tag-push-batching

Conversation

@asim

@asim asim commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • replace Bash array slicing in the tag push loop with explicit numeric indexing
  • avoid treating tag ref strings as arithmetic identifiers during batch construction
  • successfully publish the 11 remaining phantom tags after the original push aborted
  • successfully run retract-tilde.sh --push to publish root tags v1.18.1 and v1.18.2

This is a follow-up on top of #4884.

Testing

  • bash -n retract-phantom.sh
  • ./retract-phantom.sh --dry-run
  • ./retract-tilde.sh --dry-run
  • ./retract-phantom.sh --push
  • ./retract-tilde.sh --push
  • go build ./...
  • go test ./... (fails in existing network-dependent tests because the environment blocks loopback targets; AtlasCloud also returned 400)
  • golangci-lint run ./... (cannot load configuration because installed golangci-lint was built with Go 1.24 while the module targets Go 1.25.12)

Closes #4884

alex-dna-tech and others added 4 commits August 10, 2026 21:54
Empty base buckets emit one blank line from printf; mapfile then reads it
as an empty element, inflating the total and creating bogus one-path
orphan commits. Filter blank lines before dedup.
@asim asim added the codex label Aug 11, 2026
Copilot AI lite review requested due to automatic review settings August 11, 2026 16:40
@asim asim added the codex label Aug 11, 2026
@asim
asim merged commit 0c64f18 into master Aug 11, 2026
13 checks passed

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.

Pull request overview

This PR improves the reliability of publishing “retraction” tags used to clean up phantom module paths on the Go proxy, and adds helper scripts to verify versions and handle the two special-case phantom paths that contain ~ (invalid in git ref names).

Changes:

  • Fix tag pushing in the retraction workflow by batching pushes with explicit numeric indexing and avoiding accidental arithmetic interpretation of refs.
  • Add retract-tilde.sh to publish root retraction tags for the two tilde-containing phantom module paths.
  • Add check-versions.sh to run go list -m -versions across the phantom module path list declared in retract-phantom.sh.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
retract-phantom.sh Updates the tag batching/push logic to reliably publish generated tags in large runs.
retract-tilde.sh Adds a dedicated script to publish root retraction tags for the two ~ phantom paths (invalid submodule tag refs).
check-versions.sh Adds a helper to parse PHANTOM_PATHS from retract-phantom.sh and run go list -m -versions for verification.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread check-versions.sh
Comment on lines +48 to +50
printf '%-70s ' "$path"
go list -m -versions "$path" 2>/dev/null || printf '(no versions found)'
echo
Comment thread retract-tilde.sh
Comment on lines +104 to +113
content="module ${path}

go 1.24

// Phantom path (tilde). The natural retraction tag $(basename "$path")/v1.18.2
// is an invalid git ref name, so this retraction is published as the root tag
// ${tag} instead — which is how this path is already keyed (its versions are
// the repo's v1.x root tags).
retract [v0.0.0, ${RETRACT_MAX}]
"

@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: eba6e76685

ℹ️ 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 retract-tilde.sh
Comment on lines +37 to +38
"go-micro.dev/v4/cmd/protoc-gen-micro~:v1.18.1"
"go-micro.dev/v4~:v1.18.2"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not publish the tilde retractions as root tags

When this script pushes these tags, v1.18.1 and v1.18.2 are unprefixed repository-root releases, not releases of either nested tilde module. Go resolves nested modules using tags prefixed by their repository subdirectory and reads go.mod from that subdirectory, so these tags cannot retract the intended paths; worse, each points to a commit whose root go.mod declares a tilde module, causing consumers resolving the root go-micro.dev module at these versions (including its new latest v1 version) to fail module-path validation.

Useful? React with 👍 / 👎.

Comment thread check-versions.sh
continue
fi
printf '%-70s ' "$path"
go list -m -versions "$path" 2>/dev/null || printf '(no versions found)'

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 Propagate version-query failures

When go list fails because of a proxy outage, authentication problem, unavailable toolchain, or another transient error, redirecting stderr and handling every nonzero status with printf reports (no versions found) and lets the script exit successfully. This makes an operational failure indistinguishable from the result the checker is meant to verify and can falsely certify every path during an outage; preserve the error and return a failing status instead.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants