Repository navigation
refactor(release): copy the stable zip where it is published - #79
Conversation
package.sh builds and inspects the zip. Naming a release asset is the publish step's concern, so the sahaj-atlas.zip copy moves to Tag and publish, the only step that ever read it, and package.sh goes back to what it was before #76. CI runs package.sh on every PR, where the copy and the stable_zip output were both no-ops, and cp has no failure worth exercising there. Tag and publish derives the name from $ZIP rather than taking it as a step output, so the two spellings cannot drift. The copy still inherits every check package.sh runs on $ZIP — the top-folder check, the required-file check and the .distignore leak check — because it is made from that same inspected file. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjXPWqoLQXqnqDwh559
|
This draft has had no CI activity for hours and no session holds it. A mention ( 🤖 sydevs dispatcher |
#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
|
Resolved against
Re-verified after the merge: 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
|
Adversarial review skipped: 2 file(s), 20 changed line(s), under 🤖 sydevs dispatcher |
Summary
sahaj-atlas.zipcopy moves to Tag and publish, the only step that read it, andpackage.shreturns to its pre-ci(release): attach sahaj-atlas.zip so the download link never changes #76 state.$ZIPinstead of taking a step output, so the two spellings cannot drift.Change outline
The copy crosses a step boundary.
package.shkeeps every check; it just stops naming a release asset.job: release .github/workflows/release.yml Build the plugin zip package.sh build/src build .github/scripts/package.sh check the four version declarations stage, zip, inspect: top folder, required files, .distignore leak - cp "$OUT/$ZIP" "$OUT/sahaj-atlas.zip" # ran on every PR, where nothing read it - GITHUB_OUTPUT: version= zip= stable_zip= pending= + GITHUB_OUTPUT: version= zip= pending= Tag and publish tag the target, push the tag + STABLE_ZIP="$(dirname "$ZIP")/sahaj-atlas.zip" + cp "$ZIP" "$STABLE_ZIP" gh release upload|create … "$ZIP" "$STABLE_ZIP" # unchanged, still both assetsTest results
pnpm test:all— php lint, measure, the WordPress 6.7 / PHP 7.4 behaviour suite, and the render lane. 0 failures.bash -n .github/scripts/package.sh; ✓release.ymlparses as YAML andbash -npasses on all 4 of itsrun:blocks; ✓grep -rn stable_zip .github/returns nothing; ✓git diff 2306453~1 -- .github/scripts/package.shis empty.build/sahaj-atlas-<version>.zipshapepackage.shemits — derivesbuild/sahaj-atlas.zipand copies it byte for byte. The check was confirmed to fail againstorigin/main's workflow before being kept.Manual verification
cpruns only on a real release, so no lane reaches it.sahaj-atlas-<version>.zipandsahaj-atlas.zip, and that https://github.com/sydevs/SahajAtlasWordpress/releases/latest/download/sahaj-atlas.zip resolves.package.shrun on this PR (ci.ymlrunspackage.sh . build) is the check that the revert did not break the build. It could not be run in this session — see Detail.Notes for reviewer
package.sh; this PR moves that comment torelease.ymlalready carrying fix(docs): correct two false claims #76 shipped about the stable zip #78's corrected text, so the comment is never moved in its superseded wording. Whichever lands second needs one trivial conflict resolution inpackage.sh, where this PR deletes the block fix(docs): correct two false claims #76 shipped about the stable zip #78 edits — the deletion wins.dirnamerather than a literalbuild/:VERSIONis regex-validated toMAJOR.MINOR.PATCH(package.sh:19) before$ZIPis built, and the workflow makes the one callpackage.sh build/src build, sodirname "$ZIP"can only ever yieldbuild. Deriving it keeps the build directory spelled once.$ZIPthe earlier step already inspected — not from a rebuild.cpsits after the tag block, where refactor(release): copy the stable zip where it is published #77's Approach puts it. Two review lenses independently suggested moving it above theif ! git rev-parseblock instead, so a failedcpcould not leave a pushed tag with no release. I left it where the ticket specifies, and flag it for your call: the tag-before-publish window already exists for thegh release uploaditself, it is self-healing (the next push to main re-enters the release path and reuses the tag atrelease.yml:69-70, and the update checker ignores an assetless tag), and acpof a file built and verified moments earlier in the same job is about the least likely step to fail. Moving the two lines up is one commit if you prefer it.ASSETS=$(gh release view … || true)swallows a transient API failure. Recorded in refactor(release): copy the stable zip where it is published #77's Notes, below the reporting bar, and deliberately untouched here.AGENTS.md:272-274is stale on two details — it omitsreadme.txtas a publisher of the link, and claims in the present tense that SahajCloud's Install tab gives it viaWORDPRESS_PLUGIN_ZIP_URL, which a grep of the current SahajCloud checkout does not find. fix(docs): correct two false claims #76 shipped about the stable zip #78 already fixes both, in the same direction as this PR's comment wording, so this branch deliberately does not touchAGENTS.md— editing it here would manufacture a second conflict with fix(docs): correct two false claims #76 shipped about the stable zip #78 where there is currently none.pnpm lint,testandtest:rendernever look at release assets, andci.ymlruns onlypackage.sh's checks. The sole guard is the plan step's absent-asset backfill, which is itself only exercised onmain. Unchanged by this PR and mitigated by that backfill, so I have not filed a ticket — say the word if you want one.comment-lint.mjsmatched no files: its extension filter is JS/TS only, so it does not read.shor.yml. The moved comment carries⚠and a#NNNbreadcrumb, which the code-comments rule protects.rm -rfno longer deletes a stalebuild/sahaj-atlas.zip. Dismissed — acceptance criterion 1 requirespackage.shto be byte-identical to its pre-ci(release): attach sahaj-atlas.zip so the download link never changes #76 state, so the line cannot be kept; and nothing reads that path. Every inspection inpackage.shreads the versioned name only, thecpoverwrites unconditionally, CI and the release job run on fresh runners, andbuild/is in.distignoreso a leftover cannot reach a staged copy. The only trace is a stale file in a localbuild/after a pre-ci(release): attach sahaj-atlas.zip so the download link never changes #76 checkout.Detail
Why the revert is byte-exact.
package.shwas restored withgit checkout 2306453~1 -- .github/scripts/package.shrather than by hand-deleting the four items, so acceptance criterion 1 holds by construction rather than by inspection.rsyncis absent from the routine container, sopackage.shcould not be run end to end here — it fails at line 61 before zipping. The two moved lines were therefore exercised directly against thezip=$OUT/$ZIPshapepackage.shwrites toGITHUB_OUTPUT, with theOUTargument read from the workflow's ownpackage.sh build/src buildcall rather than assumed. CI runs the real thing on this PR.The ⚠ comment's factual claims were re-verified against the tree, not carried over on trust:
README.md:30andreadme.txt:52both send volunteers toreleases/latest/download/sahaj-atlas.zip, andincludes/updates.php:64filters assets with/^sahaj-atlas.*\.zip$/i, which matches both names.The backfill step is deliberately left alone. "Attach sahaj-atlas.zip to a release made without it" derives its own copy from a downloaded published asset, so it shares no input with the publish step's copy of a freshly built file. The two can never both run:
backfillis set only inside the branch that also setsskip=true, and the publish step is gated onskip != 'true'.Provenance is preserved. The copy's position relative to the checks has not moved: the old
cpalso sat at the end ofpackage.sh, after the top-folder, required-file, POT-count,.po/.moand.distignoreleak checks. Nothing writes tobuild/between the build step and the copy — the only commands ahead of it in Tag and publish aregit rev-parse,git tagandgit push, none of which touch the working tree.Reviewed for this push:
/simplify's four lenses (reuse, simplification, efficiency, altitude),/code-review high, and/security-review— the last required becausesecurityReview.triggerPatternmatches both changed paths. No security finding at reportable confidence: the workflow triggers only onpushtomain,pushofv*tags andworkflow_dispatch, so no untrusted input reaches it, andVERSION'shead -1 | tr -d '[:space:]'plus the^[0-9]+\.[0-9]+\.[0-9]+$gate foreclose both path traversal and aGITHUB_OUTPUTline injection.Spelling count unchanged.
sahaj-atlas.zipappears the same number of times after this diff as before — it moved rather than multiplied, and went from spread across two files to one. A workflow-levelenv:holding the name was considered and rejected: the literal is a URL contract that must never change, and hoisting it would make it ungreppable fromREADME.mdandreadme.txt.Closes #77
Generated by Claude Code