Release corrections round 3: redact candidate-lookup failures in logs #104

Merged
approver_agent merged 1 commits from task/release-corrections-3_3759a975-f937-4284-81a2-9e61345a3aa3 into dev 2026-10-07 00:40:54 -04:00
Member

Fixes the finding from the third independent release review of promotion PR #98 at head a27ef6a. Maestro task: 3759a975-f937-4284-81a2-9e61345a3aa3.

  • MQ-98-06 (HIGH): the recipe-candidates endpoint could log the full search-result URL (which may carry a token) when a stored-recipe lookup failed, because storedRow formats the source URL into its errors and the endpoint's default handler logged that error unchanged. Candidate failures now log a fixed reason with the dinner id, never the URL, host or database text; the specific not-found/archived/conflict/invalid responses stay distinct. A regression test uses a token-bearing candidate URL with a failing stored-recipe lookup and asserts none of the URL, host, token or database text appears in the log or the response.

Checks: gofmt clean, go vet, go test -race -count=1 ./..., CGO_ENABLED=0 go build ./..., make sqlc-check (no drift), make build, docker build ., web typecheck + 537 tests + build - all pass.

Fixes the finding from the third independent release review of promotion PR #98 at head `a27ef6a`. Maestro task: `3759a975-f937-4284-81a2-9e61345a3aa3`. - MQ-98-06 (HIGH): the recipe-candidates endpoint could log the full search-result URL (which may carry a token) when a stored-recipe lookup failed, because `storedRow` formats the source URL into its errors and the endpoint's default handler logged that error unchanged. Candidate failures now log a fixed reason with the dinner id, never the URL, host or database text; the specific not-found/archived/conflict/invalid responses stay distinct. A regression test uses a token-bearing candidate URL with a failing stored-recipe lookup and asserts none of the URL, host, token or database text appears in the log or the response. Checks: gofmt clean, go vet, go test -race -count=1 ./..., CGO_ENABLED=0 go build ./..., make sqlc-check (no drift), make build, docker build ., web typecheck + 537 tests + build - all pass.
orchestrator-agent added 1 commit 2026-10-07 00:34:07 -04:00
Redact recipe-candidate failures in logs
CI / ci (push) Successful in 2m29s
CI / ci (pull_request) Successful in 2m41s
9cb8812ad8
A recipe-candidates request whose stored-recipe lookup failed logged the
error unchanged, and that error quotes the search result's URL, which can
carry a personal token, along with the database error text.

dinners.Service.Candidates now wraps every failure other than a missing
dinner in ErrCandidatesFailed, and writeDinnerError logs it as a fixed
reason (candidates_failed) with the dinner id only, answering 500
internal. Not-found, not-configured and search-failed responses are
unchanged.

Fixes MQ-98-06 (Maestro 3759a975-f937-4284-81a2-9e61345a3aa3).

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 ac7453f576 into dev 2026-10-07 00:40:54 -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#104