Public Access
2.6 KiB
2.6 KiB
Lower-Calorie Recipe Catalog
Goal
Keep every app-owned starter recipe at an estimated 500 kcal or less per serving through credible ingredient changes, and durably quarantine the separate Wikibooks Rigatoni recipe.
Phase 1: Catalog And Loader
- Recalculate all 50 recipes from their ingredient quantities and document assumptions for meats and packaged foods.
- Reduce fats, cheese, starches, or fatty meat in affected recipes without shrinking stated servings or weakening food-safety instructions.
- Enforce the 500-kcal ceiling in bundled-catalog validation and test the real JSON.
- Add an explicit atomic update mode that preserves Recipe and MealPlanItem IDs, rejects incomplete catalogs, and rolls back on failure.
- Make operator-quarantined catalog findings survive future catalog audit runs.
Phase 2: Verification And Production
- Run offline and disposable-PostgreSQL update, rollback, concurrency, and history-preservation tests.
- Back up production and dry-run the in-place update.
- Update all 50 bundled recipes atomically and quarantine the exact approved Rigatoni row with an operator finding.
- Verify 50 active bundled recipes, zero active recipes above 500 kcal, preserved historical references, and healthy backend/scheduler.
Done When
- Ingredient quantities and displayed calorie estimates agree with the lower-calorie formulations.
- Existing recipe IDs and historical meal-plan links are preserved.
- Rigatoni remains quarantined even after a catalog audit.
Notes
- Calorie values remain estimates, not medical nutrition claims.
- Do not lower values without changing the underlying formulation when needed.
Phase 1 Verification
- Real v2 catalog: 50 recipes, estimated range 310-500 kcal per serving, zero above 500.
- Offline tests: 9 passed.
- Disposable PostgreSQL tests: 34 passed; database dropped.
- Compilation and scoped diff checks passed.
- Final review found no P1/P2 issues.
Phase 2 Verification
- Verified backup:
backups/pre_lower_calorie_catalog_20260828T004802Z.dump(4.4 MB, validpg_restore --list). - Production update validated 50 recipes, created no recipes, and updated 29 drifted rows atomically.
- Post-update dry-run reports zero pending creates or updates.
- All 50 bundled recipes are active at an estimated 310-500 kcal per serving.
- Bundled Recipe ID hash, all 790 MealPlanItem rows, and 4 bundled historical references are unchanged.
- Rigatoni is quarantined with the exact operator finding; its approved staging link remains and a future audit simulation preserves quarantine.
- Backend is healthy and scheduler is running.