fix: park human runs atomically before slow notification work

This commit is contained in:
2026-10-20 16:35:30 +01:00
parent a049b552f6
commit d92fa60259
3 changed files with 56 additions and 4 deletions
@@ -155,7 +155,7 @@ func TestSessionExportJobGuardsCleanupAgentsAndExactOwnership(t *testing.T) {
if err := s.FinishRun(ctx, id, "succeeded", "success", "", nil); err != nil {
t.Fatal(err)
}
if _, err := s.db.Exec("ALTER TABLE pipeline_runs ADD COLUMN cleanup_unconfirmed INTEGER NOT NULL DEFAULT 0"); err != nil {
if err := s.addColumnIfMissing("pipeline_runs", "cleanup_unconfirmed", "INTEGER NOT NULL DEFAULT 0"); err != nil {
t.Fatal(err)
}
for _, queries := range [][2]string{