Skip to content

Generate the playground's artifacts at deploy time - #3

Merged
janstrakowski merged 1 commit into
mainfrom
pages/generate-artifacts
Aug 27, 2026
Merged

Generate the playground's artifacts at deploy time#3
janstrakowski merged 1 commit into
mainfrom
pages/generate-artifacts

Conversation

@janstrakowski

Copy link
Copy Markdown
Owner

Do not merge until the Pages source is switched to GitHub Actions — see below.

Why

docs/repo-files.json is the repository as the playground's filesystem, so it embeds every tracked file. Editing any of them leaves it stale, which turns CI red until a second commit regenerates it. That is why #1 is failing: it edits CLAUDE.md and nothing else, which is exactly what it should do.

Under branch protection this stops being a chore and becomes a blocker — a doc-only PR can't merge without touching a build product, and an edit made in the web UI can't regenerate it at all.

What

Both artifacts are generated instead of stored:

  • .github/workflows/pages.yml builds docs/hb.wasm and docs/repo-files.json, then deploys docs/ as the site.
  • CI builds the same two before the playground tests, so the tests exercise what the site will serve.
  • The staleness check, the --check mode's role in CI, and .githooks/pre-commit all go away, along with a 400KB binary in the tree.

Local development is two commands, documented in CLAUDE.md:

scripts/build_wasi.sh --threads-web -out:docs/hb.wasm
node scripts/build_playground_files.mjs

The one thing I can't do from here

The repository's Pages source has to change from branch main /docs to GitHub Actions. Merging this before that switch would leave the branch deploy without the files it serves — so: flip the setting, then merge.

Once merged, #1 passes as-is, with the single-file diff it should have.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L8ZVz8SQ7FVR1yMdWqXT7U

A documentation change should be a documentation change. It wasn't: docs/
repo-files.json is the repository as the playground's filesystem, so it embeds
every tracked file, and editing any of them left it stale and CI red until
someone added a second commit regenerating a build product. Under branch
protection that is worse than a chore - a doc-only PR cannot merge without
touching a generated file, and a web-UI edit cannot regenerate it at all.

Both artifacts are now built rather than stored: .github/workflows/pages.yml
builds the interpreter and the manifest and deploys docs/ as the site, and CI
builds the same two before running the playground tests, so what is tested is
what will be served. The staleness checks and the pre-commit hook are gone with
them, along with a 400KB binary in the tree.

This needs the repository's Pages source switched from a branch to GitHub
Actions; until that is done the site keeps deploying from the branch, and
merging this without it would leave the branch without the files it serves.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8ZVz8SQ7FVR1yMdWqXT7U
@janstrakowski
janstrakowski force-pushed the pages/generate-artifacts branch from a59fa38 to 1c15c44 Compare August 27, 2026 21:35
@janstrakowski
janstrakowski merged commit bbb4ee2 into main Aug 27, 2026
4 checks passed
@janstrakowski
janstrakowski deleted the pages/generate-artifacts branch August 28, 2026 08:36
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