Skip to content

fix(release): keep draft release tags intact on recovery and retry latest propagation - #167

Open
dcolthorp wants to merge 1 commit into
mainfrom
fix/release-advertise-recovery
Open

dcolthorp wants to merge 1 commit into
mainfrom
fix/release-advertise-recovery

Conversation

@dcolthorp

Copy link
Copy Markdown
Member

Trying to upgrade a repository to v0.54.0 in Rhizome Desktop failed with HTTP 404 because the v0.54.0 Release run (44765387550) got stuck during advertisement and left v0.54.0 unpublished as an untagged- draft.

On the first attempt, post-promotion verification checked /releases/latest/download/latest.json immediately after PATCH make_latest=true with no retries for GitHub's eventual consistency, rolled the release back to draft, and hid the underlying error message. On the second attempt, resuming from phase: "recovered" re-ran recover() and sent PATCH {"draft": true, "make_latest": "false"} without tag_name, causing GitHub to rewrite the draft's tag_name to untagged-072ac595e1bcffa8331c, which the publisher then rejected.

This fix makes release advertisement and recovery handle both issues:

  • Always include tag_name in draft-recovery and publish PATCH calls, skip redundant recovery when a recovered receipt already matches remote state, and accept receipt-pinned untagged-<hex> drafts (with complete verified assets) in both ci_release_publish.py and release_advertise.py without creating duplicate drafts or re-uploading.
  • Retry transient HTTP errors and stale latest API/feed propagation within a bounded backoff budget while still aborting immediately on unrelated concurrent latest changes.
  • Include the safe failure detail in AdvertisementError messages so CI logs show why advertisement failed.

Proved with focused unit tests reproducing propagation lag, untagged- draft recovery, pre-desktop predecessor recovery, concurrent latest interruption, and missing-asset rejection (release_advertise_test.py 24/24 pass, ci_release_publish_test.py 26/26 pass, scripts/secrets/check.py clean, greptile review --json 5/5 with 0 comments).

Reviewed with sol-loop: 3 rounds with gpt-6.2-sol on high. Sol verdict: approved

Created with Gemini 4 Neon in T3 Code.

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

Greptile CLI Reused the Greptile CLI review of 1c4e39d by a teammate. The code matches this PR, so no new review ran.

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds recovery for receipt-pinned drafts whose tag GitHub changed to untagged-<hex>.

  • Release checks wait and retry when GitHub’s public views lag.
  • A recovered release draft can resume with its intended tag.

No actionable issues were found. This review checked source code; it did not run tests.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Verify bundle and saved receipt] --> B[Find release by tag or saved ID]
  B --> C[Check source, notes, and assets]
  C --> D[Publish with approved tag]
  D --> E[Check public downloads with bounded retries]
  E --> F[Promote release]
  F --> G[Check latest feed with bounded retries]
  G -->|Pass| H[Update Homebrew]
  G -->|Fail| I[Return release to draft and restore previous latest]
Loading

Reviews (1) · Last reviewed commit: "fix(release): preserve release tag on re..." · Reviewed by Greptile

@dcolthorp
dcolthorp force-pushed the fix/release-advertise-recovery branch from 1c4e39d to 688863a Compare November 24, 2026 13:04

This branch has not been deployed

No deployments
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