depunks-env-db
Summary: In depunks, test and production intentionally share the same D1 database (depunks-prod-v2) — this is a deliberate, permanent decision, NOT config drift. Do not “fix” it or flag it as a mismatch.
The decision
depunks-dev→ local development only.depunks-prod-v2→ both the test and production Workers (app/wrangler.jsoncbindsenv.DB=depunks-prod-v2in both envs).- Older docs said test=
depunks-test, prod=depunks-prodwith “separate DBs for isolation” — that was stale; corrected 2026-07-06.
Why (do not revert)
Blockchain state can’t be faithfully mocked:
- Anvil gives only a point-in-time snapshot — hard to keep in sync with real chain state.
- Testnet changes aren’t reflected by the third-party apps depunks depends on (OpenSea and other marketplaces) — so you can’t actually see the effect of changes there. Therefore test runs against the real production DB so you’re testing the real environment. This is why the test server shows rich live data.
Caveat to remember
ENABLE_CRON = false on the test env → the OpenSea listings/trades sync does NOT run on test. Sweep rows and price freshness on test depend entirely on the production cron writing to the shared depunks-prod-v2 DB.
For the loops / Claude Code
This is documented so the weekly control-center lint does not flag the CLAUDE.md-vs-wrangler “test uses prod DB” as a contradiction — it’s expected. The CLI warning about “prod DB on test” is a false alarm here.
Sources
~/Documents/localhost/depunks/app/wrangler.jsonc(env D1 bindings),~/Documents/localhost/depunks/app/CLAUDE.md(Environment Configuration).- Decision confirmed by foogy, 2026-07-06. Related: depunks, control-center, cloudflare-deploy.