Skip to content

Verify and retry compiled asset copy to fix missing open-write bundle - #8

Merged
michielbdejong merged 1 commit into
mainfrom
claude/fix-issue-7-compiled-assets
Jul 28, 2026
Merged

Verify and retry compiled asset copy to fix missing open-write bundle#8
michielbdejong merged 1 commit into
mainfrom
claude/fix-issue-7-compiled-assets

Conversation

@michielbdejong

Copy link
Copy Markdown
Member

Summary

Fixes #7. Diagnosed by pulling the CI job logs from two successful deploy runs (30100919497, 30252869956) and comparing the uploaded artifact's file listing (the ##[group] log block right before actions/upload-artifact@v4 runs) against what should be there: sub-detail/__compiled, sub-item/__compiled, sub-input/__compiled, and sub-template/__compiled all appear with their ui-behaviour.js/ui-style.css, but open-write/__compiled is missing entirely from both runs — despite the "Build" step's own log confirming created os-app/open-write/__compiled/ui-behaviour.js, and despite every local rebuild reproducing it correctly.

open-write is the last (and heaviest — ~7s Svelte compile) module olsk-rollup builds. Best explanation: the build CLI logs "created" and exits before that module's compiled output is fully flushed to disk on the CI runner — a timing race in the upstream toolchain that isn't reproducible locally.

Change

Rather than chase the exact upstream race, static-export.js's asset copy is now self-verifying: after copying os-app into .static, it checks that every module with a rollup-start.js actually has its __compiled output present in the copy. If any are missing, it retries (with a 1s wait) up to 5 times before throwing — so a transient race self-heals, and a genuine problem fails the deploy loudly instead of silently shipping a page missing its script/stylesheet (which is what happened on the last two deploys).

Test plan

  • Rebuilt locally and re-ran npm run static-export — happy path unaffected, open-write/__compiled/{ui-behaviour.js,ui-style.css} present
  • Re-deploy via the Pages workflow and confirm the CI artifact listing now includes open-write/__compiled, and hyperdraft.pondersource.com/en/write/ loads without 404s

https://claude.ai/code/session_01AcjKc8vk2fb84yYZsE8k5d


Generated by Claude Code

…#7)

CI logs from two separate deploys showed os-app/open-write/__compiled
consistently missing from the uploaded Pages artifact, while every other
controller's __compiled output copied fine — even though the build step
logs confirm it created the file, and local rebuilds always reproduce it
correctly. open-write is the last (and heaviest, ~7s) module olsk-rollup
builds; this looks like a race where the build CLI logs "created" and
exits before that module's output is fully flushed to disk on the CI
runner.

Rather than chase the exact upstream timing bug, make the copy
self-verifying: after copying os-app to .static, check that every module
with a rollup-start.js has its __compiled output present in the copy,
retrying (with a short wait) up to 5 times before failing the deploy
loudly. Better to fail CI than silently ship a page missing its script
and stylesheet, as happened in the last two deploys.
@michielbdejong
michielbdejong merged commit 78c781a into main Jul 28, 2026
0 of 2 checks passed
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.

https://hyperdraft.pondersource.com/en/write/ is not loading due to 404s

2 participants