From c012a70e40309f1222025409627ee051e145c1bc Mon Sep 17 00:00:00 2001
From: TheAbider <51920546+TheAbider@users.noreply.github.com>
Date: Wed, 29 Jul 2026 21:41:08 -0700
Subject: [PATCH] Stop deleting GitHub releases
A retention step deleted every older patch release within a minor so only
the newest survived. Package registries pin the release asset URL for their
own version and keep approved versions forever, so this broke installs
permanently.
The approved Chocolatey package rackstack 1.99.0 downloads
.../releases/download/v1.99.0/RackStack.exe via Get-ChocolateyWebFile.
Retention deleted that release when v1.99.1 shipped on 2026-05-21, so
`choco install rackstack` has returned 404 for roughly two months. It cannot
be repaired: no archived EXE exists and ps2exe is not reproducible, so the
published checksum can never be satisfied again. The remedy is getting a
current version approved.
The same step also broke moderation in progress - v1.122.2 failed automated
validation with "unable to find a package" because v1.122.3 published while
v1.122.2 was still queued, deleting the release out from under the reviewer.
dist/winget/README.md already documented the hazard for winget, filed as a
temporary annoyance rather than the permanent breakage it turned out to be.
Release assets on a public repo do not count against the Actions artifact
storage quota, so nothing was being saved by deleting them.
- Remove the retention step, with the incidents recorded inline so it is not
re-added as a cleanup
- Add Run-Tests section 206, failing the suite if any workflow calls
`gh release delete` or `--cleanup-tag`. Verified by appending a deletion
line to ci.yml and confirming the suite goes red.
- Rewrite the winget README section to describe the permanent hazard
---
.github/workflows/ci.yml | 58 ++++++++++++++--------------------------
README.md | 2 +-
Tests/Run-Tests.ps1 | 47 ++++++++++++++++++++++++++++++++
dist/winget/README.md | 23 +++++++++-------
4 files changed, 82 insertions(+), 48 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index be0482f..b9b0232 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -538,41 +538,23 @@ jobs:
Pop-Location
exit 0
- - name: Apply retention rule (only latest z in minor survives)
- if: steps.vercheck.outputs.bumped == 'true' && steps.releasecheck.outputs.exists == 'false'
- env:
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- $ver = '${{ steps.vercheck.outputs.version }}'
- $vParts = $ver -split '\.'
- if ($vParts.Length -ne 3) {
- Write-Host "Unexpected version format '$ver' — skipping retention cleanup"
- exit 0
- }
- $thisMinor = "$($vParts[0]).$($vParts[1])" # e.g. "1.98"
- # Enumerate ALL existing releases (not just immediate prev) so we correctly
- # collapse the 1.98.x lineup down to just v1.98.8 even if v1.98.7 was missed
- # and v1.98.6 is still the latest existing release. End-state: only the new
- # `$ver` release exists in this minor.
- $allReleases = gh release list --json tagName --limit 200 | ConvertFrom-Json
- $global:LASTEXITCODE = 0
- $toDelete = @()
- foreach ($r in $allReleases) {
- $tag = $r.tagName
- $tagVer = $tag -replace '^v', ''
- $tagParts = $tagVer -split '\.'
- if ($tagParts.Length -eq 3 -and "$($tagParts[0]).$($tagParts[1])" -eq $thisMinor -and $tagVer -ne $ver) {
- $toDelete += $tag
- }
- }
- if ($toDelete.Count -eq 0) {
- Write-Host "Retention: no older releases in minor $thisMinor — nothing to delete"
- } else {
- Write-Host "Retention: deleting $($toDelete.Count) older $thisMinor.x release(s) so only v$ver survives"
- foreach ($tag in $toDelete) {
- Write-Host " -> gh release delete $tag --cleanup-tag"
- gh release delete $tag --yes --cleanup-tag 2>$null
- $global:LASTEXITCODE = 0
- }
- }
- exit 0
+ # NO RELEASE RETENTION / DELETION STEP — deliberately removed, do not re-add.
+ #
+ # A retention step used to delete every older patch release within the same minor so
+ # that only the newest survived. That silently broke the package managers, because a
+ # published package manifest pins the release asset URL for its own version and those
+ # registries keep approved versions forever:
+ #
+ # - Chocolatey: the approved rackstack 1.99.0 package downloads
+ # .../releases/download/v1.99.0/RackStack.exe via Get-ChocolateyWebFile. Retention
+ # deleted that release when v1.99.1 shipped, so `choco install rackstack` returned
+ # 404 for roughly two months before anyone noticed (found 2026-07-29).
+ # - Chocolatey moderation: v1.122.2 failed automated validation with "unable to find
+ # a package" because v1.122.3 published while v1.122.2 was still in the review
+ # queue, and retention deleted the release out from under the moderator.
+ # - winget: the same hazard was already documented in dist/winget/README.md.
+ #
+ # GitHub release assets on a public repo do not count against the Actions artifact
+ # storage quota, so there is no storage argument for deleting them. If disk hygiene
+ # ever matters, prune Actions *artifacts* — never releases that a published package
+ # points at. Run-Tests section 206 asserts this workflow contains no release deletion.
diff --git a/README.md b/README.md
index c443cae..6223721 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@
-
+