Dinners API for Regulars #89

Member

Maestro task: 28d3cb4b-83d1-40e8-991f-d88f0f64d270 (Feature 12 - Regular Dinners and Onboarding).

Done-condition

POST /api/v1/dinners accepts {name} or {recipe_url} and creates a dinner with status regular, origin regular and grounding_status pending, rejecting duplicates by harness-normalized name with 409; GET /dinners?status=regular|quest_log lists dinners with photo URLs and grounding status; PATCH /dinners/{id} edits name/method/minutes/difficulty; DELETE archives (status archived) rather than deleting rows; POST /dinners/{id}/favorite toggles is_favorite. Every write records updated_by from the session. API tests cover create by name, create by URL, duplicate 409, list filtering, patch validation, archive, favorite and CSRF enforcement. Go quality floor passes.

Evidence

  • New internal/dinners service + HTTP routes wired into NewRouter/cmd-server; duplicate detection uses the harness Normalize/Similar; normalized_name set on create/edit; archived dinners are skipped by the duplicate check; writes record updated_by from the session.
  • gofmt/vet/go test -race/build pass; sqlc no drift if touched; endpoints exercised through the real router against real SQLite (no live sign-in available).

Changed a shared error string in internal/server/settings.go from "invalid settings: ..." to "invalid request body: ..." (no tests depended on it).

Maestro task: 28d3cb4b-83d1-40e8-991f-d88f0f64d270 (Feature 12 - Regular Dinners and Onboarding). ## Done-condition POST /api/v1/dinners accepts {name} or {recipe_url} and creates a dinner with status regular, origin regular and grounding_status pending, rejecting duplicates by harness-normalized name with 409; GET /dinners?status=regular|quest_log lists dinners with photo URLs and grounding status; PATCH /dinners/{id} edits name/method/minutes/difficulty; DELETE archives (status archived) rather than deleting rows; POST /dinners/{id}/favorite toggles is_favorite. Every write records updated_by from the session. API tests cover create by name, create by URL, duplicate 409, list filtering, patch validation, archive, favorite and CSRF enforcement. Go quality floor passes. ## Evidence - New internal/dinners service + HTTP routes wired into NewRouter/cmd-server; duplicate detection uses the harness Normalize/Similar; normalized_name set on create/edit; archived dinners are skipped by the duplicate check; writes record updated_by from the session. - gofmt/vet/go test -race/build pass; sqlc no drift if touched; endpoints exercised through the real router against real SQLite (no live sign-in available). Changed a shared error string in internal/server/settings.go from "invalid settings: ..." to "invalid request body: ..." (no tests depended on it).
dev_agent added 1 commit 2026-10-06 15:47:34 -04:00
Add the dinners API for Regulars
CI / ci (push) Successful in 2m11s
CI / ci (pull_request) Successful in 2m12s
9ba9b1d089
POST /api/v1/dinners adds a Regular from a name or a recipe link
(status and origin regular, grounding_status pending), refusing a name
harness.Similar to an unarchived dinner, or a known link, with 409.
GET /dinners?status=regular|quest_log lists dinners with photo URLs and
grounding status; PATCH /dinners/{id} edits name, method, minutes and
difficulty; DELETE archives the row; POST /dinners/{id}/favorite toggles
is_favorite. Every write records the session subject as updated_by.

Migration 0008 adds dinners.recipe_url so a pasted link is kept until
grounding resolves it.

Maestro task 28d3cb4b-83d1-40e8-991f-d88f0f64d270.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
overseer added 1 commit 2026-10-06 15:47:35 -04:00
Add the dinners API for Regulars
CI / ci (push) Successful in 2m11s
CI / ci (pull_request) Successful in 2m12s
9ba9b1d089
POST /api/v1/dinners adds a Regular from a name or a recipe link
(status and origin regular, grounding_status pending), refusing a name
harness.Similar to an unarchived dinner, or a known link, with 409.
GET /dinners?status=regular|quest_log lists dinners with photo URLs and
grounding status; PATCH /dinners/{id} edits name, method, minutes and
difficulty; DELETE archives the row; POST /dinners/{id}/favorite toggles
is_favorite. Every write records the session subject as updated_by.

Migration 0008 adds dinners.recipe_url so a pasted link is kept until
grounding resolves it.

Maestro task 28d3cb4b-83d1-40e8-991f-d88f0f64d270.

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 729c5bd0fe into feature/2066f34b-5804-410a-859b-f87021a8ae6c-regular-dinners-onboarding 2026-10-06 15:57:14 -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#89