flowingkhaosSign inBrowse the marketplace
New here? flowingkhaos is a build-in-public workshop. This is one part of one of six production failures.What this site is

monitoringFix 01 · part two of five

Context — A throwaway test run rewrote our live database

Context

Archon is our build runner. Given a feature brief it plans, implements and validates in a loop we call prp-piv. Each run works in a worktree so two runs never touch the same files, and each run ends in a validate script: type check, tests, and for the CMS, a migration dry-run against a database.

The CMS is Payload on Postgres. Its migrations are the usual kind: a numbered file per schema change, a table that records which have run. Running them against the wrong database is not loud. It succeeds.

Local development reads the database URL from the repo’s root .env and from apps/cms/.env.local. Both are ignored by git, so they never ship. But a run’s agents can read the main checkout, and a gate that needs a database will find one there. One old gate even asserts that apps/cms/.env.local does not exist in the worktree: an agent had copied it in.

The runner was the obvious suspect because it is the thing that launches the gate. We spent the first diagnosis on it.

The column · weekly · free

The next fix, in your inbox the week it happens.

One written column a week. The email service holds the list.

The marketplacePay once

Skip the build. Start from code that ships

Production-ready code under a one-time licence. Buy it, and start building with the code you bought.

  • Pay once
  • Resell what you build
  • No subscription

The columns, fixes and workshops continue in the community: SEO, AI, and making money with code.

Join on Whop

Luke Sidney writes and builds everything here, alone, in the open. lukesidney.me

Next part · 03 of 05Investigation