Skip to content

fix(release): repair the Windows install path and widen arch coverage - #44

Merged
filipeforattini merged 1 commit into
mainfrom
fix/release-arch-coverage
Jul 31, 2026
Merged

fix(release): repair the Windows install path and widen arch coverage#44
filipeforattini merged 1 commit into
mainfrom
fix/release-arch-coverage

Conversation

@filipeforattini

@filipeforattini filipeforattini commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The Windows .sha256 sidecar was the raw three-line certutil -hashfile report, whose first whitespace-separated token is the literal SHA256:

SHA256 hash of dit-windows-x86_64.exe:
80cd9c58...155a4
CertUtil: -hashfile command completed successfully.

All three consumers read that first token as the digest, so on Windows the PowerShell one-liner, install.sh under MSYS, and dit update each abort with a checksum mismatch. This is live in v0.3.0.

Changes

Sidecar — emit one canonical <digest> <asset> shape on every runner (sha256sumshasum → parsed certutil), and fail the build if the result is not 64 hex chars, rather than publish an unverifiable asset.

Consumersinstall.ps1, install.sh and src/update.rs now scan for the first 64-char hex run instead of taking token one. Since the installers are fetched from main, this unblocks Windows against the already-published v0.3.0, no re-release needed.

Architecture coverage

  • Added aarch64-pc-windows-msvc (Windows on ARM), cross-compiled from the x64 runner. Best-effort and unsmoked — it cannot be executed there.
  • Promoted macos-x86_64, macos-aarch64 and windows-x86_64 out of optional: true. Each was allowed to fail silently, which is exactly how a release ships without the asset an installer resolves by name.

verify-assets gate — new job between build and publish-github. The five required assets must be present, non-empty, and match a well-formed sidecar or the release is never created; best-effort assets missing are ::warning::, not silence.

Fallbacks — all three consumers drop to the x86_64 build on Windows ARM when a release carries no native ARM64 asset.

Verification

  • The verify-assets script, replayed against a fixture reproducing v0.3.0 artifacts, fails on the malformed Windows sidecar; passes once corrected; fails on a missing required asset. All three cases exercised locally.
  • 4 new unit tests in src/update.rs cover canonical + legacy-certutil sidecar parsing and the fallback table — all pass.
  • install.sh passes bash -n; the workflow parses as YAML with the expected 9-leg matrix.
  • Not run: cargo clippy / full cargo test (deferred to CI at the requester's direction). No PowerShell available locally, so install.ps1 was reviewed but not executed.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

The Windows `.sha256` sidecar was the raw three-line `certutil -hashfile`
report, whose first whitespace-separated token is the literal "SHA256". All
three consumers read that first token as the digest, so on Windows the
PowerShell one-liner, `install.sh` under MSYS, and `dit update` each aborted
with a checksum mismatch. Emit one canonical `<digest>  <asset>` sidecar on
every runner, and fail the build rather than publish an unverifiable asset.

The consumers also learn to scan for the first 64-char hex run instead of
taking token one, so a Windows host can install from or self-update off the
already-published v0.3.0 without waiting for a re-release.

Coverage and guarantees:

- Add `aarch64-pc-windows-msvc` (Windows on ARM), cross-compiled from the
  x64 runner. Best-effort and unsmoked — it cannot be executed there.
- Promote macOS x86_64/aarch64 and Windows x86_64 out of `optional: true`.
  Every one of those legs was allowed to fail silently, which is exactly how
  a release ships without the asset an installer resolves by name.
- Add a `verify-assets` gate between build and publish: the five required
  assets must be present, non-empty, and match a well-formed sidecar or no
  release is created; missing best-effort assets are warned about instead of
  vanishing. Replayed against v0.3.0's artifacts, this gate fails.
- `install.ps1`, `install.sh` and `dit update` fall back to the x86_64 build
  on Windows ARM when a release carries no native ARM64 asset.
@filipeforattini
filipeforattini merged commit 5d56c1f into main Jul 31, 2026
2 checks passed
@filipeforattini
filipeforattini deleted the fix/release-arch-coverage branch July 31, 2026 10:05
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