Skip to content

fix(release): the installer stops deleting installs it did not create, and the gates stop trusting their own premises - #596

Merged
rainmanjam merged 1 commit into
mainfrom
fix/release-path
Aug 27, 2026
Merged

fix(release): the installer stops deleting installs it did not create, and the gates stop trusting their own premises#596
rainmanjam merged 1 commit into
mainfrom
fix/release-path

Conversation

@rainmanjam

Copy link
Copy Markdown
Owner

Closes #529 #530 #531 #532 #552 #554 #555 #556 #558 #559 #560 #583 #584 #585 #586 #587 #588, and the second half of #553.

The one that destroyed data — #532

A failed re-run of install.sh over a healthy docker install ran compose down and rm -rf $INSTALL_DIR, taking docker-compose.yml, uninstall.sh, and every backup-*.tar.gz — announced as [info] removed /opt/polyemesis, the quietest possible line for the most damaging action in the file.

mkdir -p succeeds on a directory that already exists, so DIRS_CREATED=true recorded "I made this" for one it had merely opened.

The fix already existed in the same file. The CONFIG_DIR path guards with [ -d ... ] || and carries a comment explaining this exact failure — it had simply been applied to one path and not the other. Every mkdir site is now guarded, the rm -rf is gated on it, and the else branch says it left the directory alone rather than staying silent.

Sweeping for the same shape found it a third time, unreported: rollback deleted the binary and systemd unit of a working install it had only replaced.

The gate that trusted its own premise — #529

changelog-gate exits 0 on any non-tag ref, and its comment explains why that's safe: "Nothing here would be published either way." That premise is false. workflow_dispatch takes a dry_run boolean; with it false, images overwrites :latest, :cuda and :vaapi on Docker Hub and GHCR — which install.sh pins every docker operator to.

The gate now refuses when PUBLISH=true and the ref is not a tag. Control, not warning. And #530: the date is compared to today rather than merely being present, so a heading dated last week cannot publish.

Not real — #553

Get-PublishingFfmpeg already returns an explicit object on main. The reviewer read the function's comment block — which narrates two historical pipeline failures — as current behaviour, and a stale KNOWN GAP warning in ci.yml agreed with them. That warning is now a real assertion, so the next reader is told the truth by a test rather than by prose. The issue's other half was real and is fixed: ending a broadcast and skipping the confirmation were the same keystroke.

Honesty note

One new test initially passed under its own mutation — it asserted a non-zero exit that install.sh's non-root check produced anyway. It now asserts the message.

Verification

scripts/test-release-gates.sh — 29 new cases, reading the step bodies out of release.yml so the gates are tested rather than described. acceptance-install.sh 63 → 89 passed. All workflow YAML parses; install.sh parses.

Out of assignment: #580, #581, #582 (internal/db/**) and #584's docs half. #582 is worth doing while v0.6.0 is still the previous release.

https://claude.ai/code/session_01A8N3W5ct9SZtHK9sCDD9cL

…, and the gates stop trusting their own premises

Closes #529 #530 #531 #532 #552 #554 #555 #556 #558 #559 #560 #583 #584 #585
#586 #587 #588, and the second half of #553.

THE ONE THAT DESTROYED DATA. A failed re-run of install.sh over a healthy docker
install ran `compose down` and `rm -rf $INSTALL_DIR`, taking docker-compose.yml,
uninstall.sh and every backup-*.tar.gz update.sh had written there -- announced
as `[info] removed /opt/polyemesis`, the quietest possible line for the most
damaging action in the file. `mkdir -p` succeeds on a directory that already
exists, so DIRS_CREATED=true recorded "I made this" for one it had merely
opened.

The fix already existed in the same file: the CONFIG_DIR path guards with
`[ -d ... ] ||` and carries a comment explaining this exact failure. It had been
applied to one of the paths. Now every mkdir site is guarded, the rm -rf is
gated on it, and the else branch SAYS it left the directory alone rather than
staying silent.

Sweeping for the same shape found it a third time, unreported: rollback deleted
the binary and systemd unit of a working install it had only replaced.

THE GATE THAT TRUSTED ITS OWN PREMISE. changelog-gate exits 0 on any non-tag
ref, and its comment explains why that is safe: "Nothing here would be published
either way". That premise is false -- workflow_dispatch takes a dry_run boolean,
and with it false the images job overwrites :latest, :cuda and :vaapi on Docker
Hub and GHCR, which install.sh pins every docker operator to. The gate now
refuses when PUBLISH is true and the ref is not a tag. Control, not warning.

And the date it checks is now compared to today rather than merely being
present, so a heading dated last week cannot publish.

NOT REAL -- #553. Get-PublishingFfmpeg already returns an explicit object on
main. The reviewer read the function's comment block, which NARRATES two
historical pipeline failures, as a description of current behaviour -- and a
stale KNOWN GAP warning in ci.yml agreed with them. That warning is now a real
assertion, so the next reader is told the truth by a test rather than by prose.
The issue's other half was real: ending a broadcast and skipping the
confirmation were the same keystroke.

One of the new tests initially passed under its own mutation: it asserted a
non-zero exit that install.sh's non-root check produced anyway. It now asserts
the message.

New: scripts/test-release-gates.sh, 29 cases, reading the step bodies out of
release.yml so the gates are tested rather than described. acceptance-install
63 -> 89.

Claude-Session: https://claude.ai/code/session_01A8N3W5ct9SZtHK9sCDD9cL
Copilot AI lite review requested due to automatic review settings August 26, 2026 21:15

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sonarqubecloud

Copy link
Copy Markdown

@rainmanjam
rainmanjam merged commit 07213b0 into main Aug 27, 2026
38 of 39 checks passed
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.

release: A workflow_dispatch with dry_run: false publishes to the world with the CHANGELOG gate switched off

2 participants