You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(cli): guard against @objectstack/console objectui-SHA drift (#2507)
packages/console/dist is a gitignored, locally-built artifact that only
scripts/build-console.sh produces — `turbo run build` never rebuilds it.
So pulling a branch that bumps the committed .objectui-sha pin left a stale
dist in place, and the CLI silently served a Console built from a different
objectui commit (the npm-major version guard can't see a SHA move under a
single @objectstack/console version).
- build-console.sh stamps the built SHA into dist/.objectui-sha
- new scripts/check-console-sha.mjs compares stamp vs pin; hard-gates
pnpm dev / dev:crm / dev:todo, and is self-tested in showcase-smoke CI
- resolveConsolePath warns at serve time on a drifted dist (all boot paths)
- remediation is `pnpm objectui:build`; published installs ship no pin so
the guard is a no-op there
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Guard against `@objectstack/console` version drift. The vendored Console SPA in `packages/console/dist` is a gitignored, locally-built artifact that only `scripts/build-console.sh` (`pnpm objectui:build` / `objectui:refresh` / `release` / CI) produces — `turbo run build` never rebuilds it. Pulling a branch that bumps the committed `.objectui-sha` pin therefore left a stale dist in place, and the CLI would silently serve a Console built from a different objectui commit (the npm-major version guard can't see a SHA move under one package version).
6
+
7
+
`build-console.sh` now stamps the built objectui SHA into `dist/.objectui-sha`. A new `pnpm check:console-sha` compares that stamp against the pin and fails loudly on drift (hard-gating `pnpm dev` / `dev:crm` / `dev:todo`), and `resolveConsolePath` warns at serve time when it selects a drifted dist. Remediation is `pnpm objectui:build` (rebuild at the pinned SHA). Published installs ship no pin, so their stamped dist stays authoritative and the guard is a no-op.
0 commit comments