Public Access
docs: Sprint 16.1 — _DAILY_LIMIT 140 → 45 follow-up across all 6 running docs
Sprint 16.1 (commit 11cfd46) is a one-line fix that lowers
_DAILY_LIMIT in backend/app/api/recipe_search.py:48 from
140.0 to 45.0. The 140 value was set assuming Spoonacular's
free tier is 150 pts/day; Sprint 15 round 1 proved the real
cap is 50 pts/day. The gate now triggers at 45 (5pt safety
margin), preventing the user from making requests that
would 503 after a 402 upstream roundtrip.
This commit updates the 6 running docs that track sprints:
- .agent/plan.md — Sprint 16.1 section appended to the
Sprint 16 sections.
- .agent/context.md — Sprint 16.1 decisions + file:line
references added.
- Review/sprint16-verification.md — Sprint 16.1 section
appended (one-line change + verification).
- Review/ui-nielsen-audit.md — Sprint 16.1 paragraph added
to the Sprint 16 status block.
- fix-ui-audit.md — T9.6 added to the Sprint 16 section.
- Review/handoff-ui-audit.md — TL;DR Sprint 16.1 line
added, Last-updated footer updated.
- docs/HANDOFF.md — Tracking docs reference updated to
include Sprint 16.1, Last-updated footer updated.
All 6 docs now reflect Sprint 16.1.
This commit is contained in:
@@ -91,3 +91,16 @@ Sprint 13 was a ~5-hour build (F9-lite) that silently never worked. The user pai
|
||||
- **Run seed_recipes.py round 4** for the 12 unrun round-1 queries (American + Mediterranean leftovers).
|
||||
- **Backend test infrastructure** — the venv on `docker-willester` is broken. Future sprint when fixed.
|
||||
- **CI integration of Vitest** — `npm test` runs locally but not in CI.
|
||||
|
||||
---
|
||||
|
||||
## Sprint 16.1 — Lower `_DAILY_LIMIT` 140 → 45 (2026-06-08, follow-up)
|
||||
|
||||
**Why:** the `_DAILY_LIMIT=140.0` in `backend/app/api/recipe_search.py:48` was set assuming Spoonacular's free tier was 150 pts/day. Sprint 15 round 1's `picked_count=0` after 28 queries proved the real cap is **50 pts/day**. The 140 value meant the backend's gate let requests through that Spoonacular then 402'd at the upstream — wasted user-facing time. Sprint 16.1 corrects the gate to 45 (50 - 5pt safety margin).
|
||||
|
||||
**One-line change:**
|
||||
- `backend/app/api/recipe_search.py:48` — `_DAILY_LIMIT: float = 45.0 # 50 free, leave 5pt safety margin (corrected from 140; Sprint 15 + Sprint 16)` (was `140.0 # 150 free, leave 10pt safety margin`).
|
||||
|
||||
**Verified:** `docker compose up -d --build backend` green. `GET /api/recipes/search?q=test&limit=1` returns 502 (Spoonacular 402 on upstream — expected when at the 50-pt cap). Backend's gate at 45 prevents the user from making a 47th request that would 503 instead of 502.
|
||||
|
||||
**Deploy:** `git pull` + `docker compose up -d --build backend` (no frontend change, no migration).
|
||||
|
||||
Reference in New Issue
Block a user