apps/hive has native TanStack Start + Vite+ + Void source beside its Next build,
generated by the start-bridge codemod. The Next
build and vercel.json are untouched. hive.tuturuuu.com serves the maintenance
Worker below until a release owner flips the route. That 503 is the approved
interim response, not a failed native deploy.
Maintenance Worker and the native Worker
Flippinghive.tuturuuu.com between these Workers is a product decision for the
release owner. It is not a build defect, and this packet does not perform the flip.
The maintenance module returns HTTP 503,
Retry-After: 300, Cache-Control: no-store, and noindex for every path, including API and WebSocket upgrades. It has no bindings and no upstream calls.
A cutover to the native Worker replaces the script on the existing route hive.tuturuuu.com/*: the pattern stays, and the script becomes tuturuuu-hive. Leave tuturuuu-hive-maintenance uploaded. Rollback points that same route back at tuturuuu-hive-maintenance. No database write and no rebuild of the maintenance module is required to put the maintenance page back.
Worker
- Profile selector:
VITE_HIVE_NATIVE_PROFILE=productionat build time. Staging stays the default (workers_devandpreview_urlsoff,TUTURUUU_NOINDEX=1). Production istuturuuu-hivewith the same route flags andTUTURUUU_NOINDEX=0. Nothing in config attaches a route. - Entry:
apps/hive/cloudflare/worker.ts. - Host:
hive.tuturuuu.com. Root-only:mountHostsis empty andunknownHostisreject, sotuturuuu.com/hiveand any other host answer 404 before app code runs. - Binding:
ASSETS(static output,run_worker_first). No D1 binding.apps/hive/db/migrationsis Postgres SQL forHIVE_DATABASE_URL.void.config.tssetsdatabase: 'pg'so Void does not emit those files as a local D1 binding (DB/database_id: local). The Apps seal still requiresd1_databasesto be the empty normalizer default. - Variables (names):
TUTURUUU_NOINDEX, optionalINTERNAL_WEB_API_ORIGIN(defaulthttps://tuturuuu.com). - Secrets (names, set in the Worker, never in the repo):
NEXT_PUBLIC_SUPABASE_URL,NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY,SUPABASE_SECRET_KEY,TUTURUUU_APP_COORDINATION_SECRET,HIVE_DATABASE_URL,HIVE_REALTIME_TOKEN_SECRET,GOOGLE_GENERATIVE_AI_API_KEY,CRON_SECRET. Compare with the Vercel project environment list before the flip. - Optional variables read by the source:
HIVE_REALTIME_URL,HIVE_OLLAMA_BASE_URL,HIVE_APP_URL. Realtime ownership is in the Hive realtime runbook. - Hive talks to its own database and realtime service; confirm both are reachable from Workers before the flip.
Build and qualification
hive-cloudflare.yaml runs the same production profile in its hive-cutover-artifact job and seals the emitted config with scripts/ci/hive-native-artifact.py. The seal reads the config Void wrote. It does not rewrite Worker name, vars, or normalized fields after the build. Run the build on a CI or remote runner, not a developer machine.
test:runtime starts the emitted Worker in workerd
with synthetic secrets and no network egress: build identity, root host, apex rejection,
unknown paths, and the signed-out redirect through the app-owned
cloudflare/auth-redirect.runtime.mjs fixture (8 checks).
The app proxy admits anonymous GET/HEAD /api/build-info without an app-session
refresh, so deployment verification gets 200 instead of 401.
Smoke checks after the route is attached
5xx.
Rollback
The live origin is the maintenance Worker. After a native cutover, put maintenance back by binding the routehive.tuturuuu.com/* to tuturuuu-hive-maintenance again.
Keep the maintenance script in place so rollback is that route change.
- Before the flip, record the route id, the script it points at (
tuturuuu-hive-maintenance), and the DNS record forhive.tuturuuu.com. - To leave maintenance, point
hive.tuturuuu.com/*attuturuuu-hive. To restore maintenance, point the same pattern back attuturuuu-hive-maintenance. - Rerun the maintenance checks (503,
Retry-After: 300, noindex) or the native smoke checks, matching the script the route names.