Replace a held Side quest made ineligible before a batch's final store
A notifying (scheduled or manual) suggestion batch held each round's grounded Side quests and only checked them at its single final store, so a household change during grounding could drop a held card after the fill loop had stopped, leaving the batch short of BatchSize with spare candidates unused (MQ-172-3). The batch now rechecks every held Side quest after each round with the same eligibility check the store uses (eligible, extracted from store), so a later round grounds a spare in its place. The single-transaction store and once-only new_suggestions are unchanged. Narrow ARCHITECTURE.md's "a failed scheduled or manual batch has stored nothing" to failures before the final store, and state that a job that fails recording the batch's end keeps its Side quests and new_suggestions (MQ-172-4). Maestro task 244f9834-faa8-4bb8-b5e6-43677dec0cc0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-3
@@ -319,15 +319,22 @@ automatic** (D-021).
|
||||
suggestion with the name it is suggested under, the reason and
|
||||
`cited_regular_ids` — unless, since the job read its input, a dinner
|
||||
it repeats was added, a suggestion it repeats passed, or a Regular it
|
||||
cites renamed or archived (checked in the storing transaction). The job
|
||||
cites renamed or archived (checked in the storing transaction). A
|
||||
notifying batch also rechecks the Side quests it holds after each round
|
||||
and lets go of those no longer eligible, so a later round grounds a
|
||||
spare in place of each; only a change committed between the last
|
||||
recheck and the store can leave it short of 5 with spares unused. The job
|
||||
publishes `{batch_id, stage, suggestion_ids, dropped}` as it goes (`suggesting`,
|
||||
`grounding`, `done`). It fails with `no_regulars`, `ai_failed` (the
|
||||
skill or `normalize_recipe` failed; no Side quest is made up instead,
|
||||
D-017), `search_not_configured` or `search_failed`, and the batch is set
|
||||
`failed`. A failed `scheduled` or `manual` batch has stored nothing; a
|
||||
`failed`. A `scheduled` or `manual` batch that fails before its final
|
||||
store (the AI, grounding, or the store itself) has stored nothing; a
|
||||
failed `replenish` batch's Side quests stored before the failure stay
|
||||
in the deck. If
|
||||
recording the batch's end fails, its job fails; the job runner retries
|
||||
recording the batch's end fails, its job fails, even after the final
|
||||
store committed: a notifying batch's Side quests and their
|
||||
`new_suggestions` then stay; the job runner retries
|
||||
a job's final status write with backoff until it lands, each attempt
|
||||
bounded at 5 seconds; at shutdown an attempt that fails or times out is
|
||||
not retried, and the next start fails the job as interrupted. Recording
|
||||
|
||||
Reference in New Issue
Block a user