Skip to content

fix(deploy): verify the Control UI build identity instead of rebuilding it - #6

Merged
tomorrowflow merged 1 commit into
mainfrom
fix/doctor-findings
Oct 2, 2026
Merged

tomorrowflow merged 1 commit into
mainfrom
fix/doctor-findings

Conversation

@tomorrowflow

@tomorrowflow tomorrowflow commented Sep 13, 2026 •

Copy link
Copy Markdown
Owner

Problem

openclaw doctor reported "Control UI assets do not match the current Gateway build", and the Control UI served 503 "Control UI assets could not be prepared". Doctor couldn't repair it ("ui/ sources not present").

scripts/deploy-globally.mjs rebuilt the UI after npm i -g ., assuming pnpm build doesn't produce it. In fact build-all already runs ui:build and write-build-info under one shared identity (scripts/lib/build-identity.mts). The second build took its build ID from whatever git HEAD was current at that moment, so a commit landing mid-deploy stamped index.html with a different ID than dist/build-info.json. The Gateway then rejected its own bundled UI as stale.

Solution

  • deploy-globally.mjs: drop the UI rebuild. Instead, check that the shipped index.html build ID equals dist/build-info.json#buildId once Vite's 64-hex public-asset digest is stripped, the same normalization src/infra/control-ui-assets.ts uses. Fail the deploy loudly on a mismatch. The caller comment in sync-and-deploy.sh is updated to match.
  • docs/fork-features.txt: assert verifyControlUiBuildIdentity() so an upstream sync cannot silently bring the rebuild back.

Rebase note

The original branch was cut from the pre-re-cut 2026.9.7 history (100 commits, conflicting). It is now one commit on current main. The original speech-skills commit was dropped: main already gives kokoro-tts and whisper-asr valid frontmatter with 127.0.0.1 endpoints.

Evidence

  • The new check against the live install (deployed edf58fc) reports a match: 2026.9.7-edf58fcdd506-2026-10-02T11-35-53.380Z equals the build-info buildId. The next deploy will not be refused for an install that is already healthy.
  • The Gateway-side comparison was reviewed (inspectControlUiAssetHealth, which strips the -<64 hex> suffix and compares with the expected build ID).
  • node --check, bash -n, oxfmt --check, check-fork-features (83 present) and git diff --check are clean.

🤖 Generated with Claude Code

@tomorrowflow
tomorrowflow force-pushed the main branch 4 times, most recently from 07e5481 to c595e7a Compare September 22, 2026 06:47
@tomorrowflow
tomorrowflow force-pushed the main branch 5 times, most recently from b3d4f6c to ca5f8f1 Compare September 29, 2026 14:58
deploy-globally rebuilt the Control UI after `npm i -g .` on the belief
that `pnpm build` did not produce it. build-all already runs ui:build
and write-build-info under one shared build identity, and `npm i -g .`
ships both. The extra rebuild re-derived the UI build ID from the git
HEAD of that moment, so a commit landing between `pnpm build` and the
deploy step stamped a different ID than dist/build-info.json. The
Gateway then rejected its own bundled UI as stale and served 503
"Control UI assets could not be prepared", and doctor could not repair
it because the global install has no ui/ sources.

Verify that the shipped index.html build ID matches the installed
build-info.json instead of regenerating half of the pair.
@tomorrowflow tomorrowflow changed the title fix(deploy,skills): keep the Control UI build identity and validate speech skills fix(deploy): verify the Control UI build identity instead of rebuilding it Oct 2, 2026
@tomorrowflow
tomorrowflow merged commit 8ec4964 into main Oct 2, 2026
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