kiwi/app/services/recipe
pyr0ball 1a7a94a344 feat(browse-counts): add pre-computed FTS counts cache with nightly refresh
Multiple concurrent users browsing the 3.2M recipe corpus would cause FTS5 page
cache contention and slow per-request queries. Solution: pre-compute counts for
all category/subcategory keyword sets into a small SQLite cache.

- browse_counts_cache.py: refresh(), load_into_memory(), is_stale() helpers
- config.py: BROWSE_COUNTS_PATH setting (default DATA_DIR/browse_counts.db)
- main.py: warms in-memory cache on startup; runs nightly refresh task every 24h
- infer_recipe_tags.py: auto-refreshes cache after a successful tag run so the
  app picks up updated FTS counts without a restart
2026-04-21 15:04:23 -07:00
..
__init__.py feat: ElementClassifier -- ingredient element tagging with heuristic fallback 2026-03-30 22:59:46 -07:00
assembly_recipes.py fix: save, shopping list, and route ordering for Build Your Own 2026-04-14 14:48:30 -07:00
browse_counts_cache.py feat(browse-counts): add pre-computed FTS counts cache with nightly refresh 2026-04-21 15:04:23 -07:00
browser_domains.py feat(browser): expand taxonomy keyword coverage for BBQ and regional subcategories 2026-04-21 15:04:13 -07:00
element_classifier.py fix: wire recipe corpus to cloud per-user DBs via SQLite ATTACH (#102) 2026-04-18 14:21:56 -07:00
grocery_links.py feat: saved recipes, recipe browser, and recipe detail panel 2026-04-08 14:35:02 -07:00
llm_recipe.py fix(recipe): fail fast on cf-orch 429 instead of slow LLMRouter fallback 2026-04-19 20:24:21 -07:00
locale_config.py feat(browser): expand cuisine taxonomy to 13 categories + 105 subcategories 2026-04-21 10:15:58 -07:00
recipe_engine.py feat: wire secondary-use window hints into recipe engine (#83) 2026-04-18 19:06:53 -07:00
staple_library.py fix: staple library — consistent tofu_firm slug, load error handling, typed yield_formats, expanded test coverage 2026-03-30 23:10:51 -07:00
style_adapter.py feat: recipe engine Phase 3 — StyleAdapter, LLM levels 3-4, user settings 2026-03-31 14:15:18 -07:00
substitution_engine.py fix: wire recipe corpus to cloud per-user DBs via SQLite ATTACH (#102) 2026-04-18 14:21:56 -07:00
tag_inferrer.py fix: recipe enrichment backfill, main_ingredient browser domain, bug batch 2026-04-18 15:38:56 -07:00