feat(worker): S2 proaktiva puffar (expiring-ingredient)
- Ny notification_type 'proactive_tip' och consent_kind 'notifications'.
- Dubbelgrind: personalization + notifications samtycke måste vara granted.
- Mallbaserade pufftexter i 12 språk; ingen fri AI-text.
- Led med nyttan ('gurkan börjar bli slapp — recept du brukar gilla').
- Max 1 puff/hushåll/dag; ingen upprepning av samma vara+recept inom 7 dagar.
- UTC för all datummatte; createdAt sätts explicit från processorns now.
- Ny worker-jobbtyp SEND_PROACTIVE_TIPS.
- Integrationstester för dubbelgrind, revoke, frekvens, duplicate, UTC.
- Migration 0022 + worker test script kör db:test-setup.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
"start": "node dist/index.js",
|
||||
"build": "tsup src/index.ts --format esm --target node22 --sourcemap --clean",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "vitest run --passWithNoTests",
|
||||
"test": "pnpm --filter=@app/database run db:test-setup && vitest run --passWithNoTests",
|
||||
"eval": "tsx src/eval/run.ts",
|
||||
"eval:scan": "tsx src/eval/scan-eval.ts"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user