Skip to content

The nightly writes SHA256SUMS.txt with CRLF too - #2398

Merged
erikdarlingdata merged 2 commits into
devfrom
fix/2383-nightly-checksums-lf-too
Aug 21, 2026
Merged

The nightly writes SHA256SUMS.txt with CRLF too#2398
erikdarlingdata merged 2 commits into
devfrom
fix/2383-nightly-checksums-lf-too

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

#2384 fixed build.yml and left the identical step in nightly.yml, so every nightly since has published a checksum file that shasum -c cannot read.

Found while auditing what in 3.5.1 is verified by anything other than reading the diff — this one is only exercised by actually running the pipeline, so I checked the published artifact:

$ file nightly_SHA256SUMS.txt
ASCII text, with CRLF line terminators

$ head -1 nightly_SHA256SUMS.txt | cat -v
f27860c5...  PerformanceMonitorDarling-3.5.0-nightly.20260821.zip^M

And with the artifact present, so the failure is the trailing CR rather than a missing file:

CRLF  ->  shasum: artifact.zip: No such file or directory
          artifact.zip: FAILED open or read
LF    ->  artifact.zip: OK

The nightly is the worse of the two to get wrong. It is a prerelease, so whoever downloads it is disproportionately likely to check a hash by hand — and FAILED open or read is exactly what a tampered download looks like.

Same fix as #2384. Both copies now carry a note that the other exists, since the whole defect was one being updated without the other.

erikdarlingdata and others added 2 commits August 21, 2026 11:12
#2384 fixed the release workflow and left the identical step in the
nightly untouched, so every nightly since has shipped a checksum file that
shasum -c cannot read on macOS or Linux. Verified against the published
artifact rather than by reading the workflow:

  $ file nightly_SHA256SUMS.txt
  ASCII text, with CRLF line terminators

  $ head -1 nightly_SHA256SUMS.txt | cat -v
  f27860c5...  PerformanceMonitorDarling-3.5.0-nightly.20260821.zip^M

and with the artifact actually present, so the failure is the trailing
CR and not a missing file:

  CRLF -> shasum: artifact.zip: No such file or directory
          artifact.zip: FAILED open or read
  LF   -> artifact.zip: OK

The nightly is arguably the worse of the two to get wrong. It is a
prerelease, so the people downloading it are the ones most likely to
verify a hash by hand, and "FAILED open or read" is indistinguishable
from what a tampered download looks like.

Same fix as #2384, with a note in both copies that a second one exists.

Fixes #2383

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The defect was one of the two copies being updated without the other, so
the cross-reference belongs on both sides or it only helps whoever happens
to open the nightly first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@claude

claude Bot commented Aug 21, 2026

Copy link
Copy Markdown

Reviewed. This is a clean, minimal fix — the nightly checksum step now matches build.yml's [IO.File]::WriteAllText approach byte-for-byte (explicit LF, no BOM), and both files got a cross-reference comment pointing at their twin, which directly addresses the root cause (one copy was fixed in #2384, the other wasn't). Confirmed there's no third copy of this step anywhere in .github/workflows/ — the Linux checksum path (sha256sum in a separate step) never had the CRLF problem since it isn't PowerShell/Out-File, so it's correctly left untouched. No T-SQL, no Lite/Darling app parity concerns (CI-only change), no security implications. LGTM.

@erikdarlingdata
erikdarlingdata merged commit f16ddb8 into dev Aug 21, 2026
6 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/2383-nightly-checksums-lf-too branch August 21, 2026 10:21
erikdarlingdata added a commit that referenced this pull request Aug 21, 2026
Both were found by asking what in this release is verified by anything
other than reading the diff. The checksum fix was half-applied (#2384 fixed
the release workflow, not the nightly), and the dispatch-ref bug meant the
release candidate I built to soak was not the branch I dispatched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant