Commit Graph

6 Commits

Author SHA1 Message Date
Sven (AAMOS AI) b1b6eb994c feat(seed): import 246 verified recipes as committed seed catalog
- Convert C:\Users\Public\cibello-verified-final-result.json to
  packages/database/src/seed/data/verified-recipes.ts (committed, hermetic).
- Replace/extend the 23 placeholder SEED_RECIPES via re-export.
- Upsert on slug with onConflictDoUpdate of ALL recipe fields.
- Hard-reject recipes with unmapped canonical ingredients (0 rejected this batch).
- Derive allergens and compute nutrition per portion from ingredients at seed time.
- Run food-safety lint; auto-patch 8 legacy raw-protein recipes with safe-cooking phrase.
- Resolve 4 suspected title duplicates via variantOfSlug.
- Guard brand name: creatorDisplayName uses BRAND.name, never JSON placeholder.
- Preserve verificationStatus (editorial/verified) and source-registry FKs.
- Extend allergen-invariant test to cover full 246-recipe catalog.
- Stabilise API tests by disabling file parallelism (flakiness from shared DB state).

Refs: seed pipeline, brand-guard, safety canary
2026-08-11 00:47:08 +07:00
Sven (AAMOS AI) 881c5bb1e3 fix(worker): S2 proactive tips logic, i18n parity, hardened test DB reset
- processProactiveTips now iterates all expiring items sorted by urgency and
  emits the first candidate with a recipe that clears 7-day dedup.
- Add pt-PT proactive-tip templates; remove en-GB duplicate; parity test
  asserts against shared-types SUPPORTED_LANGUAGE_TAGS.
- Serialize DB test setup via turbo dependencies; seed truncates only *_test
  DBs, guarded by both --test flag and DB name suffix.
2026-08-10 04:35:22 +07:00
Sven (AAMOS AI) b40e1f9d90 fix(recipe-generation, database): allergen-blocker åtgärdad
- seed/run.ts uppdaterar nu ALLA canonical-ingrediensfält vid re-seed,
  inklusive allergens (tidigare uppdaterades bara nameSv/nutritionPer100).
- seed/run.ts härleder allergener för seed-recept från ALLA ingredienser,
  inte bara obligatoriska.
- verification.ts hård-avvisar inkompletta kandidater (saknar titel,
  ingredienser, steg, portioner eller tider) som rejected.
- Lägger allergen-invariant-test i @app/recipe-generation som verifierar
  att seed-receptens lagrade allergens matchar färsk derivering.
- Allergener omräknade för alla 246 recept; 0 mismatch återstår.
- Raderade 4 trasiga recept + 1 ordningsdubblett tidigare.
2026-08-10 01:52:57 +07:00
Sven (AAMOS AI) bcf932d2ff Fas 2 steg 2: Inventory Trust Engine - decay-profiler och cache-jobb 2026-08-06 23:25:32 +07:00
Sven (AAMOS AI) e5a9d72197 Lägesmedveten DB-URL: runtime endast DATABASE_URL, tester endast TEST_DATABASE_URL 2026-08-06 17:43:11 +07:00
Sven (AAMOS AI) ac5340195a Initial commit (unpacked platform) 2026-08-05 19:21:11 +07:00