Files
KomediruzeckiandGitHub 6e15657833 chore(shots): let the supervised worker run on its own database (#532)
* chore(shots): let the supervised worker run on its own database

The marketing-shots recipe needs a database seeded today: e2e-seed dates
every transaction relative to now and runs once per database, so the shared
e2e D1 - seeded whenever it was first used - has an empty current month
weeks later, and 02-transactions comes back blank (0 of 5+ rows, seen
2026-09-07 on a fixture from August). The doc's answer was "use a fresh
worktree for its own .wrangler"; a directory is cheaper than a checkout.

worker-supervisor.mjs passes WRANGLER_PERSIST_TO to `wrangler dev
--persist-to` when set. The doc's recipe now exports a mktemp dir, gives it
to the migrate step, and runs the supervisor instead of raw `wrangler dev`,
which crashes a minute or two into a run.

* docs(shots): invoke wrangler directly for the persist-to migrate

`pnpm run d1:migrate:local -- --persist-to DIR` did not deliver the flag:
the shared database answered "No migrations to apply!" and wrangler dev
then came up on an empty directory, so the seed failed on missing tables.
Same direct form the release rehearsal in the prod-update skill uses.
2026-09-07 10:52:04 +02:00
..