Move legacy job repair to migration 0011 and keep archived dinners pending
CI / ci (push) Successful in 2m35s
CI / ci (pull_request) Successful in 2m20s

R1-A: Migration 0010 is back to its round-2 content, the ALTER TABLE only,
since a database that already applied 0010 never runs it again. The
repair that writes revision 0 into ground_dinner job payloads without one
is now migration 0011, applied by the same boot Migrate call, so before
the job runner starts and before FailInterruptedGroundings.
TestUpgradeKeepsLegacyQueuedGrounding now upgrades from 0009 and from a
database with 0010 already recorded, each with a pending Regular and a
queued legacy job; both keep the dinner pending through the boot cleanup
and then ground it.

R2-A: The boot cleanup no longer fails archived dinners. Archiving stops a
running job and leaves the dinner pending, which the cleanup relabelled
failed with interrupted. TestRestartKeepsArchivedPendingDinner archives a
pending Regular while its job runs and checks the cleanup leaves it
pending with no error.

Maestro task 5037ff86-181d-448e-927b-c2fd2258a25d.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-06 19:49:06 -04:00
co-authored by Claude Opus 5.5
parent dff58d491f
commit 35ceb3985b
9 changed files with 92 additions and 32 deletions
+1 -1
View File
@@ -226,7 +226,7 @@ automatic** (D-021).
method, minutes_total or difficulty a member saved while the dinner was
`pending` is kept; grounding fills only those left empty. At boot, after
the job runner fails the jobs a previous process left running, every
dinner still `pending` with no `ground_dinner` job for its revision
unarchived dinner still `pending` with no `ground_dinner` job for its revision
queued or running is set `failed` with `interrupted`, so no dinner stays
pending with nothing left to ground it.
`GET /api/v1/dinners/{id}/recipe-candidates`