Skip to content

Build the public site without the private HALLUX repo; publish docs/ atomically - #5

Open
rxslice wants to merge 1 commit into
mainfrom
fix/public-build
Open

rxslice wants to merge 1 commit into
mainfrom
fix/public-build

Conversation

@rxslice

@rxslice rxslice commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Fixes audit finding HTML-2.

Problem

  • A clone without the private hallux checkout beside it could not build. site/index.html aborted on {{HALLUX_FREE_DAILY}} and {{HALLUX_NAMESPACE_COUNT}}.
  • The abort happened after some files were already written, so docs/ was left half-updated. Reproduced: 3 tool pages were rewritten before the abort.

Fix

  • Snapshot fallback: every build that has HALLUX checked out writes the resolved token values to dev/hallux-snapshot.json, and only rewrites it when they change. Without HALLUX, the bridge fills the tokens from that file and prints a note. HALLUX remains the single source of truth: the snapshot is only what the last full build published.
  • Strict mode: BLVKWARE_REQUIRE_HALLUX=1 refuses the snapshot. Use it for the production publish if a snapshot fill must never happen there.
  • Atomic publish: main() copies docs/ to a .docs-staging-* directory, builds there, and swaps it into place only on success. On any abort, docs/ stays byte-for-byte as it was and the staging directory is removed.

Verification

  • dev/check-public-build.py copies the tracked files into a temp directory with no ../hallux and checks two things: (1) the build succeeds and docs/ has no {{HALLUX_*}} token left; (2) a strict-mode build aborts, leaves the docs/ tree hash unchanged, and leaves no staging directory. Both pass. On the old code, check (1) fails (exit 1).
  • A full build with HALLUX present passes and generates the snapshot.
  • New CI workflow runs the check, with fetch-depth: 0 because article dates come from git history.

Not in this PR: docs/ is not rebuilt here. My clone is shallow, so a rebuild would have re-dated every article to today. Rebuild from your full checkout as usual.


Generated by Claude Code

…atomically

- HTML-2: HALLUX tokens fall back to dev/hallux-snapshot.json, which every
  build with HALLUX checked out rewrites; BLVKWARE_REQUIRE_HALLUX=1 refuses it
- The build runs in a staging copy and swaps into docs/ only on success, so
  an abort no longer leaves a half-written site
- dev/check-public-build.py checks both paths; CI runs it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GFY8v4QeVYzawpSLcJCzz

This branch has not been deployed

No deployments
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