Staging Is Retired
There is currently no deployed CareerVector staging environment.
There are no [env.staging] blocks in any wrangler.toml (ui/, relay/cf/, etc.). Any staging hostnames in older docs are historical, not active targets.
Current Environments
| Environment | Purpose | Notes |
|---|---|---|
| Local dev | Normal development and deterministic browser checks | ui runs Vite/SvelteKit; the CF relay can run via relay/cf Wrangler dev. |
| Production | Live internal/dev deployment | careervector.corbet.ch, backed by careervector-ui, careervector-relay-cf, D1 careervector, and R2 careervector. |
Deployed-worker checks are manual and must set an explicit target URL. Do not add scripts that silently default to the retired staging hostname.
Local Dev Shared D1 State
In local dev the ui app and relay-cf worker each run a separate Miniflare instance. Without coordination each instance creates its own .wrangler/state directory and the relay-cf worker's workspace-existence gate rejects workspaces created by the ui app.
Both local processes should use the same shared state directory:
| Process | Config location | Value |
|---|---|---|
ui (bun --filter @cv/ui dev) |
ui/scripts/link-shared-state.mjs + SvelteKit platform proxy state |
../../.wrangler-shared/state |
relay-cf (bun --filter @cv/relay-cf dev) |
relay/cf/package.json dev script |
--persist-to=../../.wrangler-shared/state |
The shared directory resolves to .wrangler-shared/state/ at the repo root and is gitignored. Delete it to reset local dev state.
Local Database Bootstrap
The shared state directory starts empty. On a fresh checkout or after wiping .wrangler-shared/state, bootstrap the local D1 once:
bun --filter @cv/ui db:bootstrap
This executes migrations/schema.sql against the local D1 at .wrangler-shared/state. It is idempotent.
Testing Implication
Routine Playwright work should prefer local deterministic gates. Specs that require a deployed Worker with a REALTIME service binding must require PLAYWRIGHT_BASE_URL explicitly and should not run by default, because deployed-worker suites spend Cloudflare account quota.