Log every unexpected recipe grounding failure by fixed reason
CI / ci (push) Successful in 2m41s
CI / ci (pull_request) Successful in 2m23s

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>
This commit is contained in:
2026-10-06 20:21:12 -04:00
co-authored by Claude Opus 5.5
parent 1dd53767f7
commit 82f8f668bf
4 changed files with 141 additions and 32 deletions
+2 -1
View File
@@ -202,7 +202,8 @@ func actorOrFail(w http.ResponseWriter, r *http.Request, logger *slog.Logger) (a
// up is 409 not_configured; a search or model failure is 502; grounding by
// hand that runs past dinners.GroundTimeout is 504 ground_timeout; grounding
// an archived dinner is 409 dinner_archived and one changed while grounding
// 409 ground_conflict. Any other grounding failure is 500, logged by reason
// 409 ground_conflict. Any other grounding failure, by candidate, link or
// manual recipe, wraps dinners.ErrGroundFailed and is 500, logged by reason
// and dinner id only.
func writeDinnerError(w http.ResponseWriter, r *http.Request, logger *slog.Logger, action string, err error) {
var invalid *dinners.ValidationError