Fixes the independent Codex feature review of PR #94 at 5dff782 (CHANGES_REQUIRED).
Commits authored by dev_agent; this PR record was opened by orchestrator-agent because the
developer session has no non-owner Gitea identity.
F1 (HIGH):
A pasted recipe link can carry a personal token in its query string. fromRow copied the
stored recipe_url into every dinner response (create, list, get, patch, ground, and the existing dinner in a 409 duplicate response), so it reached other signed-in household
clients and the PWA's cache of dinner reads.
recipe_url is removed from the public dinners.Dinner struct, so every response path is
fixed by one mechanism with no per-handler omission logic. The link stays in the database and
grounding, repair and duplicate checks continue to read it from there.
Tests: TestCreateDinnerByURL and TestCreateDinnerByName now assert the field is absent;
new TestDinnerResponsesHideRecipeURL posts https://c.example/recipes/stew?access_token=personal-token-abc123 and asserts neither the
create nor the list response contains the link, host, token or key, while the stored link is
kept. All three fail at 5dff782.
The PWA never read recipe_url from a response; web mock fixtures were updated to match the
API (test-only).
Done-condition: recipe_url is absent from every public dinner response while still driving
grounding.
Checks: gofmt clean, go vet, go test -race -count=1 ./..., CGO_ENABLED=0 go build ./..., make sqlc-check, web typecheck/test (533)/build - all passing.
Maestro task: `0d863d7a-7991-484b-93ca-2aa84bd9f24d`
Base: `feature/2066f34b-5804-410a-859b-f87021a8ae6c-regular-dinners-onboarding`
Fixes the independent Codex feature review of PR #94 at `5dff782` (CHANGES_REQUIRED).
Commits authored by dev_agent; this PR record was opened by orchestrator-agent because the
developer session has no non-owner Gitea identity.
F1 (HIGH):
- A pasted recipe link can carry a personal token in its query string. `fromRow` copied the
stored `recipe_url` into every dinner response (create, list, get, patch, ground, and the
`existing` dinner in a 409 duplicate response), so it reached other signed-in household
clients and the PWA's cache of dinner reads.
- `recipe_url` is removed from the public `dinners.Dinner` struct, so every response path is
fixed by one mechanism with no per-handler omission logic. The link stays in the database and
grounding, repair and duplicate checks continue to read it from there.
- Tests: `TestCreateDinnerByURL` and `TestCreateDinnerByName` now assert the field is absent;
new `TestDinnerResponsesHideRecipeURL` posts
`https://c.example/recipes/stew?access_token=personal-token-abc123` and asserts neither the
create nor the list response contains the link, host, token or key, while the stored link is
kept. All three fail at `5dff782`.
- The PWA never read `recipe_url` from a response; web mock fixtures were updated to match the
API (test-only).
Done-condition: `recipe_url` is absent from every public dinner response while still driving
grounding.
Checks: gofmt clean, `go vet`, `go test -race -count=1 ./...`, `CGO_ENABLED=0 go build ./...`,
`make sqlc-check`, web typecheck/test (533)/build - all passing.
A pasted recipe link may carry a personal token in its query, and the
dinners API returned it from create, list, get, patch and ground, where
other household clients and the PWA's cache of dinner reads could keep
it. Drop recipe_url from the public Dinner shape so it stays in the
database for grounding and dedupe only.
TestCreateDinnerByURL and TestCreateDinnerByName now assert the field is
absent; TestDinnerResponsesHideRecipeURL creates a Regular from a
token-bearing link and checks neither the create nor the list response
holds the link, host or token while the stored link remains.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F1: bump the service worker cache version to v2 so activate deletes the
v1 API cache, whose dinner responses still carried the pasted recipe_url
and could be served offline.
F2: nameFromURL now drops words holding a digit and ends the name at the
first credential word (token, access, secret, ...), so a token in the
link's last path segment never reaches the public dinner name.
/recipes/beef-stew is still "Beef stew".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep only words of at most 20 letters from the link's last path segment,
so punctuated or long token text such as /stew-t=abcdef never reaches
the dinner name, and stop at combined credential words like accesstoken.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F2: one shared cache version renamed every cache, so the v2 bump that
drops the v1 API cache (dinner responses with the pasted recipe_url) also
deleted saved photos, fonts and the precache. Each cache now carries its
own version in cacheVersions; only api is v2, so activate deletes
mealquest-api-v1 and keeps mealquest-precache-v1, -media-v1 and -fonts-v1.
F3: replace the source-text activation test with src/sw.test.ts, which
loads the worker with the Workbox precache and router stubbed, dispatches
activate against mocked Cache Storage, and asserts caches.delete is called
for mealquest-api-v1 only. tsconfig.sw.json type-checks the test with the
worker's types.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pasted link may carry a personal token anywhere in its path, so no part
of it can safely name a dinner: the slug heuristic always let some plain
words through. POST /api/v1/dinners now takes {name} or {name, recipe_url};
a link without a name is 400 invalid_dinner, and nameFromURL is gone. The
link is still kept only for grounding and for the recipe-link duplicate
rule. Name-created Regulars, grounding, and the rename rules are unchanged.
On the Regulars screen, pasting a link shows a "Dinner name" field, and
Add stays disabled until it is filled. The optimistic row shows that name,
never the link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Maestro task:
0d863d7a-7991-484b-93ca-2aa84bd9f24dBase:
feature/2066f34b-5804-410a-859b-f87021a8ae6c-regular-dinners-onboardingFixes the independent Codex feature review of PR #94 at
5dff782(CHANGES_REQUIRED).Commits authored by dev_agent; this PR record was opened by orchestrator-agent because the
developer session has no non-owner Gitea identity.
F1 (HIGH):
fromRowcopied thestored
recipe_urlinto every dinner response (create, list, get, patch, ground, and theexistingdinner in a 409 duplicate response), so it reached other signed-in householdclients and the PWA's cache of dinner reads.
recipe_urlis removed from the publicdinners.Dinnerstruct, so every response path isfixed by one mechanism with no per-handler omission logic. The link stays in the database and
grounding, repair and duplicate checks continue to read it from there.
TestCreateDinnerByURLandTestCreateDinnerByNamenow assert the field is absent;new
TestDinnerResponsesHideRecipeURLpostshttps://c.example/recipes/stew?access_token=personal-token-abc123and asserts neither thecreate nor the list response contains the link, host, token or key, while the stored link is
kept. All three fail at
5dff782.recipe_urlfrom a response; web mock fixtures were updated to match theAPI (test-only).
Done-condition:
recipe_urlis absent from every public dinner response while still drivinggrounding.
Checks: gofmt clean,
go vet,go test -race -count=1 ./...,CGO_ENABLED=0 go build ./...,make sqlc-check, web typecheck/test (533)/build - all passing.Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
Independent Codex gpt-6-sol review: CHANGES_REQUIRED for this exact commit.
A pasted link may carry a personal token anywhere in its path, so no part of it can safely name a dinner: the slug heuristic always let some plain words through. POST /api/v1/dinners now takes {name} or {name, recipe_url}; a link without a name is 400 invalid_dinner, and nameFromURL is gone. The link is still kept only for grounding and for the recipe-link duplicate rule. Name-created Regulars, grounding, and the rename rules are unchanged. On the Regulars screen, pasting a link shows a "Dinner name" field, and Add stays disabled until it is filled. The optimistic row shows that name, never the link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>Independent Codex gpt-6-sol review: APPROVED for this exact commit.