kiwi/tests/api
pyr0ball 896b4e048c feat: recipe scanner — photo to structured recipe (kiwi#9)
New feature: photograph a recipe card, cookbook page, or handwritten
note and have it extracted into a structured, editable recipe.

Backend:
- POST /recipes/scan: accept 1-4 photos, run VLM extraction, return
  structured JSON for review (not auto-saved)
- POST /recipes/scan/save: persist a reviewed/edited recipe
- GET/DELETE /recipes/user: user-created recipe CRUD
- Vision backend priority: cf-orch -> local Qwen2.5-VL -> Anthropic BYOK
- 503 with clear config hint when no vision backend available
- Multi-photo support: facing pages (ingredients/directions) sent together
- Pantry cross-reference: marks which ingredients are already on hand
- migration 041: user_recipes table (title, servings, cook_time, steps,
  ingredients JSON, source, pantry_match_pct)
- Tier gate: recipe_scan -> paid, BYOK-unlockable

Frontend:
- "Scan" button in the Recipes tab bar (camera icon)
- RecipeScanModal: upload step (drag-drop + file picker, up to 4 photos,
  live previews), processing step (spinner), review/edit step (all
  fields inline-editable before save), pantry match badge, warning banner
  for low-confidence or incomplete scans

Tests: 35 new tests (23 unit + 12 API), 404 total passing
2026-04-27 08:23:01 -07:00
..
__init__.py feat: recipe + staple API endpoints with tier gating 2026-03-31 12:49:38 -07:00
test_browse_time_effort.py feat(browse): active time estimation, prep scaling, required-ingredient filter 2026-04-27 07:13:12 -07:00
test_community_endpoints.py chore: commit in-progress work -- tag inferrer, imitate endpoint, hall-of-chaos easter egg, migration files, Dockerfile .env defense 2026-04-14 13:23:15 -07:00
test_feedback.py feat: migrate feedback endpoint to circuitforge-core router 2026-04-05 17:57:36 -07:00
test_label_capture.py feat: visual label capture for unenriched barcodes (kiwi#79) 2026-04-24 17:57:25 -07:00
test_meal_plans.py fix(meal-planner): validate meal_type path param, enforce store whitelist safety, add week_start date validation, make PrepTask frozen 2026-04-12 13:51:50 -07:00
test_orch_budget_in_recipes.py feat(kiwi): gate L3/L4 recipes behind orch budget check; fallback to L2 on exhaustion 2026-04-14 15:24:57 -07:00
test_orch_usage.py feat(kiwi): add /orch-usage proxy endpoint for frontend budget display 2026-04-14 15:42:58 -07:00
test_recipe_build_endpoints.py fix(tests): correct build endpoint test fixture 2026-04-14 14:57:16 -07:00
test_recipe_scan.py feat: recipe scanner — photo to structured recipe (kiwi#9) 2026-04-27 08:23:01 -07:00
test_recipes.py feat: recipe + staple API endpoints with tier gating 2026-03-31 12:49:38 -07:00
test_settings.py feat: time-first recipe entry (kiwi#52) 2026-04-24 10:15:58 -07:00
test_stream_token.py feat(streaming): add POST /recipes/stream-token endpoint 2026-04-24 10:22:30 -07:00