Fixes the independent Codex feature review of PR #94 at cc7875c (CHANGES_REQUIRED).
Commits authored by dev_agent (Claude Code, isolated worktree); this PR record was opened by
orchestrator-agent because the developer session has no non-owner Gitea identity.
F1 (HIGH), repair write race:
GroundDinner now writes only an unarchived dinner whose normalized_name, grounding_status, grounding_revision and recipe_id still match what the repair read
before grounding.
A dinner renamed or grounded some other way meanwhile -> 409 ground_conflict.
A dinner archived, before or during the repair -> 409 dinner_archived. Manual repairs
reject archived dinners too.
In each case the dinner is left unchanged.
Tests: TestFixInFlightWhenDinnerChanges (repair held at fetch while the dinner is renamed
/ archived / grounded by hand), TestFixArchivedDinner, TestPostGroundArchived.
F2 (MEDIUM), URL in logs:
Hand-grounding failures wrap dinners.ErrGroundFailed; the API logs these as reason=ground_failed with dinner_id only, never the pasted link or dependency error text.
GroundURL no longer formats the link into its error.
Test: TestPostGroundViaRecipeURLStorageFailure (storage failure on a link carrying ?access_token=...; the response and logs contain neither the token, the host nor the
storage error).
Done-condition: both findings fixed with tests that fail at cc7875c and pass here.
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: `8741cedb-1849-4e3f-8d05-f5648c77c7ee`
Base: `feature/2066f34b-5804-410a-859b-f87021a8ae6c-regular-dinners-onboarding`
Fixes the independent Codex feature review of PR #94 at `cc7875c` (CHANGES_REQUIRED).
Commits authored by dev_agent (Claude Code, isolated worktree); this PR record was opened by
orchestrator-agent because the developer session has no non-owner Gitea identity.
F1 (HIGH), repair write race:
- `GroundDinner` now writes only an unarchived dinner whose `normalized_name`,
`grounding_status`, `grounding_revision` and `recipe_id` still match what the repair read
before grounding.
- A dinner renamed or grounded some other way meanwhile -> 409 `ground_conflict`.
- A dinner archived, before or during the repair -> 409 `dinner_archived`. Manual repairs
reject archived dinners too.
- In each case the dinner is left unchanged.
- Tests: `TestFixInFlightWhenDinnerChanges` (repair held at fetch while the dinner is renamed
/ archived / grounded by hand), `TestFixArchivedDinner`, `TestPostGroundArchived`.
F2 (MEDIUM), URL in logs:
- Hand-grounding failures wrap `dinners.ErrGroundFailed`; the API logs these as
`reason=ground_failed` with `dinner_id` only, never the pasted link or dependency error text.
- `GroundURL` no longer formats the link into its error.
- Test: `TestPostGroundViaRecipeURLStorageFailure` (storage failure on a link carrying
`?access_token=...`; the response and logs contain neither the token, the host nor the
storage error).
Done-condition: both findings fixed with tests that fail at `cc7875c` and pass here.
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.
F1: A candidate or link repair now writes the dinner only if it is still
unarchived and as observed before grounding (normalized_name,
grounding_status, grounding_revision and recipe_id). A dinner renamed or
grounded some other way meanwhile is ErrGroundConflict (409
ground_conflict); one archived, before or during the repair, is
ErrArchived (409 dinner_archived). Manual repairs reject archived dinners
too.
F2: Any failure grounding a candidate or link by hand wraps
ErrGroundFailed, which the API logs as reason=ground_failed with the
dinner id only, never the pasted link or dependency error text.
GroundURL no longer formats the link into its error.
Maestro task 8741cedb-1849-4e3f-8d05-f5648c77c7ee.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
F1-1: GroundDinner also compares the observed raw name, so renaming
"Grandma's stew" to "Easy Grandma's stew" (same normalized_name) while a
link is grounding is ErrGroundConflict, not attached to the renamed
dinner.
F1-2: A method, minutes_total or difficulty no longer as observed before
grounding is kept over the recipe's value, as GroundPendingDinner keeps
values a member set while a dinner was pending.
F2-1: Failing to record a grounded candidate or link on the dinner (or to
read it back after a rejected write) wraps ErrGroundFailed, so the API
logs reason=ground_failed with the dinner id, never the database error.
Maestro task 8741cedb-1849-4e3f-8d05-f5648c77c7ee.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wrap an initial dinner read failure on the candidate and link path, and
any manual-recipe read, store or write failure, in ErrGroundFailed so the
handler logs only reason=ground_failed and the dinner id, never database
text. Not-found, archived and conflict answers stay distinct.
Strengthen TestFixInFlightKeepsMemberEdits: start from populated method,
minutes and difficulty, edit each in flight in turn, and require the edit
kept and the untouched populated fields replaced by the recipe's values.
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:
8741cedb-1849-4e3f-8d05-f5648c77c7eeBase:
feature/2066f34b-5804-410a-859b-f87021a8ae6c-regular-dinners-onboardingFixes the independent Codex feature review of PR #94 at
cc7875c(CHANGES_REQUIRED).Commits authored by dev_agent (Claude Code, isolated worktree); this PR record was opened by
orchestrator-agent because the developer session has no non-owner Gitea identity.
F1 (HIGH), repair write race:
GroundDinnernow writes only an unarchived dinner whosenormalized_name,grounding_status,grounding_revisionandrecipe_idstill match what the repair readbefore grounding.
ground_conflict.dinner_archived. Manual repairsreject archived dinners too.
TestFixInFlightWhenDinnerChanges(repair held at fetch while the dinner is renamed/ archived / grounded by hand),
TestFixArchivedDinner,TestPostGroundArchived.F2 (MEDIUM), URL in logs:
dinners.ErrGroundFailed; the API logs these asreason=ground_failedwithdinner_idonly, never the pasted link or dependency error text.GroundURLno longer formats the link into its error.TestPostGroundViaRecipeURLStorageFailure(storage failure on a link carrying?access_token=...; the response and logs contain neither the token, the host nor thestorage error).
Done-condition: both findings fixed with tests that fail at
cc7875cand pass here.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: APPROVED for this exact commit.