scripts/deploy-web.sh never runs scripts/verify-deploy-build.sh; only scripts/deploy-web-staged.sh does.
So a deploy through pnpm deploy:web gets none of its checks, including the one (REQUIRE_WASM_OPT=1) that the shipped WASM was actually optimized.
Why it matters
Nothing is broken today: both scripts run pnpm clean first, which forces a full optimized build.
The check guards against a regression in src/engine/build.sh's build cache, which once could keep an unoptimized blob from a pre-commit build.
That failure is silent: a browser bundle about 24% larger (5.0 to 6.2 MB) with nothing in the deploy output.
docs/dev/deploy.md now describes the staged path (pnpm deploy:web:staged, also used by pnpm deploy:canary) as the proven one and deploy:web as the fallback, so the unchecked path is the less used one.
Fix
Call REQUIRE_WASM_OPT=1 bash scripts/verify-deploy-build.sh in deploy-web.sh right after deploy:assemble, as the staged script does.
Run one real deploy through it before relying on it, so an unrelated failure in the check does not block a production deploy at a bad moment.
Alternative: if the staged path has replaced deploy:web in practice, delete deploy-web.sh and the deploy:web script instead.
Pointers
scripts/deploy-web.shnever runsscripts/verify-deploy-build.sh; onlyscripts/deploy-web-staged.shdoes.So a deploy through
pnpm deploy:webgets none of its checks, including the one (REQUIRE_WASM_OPT=1) that the shipped WASM was actually optimized.Why it matters
Nothing is broken today: both scripts run
pnpm cleanfirst, which forces a full optimized build.The check guards against a regression in
src/engine/build.sh's build cache, which once could keep an unoptimized blob from a pre-commit build.That failure is silent: a browser bundle about 24% larger (5.0 to 6.2 MB) with nothing in the deploy output.
docs/dev/deploy.mdnow describes the staged path (pnpm deploy:web:staged, also used bypnpm deploy:canary) as the proven one anddeploy:webas the fallback, so the unchecked path is the less used one.Fix
Call
REQUIRE_WASM_OPT=1 bash scripts/verify-deploy-build.shindeploy-web.shright afterdeploy:assemble, as the staged script does.Run one real deploy through it before relying on it, so an unrelated failure in the check does not block a production deploy at a bad moment.
Alternative: if the staged path has replaced
deploy:webin practice, deletedeploy-web.shand thedeploy:webscript instead.Pointers
scripts/deploy-web.sh,scripts/deploy-web-staged.sh,scripts/verify-deploy-build.shdocs/dev/deploy.md