Idea actions: add to Quest log and cook tonight (Feature 18) #148

Member

Idea actions: add to Quest log and cook tonight (Feature 18, task 3)

Maestro task 54dcd487-1597-4a91-8493-97f3a7635e2d. The two actions the Cook-from-what-I-have and Quick dinners screens call.

POST /api/v1/ideas/{jobId}/items/{i}/quest-log creates — or reuses, by normalized name — a grounded dinner with status quest_log and origin ingredients or quick, and is idempotent: a repeat call returns the same dinner rather than a second one. POST /api/v1/ideas/{jobId}/items/{i}/cook-tonight creates or reuses the dinner the same way and sets today's day of the current week's plan to it through the plan service, so revision and the "changed after sync" bookkeeping behave exactly as a board swap does. It never fabricates a plan: with no plan for the current week it changes nothing and answers 409 with code: "no_plan" so the screen can offer "Plan this week".

The developer documents the boundaries: today is the date now in the household timezone and the week is that date's Monday, so today is always inside the week; repeating cook tonight swaps the same dinner again and raises the plan revision like a same-dinner board swap; and a name matching an archived dinner is created fresh, matching how adding a Regular behaves.

The developer reports the Go quality floor passing with the four named cases tested.

## Idea actions: add to Quest log and cook tonight (Feature 18, task 3) Maestro task `54dcd487-1597-4a91-8493-97f3a7635e2d`. The two actions the Cook-from-what-I-have and Quick dinners screens call. `POST /api/v1/ideas/{jobId}/items/{i}/quest-log` creates — or reuses, by normalized name — a grounded dinner with status `quest_log` and origin `ingredients` or `quick`, and is idempotent: a repeat call returns the same dinner rather than a second one. `POST /api/v1/ideas/{jobId}/items/{i}/cook-tonight` creates or reuses the dinner the same way and sets today's day of the current week's plan to it **through the plan service**, so revision and the "changed after sync" bookkeeping behave exactly as a board swap does. It never fabricates a plan: with no plan for the current week it changes nothing and answers 409 with `code: "no_plan"` so the screen can offer "Plan this week". The developer documents the boundaries: today is the date now in the household timezone and the week is that date's Monday, so today is always inside the week; repeating cook tonight swaps the same dinner again and raises the plan revision like a same-dinner board swap; and a name matching an *archived* dinner is created fresh, matching how adding a Regular behaves. The developer reports the Go quality floor passing with the four named cases tested.
orchestrator-agent added 1 commit 2026-10-08 20:59:23 -04:00
Add idea actions: add to Quest log and cook tonight (Feature 18)
CI / ci (push) Successful in 5m42s
CI / ci (pull_request) Successful in 5m44s
e93c9c63f6
POST /api/v1/ideas/{jobId}/items/{i}/quest-log adds idea i of a
succeeded ideas job to the Quest log as a dinner grounded in the idea's
own recipe, with origin ingredients or quick, or answers the dinner it
repeats as it is (the Regular dedupe rule), so repeating the call is
idempotent. POST .../cook-tonight does the same, then puts the dinner on
today (household timezone) of this week's plan through plan.Service.Swap;
with no plan for the week it answers 409 no_plan and changes nothing.

Maestro task 54dcd487-1597-4a91-8493-97f3a7635e2d.

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 d6f732c119 into feature/640e946c-3280-430a-b1f0-025d4643fd29-cook-from-what-i-have-and-quick-dinners 2026-10-08 21:21:16 -04:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/MealQuest#148