965938230a
The failing assertion was never testing the script. It compared the row count of a table three other projects also write to, before and after the run, and the failure it reported (61 rows became 12) landed while the script under test was demonstrably confined to its own schema. A row count cannot carry the property that assertion stood in for. It goes red when anyone else writes, and green when an outside insert happens to cancel out a wrong delete. The second half is the one that was guarding against a dropped audit table. So the property moves to where the database enforces it: the script runs as a role that owns its scratch table and holds no grant at all on the shared one. Falling back to public stops being something a later assertion might notice and becomes permission denied. Measured, along with the rest of the Postgres semantics this rests on. The tool grows --table so the target stops being whatever search_path resolves to. The table half is pinned to llm_calls: without that, one typo turns a telemetry cleaner into a general purpose row deleter. Codex raised six problems and all are folded in. The one place this still disagrees with it is recorded with the reason.