Skip to content
AyoKoding

Artifact: Human Decision Gate Before a Schema Migration

A session pauses before a destructive schema migration and records an explicit human approval before continuing -- exercises co-24.

1. read_file(path="db/migrations/current_schema.sql")
2. grep(pattern="legacy_status_code", path="src/")
3. plan: "drop the now-unused legacy_status_code column from orders."
 
[PAUSE -- destructive step requires approval]
This step is a DROP COLUMN migration on the `orders` table in production --
irreversible without a restore from backup. Waiting for explicit human
approval before generating or applying the migration.
 
[Human]: Confirmed a fresh backup exists (backup-2026-07-18-0600) and no code
path outside the three grepped call sites (already migrated in a prior
session) reads legacy_status_code. Approved -- proceed.
 
[RESUMED]
4. write_file(path="db/migrations/0047_drop_legacy_status_code.sql",
              content="ALTER TABLE orders DROP COLUMN legacy_status_code;")
5. run_shell(command="apply migration against staging, verify row count unchanged")

The pause is not decorative -- steps 4 and 5 (the actual, irreversible-in-production write) do not appear anywhere in the log before the [Human] approval line. The plan (step 3) is proposed first; the destructive action waits on an explicit, recorded decision.

Verify: the log shows [PAUSE -- destructive step requires approval] immediately after the plan, followed by an explicit [Human]: ... Approved -- proceed. line, with every subsequent write-capable step occurring only after it -- satisfying ex-44's rule that the session log shows a pause and an explicit recorded approval.

Last updated July 17, 2026

Command Palette

Search for a command to run...