Photo backfill for failed dinners without a photo (Maestro 36c40130, Feature 23 task 1) #205

Member

Feature 23 task 1: a service-only background job that re-grounds photoless failed dinners through the existing Feature 10 Grounder (Ground(name, name)) — first image-bearing candidate wins, source attribution kept, grounded/manual/recipe-url dinners never touched, per-dinner typed failures, and an authenticated trigger endpoint (202 + job id). Criterion enqueue-on-create dropped by recorded disposition: creation already grounds with a photo.

Maestro task 36c40130-a69a-46ed-a047-2cdc5ee2d2e0.

Feature 23 task 1: a service-only background job that re-grounds photoless failed dinners through the existing Feature 10 Grounder (Ground(name, name)) — first image-bearing candidate wins, source attribution kept, grounded/manual/recipe-url dinners never touched, per-dinner typed failures, and an authenticated trigger endpoint (202 + job id). Criterion enqueue-on-create dropped by recorded disposition: creation already grounds with a photo. Maestro task 36c40130-a69a-46ed-a047-2cdc5ee2d2e0.
orchestrator-agent added 1 commit 2026-10-11 21:03:44 -04:00
Add photo backfill for failed dinners without a photo
CI / ci (pull_request) Failing after 10m12s
CI / ci (push) Successful in 11m35s
ec718024a1
Task 36c40130-a69a-46ed-a047-2cdc5ee2d2e0 (Feature 23, task 1 of 2).

A backfill_dinner_photos job grounds, by name with the existing
recipes.Grounder.Ground, every unarchived dinner whose grounding failed
and that has no photo and no pasted recipe_url. Ground already tries the
ranked candidates best first and keeps the first whose photo caches and
whose ingredients normalize, reusing stored recipes and photos. Success
records the recipe and photo as grounded; a failure leaves the dinner
failed with the new grounding_error for the fix-recipe flow, without
stopping its siblings. Writes are guarded on status, photo and
grounding_revision, so grounded, manual, pending, renamed and archived
dinners are never touched.

POST /api/v1/settings/photo-backfill starts a full pass and answers 202
with the job id; the kind is service-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent requested changes 2026-10-11 21:05:08 -04:00
Dismissed
review_agent left a comment
Member

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.

Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
overseer added 1 commit 2026-10-11 21:16:15 -04:00
Make photo backfill single-flight and fail on unrecorded writes
CI / ci (pull_request) Successful in 10m6s
CI / ci (push) Successful in 10m10s
7c0eb5cc3a
Task 36c40130-a69a-46ed-a047-2cdc5ee2d2e0, remediation of review
findings F23-1 and F23-2 (PR #205).

F23-1: StartPhotoBackfill now checks, in the same write transaction
that enqueues, for a full backfill_dinner_photos job already queued or
running (new GetActivePhotoBackfillJob query) and returns its id instead
of enqueuing another, as plan.StartDraft does with GetActiveDraftJob.
The claim is the stored job row, so it holds across restarts; a job left
running by a stopped process is failed at boot and no longer blocks.

F23-2: a dinner whose outcome write fails is still reported failed with
grounding_error and the remaining dinners still run, but the job then
fails (internal_error, as a ground_dinner job's failed write does) with
the per-dinner outcomes published as its result, so it never reports
success for state it did not store.

Tests: overlapping triggers while queued, after a restart and while
running return the one job; a refused dinner write fails the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
overseer added 1 commit 2026-10-11 21:34:11 -04:00
Test photo backfill single-flight under simultaneous triggers
CI / ci (push) Successful in 9m54s
CI / ci (pull_request) Successful in 9m55s
32453d552b
TestStartPhotoBackfillIsSingleFlight now releases eight
StartPhotoBackfill calls together behind a start gate, both while the
pass is queued and while it runs, and asserts they all return the one
job id with a single backfill job stored. The restart case closes the
store and reopens it from the data directory before triggering again.

Maestro task 36c40130-a69a-46ed-a047-2cdc5ee2d2e0 (review finding F23-1-T).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
review_agent left a comment
Member

Independent Codex gpt-6-sol review: APPROVED for this exact commit.

Independent Codex gpt-6-sol review: APPROVED for this exact commit.
approver_agent merged commit 6127c5c2d1 into feature/1e5f7fa3-5308-4ced-8c2d-1da1cc6256f9-meal-photos-manual-dinners 2026-10-11 21:44:56 -04:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#205