Skip to content

feat(wordpress): assert release ZIP internal version matches the release before upload#1297

Merged
chubes4 merged 1 commit into
mainfrom
release-zip-version-guard
Jun 12, 2026
Merged

feat(wordpress): assert release ZIP internal version matches the release before upload#1297
chubes4 merged 1 commit into
mainfrom
release-zip-version-guard

Conversation

@chubes4

@chubes4 chubes4 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • New wordpress/scripts/release/verify-artifact-version.sh: opens the packaged ZIP, reads the plugin main-file Version: header (theme style.css fallback), fails on mismatch or missing header
  • package.sh: verifies the freshly built artifact against the release payload version (HOMEBOY_SETTINGS_JSON.release.version; falls back to the on-disk header for standalone dry-runs)
  • publish.sh: verifies the artifact against the release tag immediately before gh release upload — the last stop before a ZIP becomes the asset that homeboy deploy consumes
  • Smoke test tests/wordpress-release-artifact-version-smoke.sh: plugin match/mismatch, theme fallback match/mismatch, missing-header rejection, missing-artifact rejection

Why

Closes #1296. The data-machine-socials v0.14.0 release shipped a v0.8.1 zip as its GitHub release asset (a stale git-tracked blob restored by git checkout -- during release recovery — Extra-Chill/data-machine-socials#169), and production silently ran rolled-back code for 6 days. Nothing in the pipeline ever opened the zip. Either chokepoint added here would have caught it.

Verification

  • Smoke test passes; bash -n clean on both edited scripts
  • Tested against the real incident artifacts:
    • stale 0.8.1 zip vs expected 0.14.0 → Error: artifact … contains version 0.8.1 but the release expects 0.14.0 — refusing to ship a stale artifact
    • corrected 0.14.0 zip vs expected 0.14.0 → passes ✓

Defense-in-depth picture

Layer Guard Where
Repo untrack build/*.zip Extra-Chill/data-machine-socials#170
Release this PR package.sh + publish.sh
Deploy read-back verification Extra-Chill/homeboy#4138

…ase before upload

Adds verify-artifact-version.sh, a guard that opens the packaged ZIP,
reads the plugin main-file (or theme style.css) Version header, and
fails when it does not equal the version the release is shipping.

Wired into both release chokepoints:
- package.sh verifies the freshly built artifact against the release
  payload version (falls back to the on-disk header for standalone
  dry-runs)
- publish.sh verifies the artifact against the release tag immediately
  before 'gh release upload' — the last stop before a ZIP becomes the
  asset that homeboy deploy consumes

Motivation: the data-machine-socials v0.14.0 release shipped a v0.8.1
zip as its GitHub release asset (a stale git-tracked blob restored
during release recovery), and production silently ran rolled-back code
for 6 days because nothing in the pipeline ever opened the zip. Either
chokepoint would have caught it.

Includes a smoke test covering plugin match/mismatch, theme fallback
match/mismatch, missing-header rejection, and missing-artifact
rejection. Verified against the real incident artifact: the stale
0.8.1 zip is rejected for an 0.14.0 release; the corrected zip passes.

Closes #1296
@chubes4 chubes4 merged commit f2a72dd into main Jun 12, 2026
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.

wordpress release pipeline: assert packaged ZIP internal version matches the release tag before upload

1 participant