Skip to content

Fix cross-platform red build: canonicalise line endings, refresh sortablejs pin - #5

Closed
roosch269 wants to merge 1 commit into
digital-guerrilla:devfrom
roosch269:fix/line-endings-reproducible-build
Closed

Fix cross-platform red build: canonicalise line endings, refresh sortablejs pin#5
roosch269 wants to merge 1 commit into
digital-guerrilla:devfrom
roosch269:fix/line-endings-reproducible-build

Conversation

@roosch269

Copy link
Copy Markdown
Contributor

Fixes the build that has been red since Saturday afternoon (deploy and release skipped since then).

Cause. The release regression test compares the schema embedded in the committed release HTML byte for byte against dev/specification/guerrilla-ops-schema.xml. On a Windows checkout core.autocrlf gives the working copy CRLF endings, so a locally built release embeds CRLF while the repo source is LF. Green locally, red on every Linux runner.

Fix. build_release.py now canonicalises line endings in both files it embeds by exact bytes (the QA schema and the favicon SVG), so the output no longer depends on how the source was checked out. This also covers an existing autocrlf worktree upgrading to this commit, where git does not rewrite unchanged working-tree files and .gitattributes alone would not help. The regression test normalises the same way, and .gitattributes pins the repo to LF as general hygiene.

Verified. LF, CRLF-schema, CRLF-SVG-only (the upgrade path) and all-text-CRLF checkouts each produce byte-identical airgapped HTML, and all three suites pass in each. A side effect worth having: anyone can now rebuild Guerrilla-Ops-Airgapped.html and verify the hash against a published release, which seems valuable for the secure environments it is aimed at.

Also: sortablejs pin refreshed. jsDelivr serves different bytes from the pinned hash and the build rightly refuses to run. Verified before changing anything: the npm registry's dist.integrity matches the tarball, and the tarball member sha256 (6d0a831f...) matches the CDN response. The package is genuine; the pin was stale. (The hash gate itself works well. Mid-testing, the sheetjs CDN served a bad response and the build correctly refused it.)

Artifacts rebuilt from the canonical source.

…ablejs pin

The release regression test compares the schema embedded in the committed
release HTML byte-for-byte against dev/specification/guerrilla-ops-schema.xml.
On a Windows checkout core.autocrlf converts the working copy to CRLF, so a
locally built release embeds CRLF while the repo source is LF, and the test
fails on every Linux runner (red since 2026-08-15, deploy and release skipped).

Small changes close the observed divergence at the source:

- build_release.py canonicalises line endings in both files it embeds by
  exact bytes: the QA schema and the favicon SVG. The embedded content no
  longer depends on how the source was checked out. This also covers an
  existing autocrlf worktree that upgrades to this commit, where git does
  not rewrite unchanged working-tree files and .gitattributes alone would
  not help.
- runtime-regression.js normalises the schema the same way, so the
  byte-equality check passes on any platform while still catching a
  genuinely stale artifact.
- .gitattributes pins the repo to LF as belt-and-braces hygiene.

Verified under the tested toolchain: LF, CRLF-schema, CRLF-SVG-only
(the upgrade path), and all-text-CRLF checkouts each produce byte-identical
airgapped HTML, and all three regression suites pass in each.

Also refreshes the sortablejs 1.15.6 pin. jsDelivr now serves the byte
content of the npm tarball member (verified: registry dist.integrity matches
the tarball, tarball member sha256 6d0a831f... matches the CDN response), so
the previous pin was stale rather than the package compromised.
@Andrew-Waring
Andrew-Waring changed the base branch from main to dev August 16, 2026 19:56
@Andrew-Waring
Andrew-Waring self-requested a review August 16, 2026 19:58
@Andrew-Waring Andrew-Waring self-assigned this Aug 16, 2026
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