Skip to content

ci(nightly): verify the checksum where it was written, and stage + verify in dry runs - #148

Merged
GLinnik21 merged 1 commit into
mainfrom
fix/nightly-publish-checksum
Sep 19, 2026
Merged

GLinnik21 merged 1 commit into
mainfrom
fix/nightly-publish-checksum

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

What failed

The first real nightly (run 35433759179) failed in "publish nightly prerelease":

sha256sum: plxnative-v0.7.0-nightly-20260919.ipk: No such file or directory
...FAILED open or read

Cause

The stage step (Stage nightly assets) writes dist/nightly.sha256 from inside dist/:

( cd dist && sha256sum "$ipk" > nightly.sha256 )

so the checksum file lists the bare plxnative-v...ipk filename by design (this is what
lets a user run sha256sum -c next to the file they downloaded). But the publish step ran
sha256sum -c dist/nightly.sha256 from the repo root, where the bare name in the
checksum file can't resolve to a real path.

Fix

  • Verify from inside dist/, the same shape ci/verify-published.sh already uses beside a
    downloaded release asset: ( cd dist && sha256sum -c nightly.sha256 ).
  • Checked every other use of dist/nightly.sha256 in the file (notes rendering and the
    post-publish download verification) — both use cut -d' ' -f1 dist/nightly.sha256 to pull
    just the hash, so those were already fine.
  • Mirrored release.yml, which sidesteps the whole class of bug differently: it never runs
    sha256sum -c on pkg/ipk.sha256 itself, it only extracts the hash with cut for the
    release notes; the actual "does the checksum file verify beside the artifact" check lives
    in ci/verify-published.sh, run after publish, cd'd into the download directory first.

Why no dry run caught this

dry_run: true (and every pull_request event) used to skip the entire publish job,
so the staging step's bug was never exercised before a real nightly hit it. This PR also
fixes that mechanism: publish now runs whenever plan isn't skipped, dry or not. Only the
steps that actually mutate the repo's releases are individually gated on needs.plan.outputs.dry:

  • the immutable-tag guard (Refuse to overwrite an immutable nightly)
  • tagging + gh release create
  • the post-publish download/verify

Staging, rendering the notes (ci/nightly.py notes), and the new standalone
Verify the staged checksum step all run in a dry pass now. Fork PRs remain fully skipped
(via plan's own if:, which auto-skips every job that needs: plan), and no
write-token operation runs in a dry pass — only the gated steps above use GH_TOKEN for
anything beyond the read the download-artifact action needs.

This PR's own nightly dry run (as a same-repo pull_request touching .github/workflows/nightly.yml)
now exercises staging + the checksum verification, so this exact regression would have failed
this PR's own checks instead of the first real nightly.

Verification

  • python3 ci/nightly.py --selftest — passes (32/32)
  • actionlint .github/workflows/nightly.yml — clean

🤖 Generated with Claude Code

…rify in dry runs

The first real nightly (run 35433759179) failed in "publish nightly
prerelease": `sha256sum: plxnative-v0.7.0-nightly-20260919.ipk: No such
file or directory`. The staging step writes `dist/nightly.sha256` from
inside `dist/` so the file lists the bare filename, but the publish step
ran `sha256sum -c dist/nightly.sha256` from the repo root, where the bare
name in the checksum file doesn't resolve. Verify it from inside `dist/`
instead, the same shape `ci/verify-published.sh` already uses beside a
downloaded release asset.

No dry run caught this because `dry_run` (and every `pull_request`) used
to skip the whole publish job. Split it instead: the job now always runs
when not skipped, with only the network-mutating steps (the immutable-tag
guard, tagging + `gh release create`, and the post-publish
download/verify) individually gated on `dry`. Staging, note rendering and
the local checksum verification now run in every dry pass too, so this
class of bug gets caught by the PR that introduces it.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 19, 2026 09:21

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.

@GLinnik21
GLinnik21 merged commit e026a3f into main Sep 19, 2026
7 checks passed
@GLinnik21
GLinnik21 deleted the fix/nightly-publish-checksum branch September 19, 2026 09:32
GLinnik21 added a commit that referenced this pull request Sep 19, 2026
nightly.yml (landed in #140/#148) replaced canary.yml as the pipeline that
proves the shared build-package.yml publishing path end to end, with a real
flavour and a retention policy canary never had. Delete the now-unused
canary.yml and update every live comment/error string that named it, so
build-package.yml's reused inputs (source-asset, caches, fwcompat) and its
development-telemetry checks describe their current callers (release.yml,
nightly.yml) instead of a workflow that no longer exists. Genuinely
historical mentions ("used to carry", "canary tags exist on GitHub") stay,
since they are still true and existing canary releases/tags are out of
scope here.

Co-authored-by: Claude Opus 5 <[email protected]>
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.

2 participants