/simplify follow-up: release.yml + build-pkg.sh quality polish (bundle with #6 fix) #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Origin
2026-05-10 session-end
/simplifypass on the apostrofs PR #4 + #5 diff surfaced four small quality findings inrelease.ymlandbuild-pkg.sh. None are critical (no real bugs), all are inside files thatlatvian-apostrofs#6will rewrite when the GITHUB_TOKEN scope issue is resolved. Bundling here so whoever picks up #6 fixes them in the same touch instead of a separate roundtrip.Findings
release.ymlset -euo pipefailonly on theCreate Forgejo releasestep (line 46). TheResolve version from tag,Build PKG,Compute SHA256, andPrint Homebrew Cask bump commandsteps lack it. Forgejo Actions defaultsbashto-eforrun:blocks but not-uorpipefail. Concrete failure mode:PKG_SHA=$(shasum -a 256 "${PKG}" | cut -d' ' -f1)would silently produce empty output ifshasumerrored (cut still exits 0). Fix: addset -euo pipefailto everyrun:block.Redundant SHA256 computation (lines 29-36).
build-pkg.shalready printsSHA256: <hash>at line 163; the separateCompute SHA256step re-runsshasum -a 256over the entire PKG just to capture into$GITHUB_OUTPUT. Sub-second on a small PKG, but it's a true no-op duplication. Fix: havebuild-pkg.shwrite to$GITHUB_OUTPUTdirectly whenGITHUB_OUTPUTis set:[[ -n "${GITHUB_OUTPUT:-}" ]] && echo "pkg_sha=${PKG_SHA}" >> "$GITHUB_OUTPUT". Then drop the separate step. Net: one less shasum pass, one less workflow step.Heredoc delimiter is fragile to a one-character edit (lines 103-116).
cat <<MANUAL_STEPis unquoted, so${VERSION}and${PKG_SHA}expand correctly. If a future maintainer ever quotes the delimiter as<<'MANUAL_STEP', the literal${VERSION}text will print instead. Not broken, just brittle. Cosmetic — defer or skip.build-pkg.shpkgutil --check-signatureon unsigned PKG is guaranteed dead code (line ~161). PKG has no--signflag.pkgutil --check-signaturealways exits non-zero on unsigned content; the2>&1 | head -5 || trueswallows everything. Either remove the line entirely (no signing planned), or replace with# TODO(#NN): sign with Developer ID — see <ticket>and drop the|| trueso the verify step actually fails when signing breaks.VERSION="${VERSION:-0.0.0-dev}"fallback creates poison pkgutil receipts (lines 15+28). If a developer runsbash build-pkg.shlocally withoutVERSION=set, the produced PKG installs at version0.0.0-devand registerslv.kapteinis.latvian-apostrofsat that version system-wide. A subsequentbrew install --cask apostrofsmay then trip Cask's "already installed by other means" detection. Fix: refuse to build without explicitVERSION=unlessALLOW_DEV_VERSION=1is set, OR change the dev fallback string to something that won't cause confusion inpkgutil --pkg-infooutput.Acceptance
When #6 is closed, the touched-anyway diff should also pick up findings 1, 2, 4, 5. Finding 3 is cosmetic — defer.
Won't-fix from /simplify
uninstall.sh+ Rubyapostrofs.rbuninstall_preflight) — correct as-is per agent review; both files are <40 lines, two distribution paths, identical magic string + comment.'Latvian (apostrofs)'grep/include match — theoretical false-match only; tightening adds future-fragility against macOSdefaultsformat changes.Closed — fixed end-to-end on 2026-05-10
Findings 1, 2, 4, 5 applied (finding 3 deferred per ticket as cosmetic). Validated end-to-end via
v2026.05.2tag-push:shasum -a 256of the downloaded asset (a7ac7ba0dd107f3df58eecb7b8dc53269490c29b66cf401b82c634cd2a267f29).homebrew-pareizrakstiba@1664657).Local-dev refusal verified:
Escape hatch verified:
ALLOW_DEV_VERSION=1 bash build-pkg.shproceeds withVersion: 0.0.0-dev.Commit:
5a52fbe(release.yml + build-pkg.sh, +21/-12).Finding 3 (heredoc delimiter cosmetic) deferred per the original ticket's acceptance — current
cat <<MANUAL_STEP(unquoted) is correct for the variable expansion that step requires; quoting the delimiter would silently break it, but that's a future-foot-gun, not a current bug. No action.