Skip to content

fix(build): make release artifacts deterministic#250

Merged
chhoumann merged 1 commit into
masterfrom
chore/harden-build-artifacts
Jul 9, 2026
Merged

fix(build): make release artifacts deterministic#250
chhoumann merged 1 commit into
masterfrom
chore/harden-build-artifacts

Conversation

@chhoumann

Copy link
Copy Markdown
Owner

Summary

  • always stage Vite output under build/ so production builds cannot follow a development symlink
  • install production main.js as a regular root file while retaining root symlinks for development builds
  • share the Svelte preprocessor configuration and replace deprecated Rolldown output configuration
  • fail builds that emit unexpected distributable chunks or would overwrite non-file artifact paths

Why

The previous production output directory was the repository root. If main.js was already the development symlink to build/main.js, a production build followed that symlink, so artifact topology depended on checkout history. Releases still consume root main.js; this change makes that artifact deterministic without changing the release or E2E contract.

Verification

  • production -> development -> production artifact transition passed
  • production root main.js is a regular file and root main.js.map is absent
  • development restores root main.js and main.js.map symlinks
  • root and staged production artifacts have matching SHA-256 hashes
  • resulting production bundle is byte-identical to the baseline: 6f593e89c049bc84a8a9b3da90a5f002ccc5b8e1066ae05aef671dbc12cd5ebc
  • all prior Vite/Rolldown/Svelte configuration warnings are gone
  • isolated Obsidian loaded and reloaded PodNotes 2.17.3 with no runtime errors, then the private instance was stopped and removed

Validation

  • npm run lint
  • npm run format:check
  • npm run typecheck
  • npm run build
  • npm run test - 70 files, 883 tests
  • focused build-artifact tests - 7/7
  • docs build through docs/requirements.txt
  • git diff --check

Release impact

Root main.js remains the release and attestation asset. No consumer path changes are required.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

Latest commit: fa5cfc3
Status: ✅  Deploy successful!
Preview URL: https://cd345423.podnotes.pages.dev
Branch Preview URL: https://chore-harden-build-artifacts.podnotes.pages.dev

View logs

@chhoumann
chhoumann marked this pull request as ready for review July 9, 2026 20:50
@chhoumann
chhoumann merged commit 45fd233 into master Jul 9, 2026
5 checks passed
@chhoumann
chhoumann deleted the chore/harden-build-artifacts branch July 9, 2026 20:50
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