kiwi/tests/api
pyr0ball c9fcfde694
Some checks failed
CI / Backend (Python) (push) Waiting to run
CI / Frontend (Vue) (push) Waiting to run
Mirror / mirror (push) Has been cancelled
Release / release (push) Has been cancelled
feat(browse): active time estimation, prep scaling, required-ingredient filter
Time effort (time_effort.py):
- Passive defaults per cooking technique (bake 30 min, slow cook 300 min, etc.)
- Prep action detection with n^0.75 quantity scaling for prep-needing ingredients
- Cross-reference ingredients/ingredient_names arrays to distribute quantity across steps
- Effort label now time-based (quick ≤20 min, moderate ≤45 min, involved >45 min)
- prep_min field added to StepAnalysis schema and Pydantic model
- All parse_time_effort call sites updated to pass ingredients + ingredient_names

Browse required-ingredient filter:
- New required_ingredient query param on GET /recipes/browse/{domain}/{category}
- Enter-to-commit input in RecipeBrowserPanel with auto-clear-on-empty watch
- Substring match via FTS5 ingredient_names column prefix filter
- FTS5 replaces LIKE '%X%' throughout browse_recipes and _browse_by_match
- _all + required_ingredient: 8.4s → 74ms; category + required_ingredient: 2s → 35ms
- _ingredient_fts_term() helper builds 'ingredient_names : "X"*' prefix queries
- Combined keywords + ingredient into single FTS MATCH to avoid secondary scans

Tests: 369/369 passing
2026-04-27 07:13:12 -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_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