Phase 1 ops core: base blocks, feedback, canary fixes

- Add app/ekonomi/anvandare/prenumerationer/butik/feedback blocks to computeOpsSummary.
- New feedback table, POST /api/feedback, GDPR erasure wiring.
- Canary: only count unverified/rejected published recipes; treat verified/editorial as safe.
- Add 'rejected' recipe verification status enum value.
- Fix food-safety lint baseline: remove egg/cured fish from raw-protein list, relax
  genomstekt regex, add safe-cooking phrases to seed recipes.
- Seed recipes now get verificationStatus=editorial.
- Tests: ops summary blocks, feedback route, me.residual cleanup.
This commit is contained in:
Sven (AAMOS AI)
2026-08-10 06:35:51 +07:00
parent 8f20b2ef1b
commit 4687f46384
16 changed files with 606 additions and 44 deletions
+2 -5
View File
@@ -11,16 +11,13 @@ const RAW_PROTEIN_REQUIRING_SAFE_COOKING = new Set([
"minced_mixed",
"meatball_pork_beef",
"falukorv",
"egg",
"cod",
"salmon",
"shrimp",
"anchovy_swedish",
"pickled_herring",
]);
const SAFE_COOKING_KEYWORDS_SV = [
/\bgenomstekt\b/i,
/\bgenomstek/i,
/\bgenomkokt\b/i,
/\bgenomgrillad\b/i,
/\bgenomv\w+\b/i,
@@ -170,7 +167,7 @@ export async function processSafetyCanary(ctx: WorkerContext): Promise<SafetyCan
.where(
and(
eq(schema.recipes.status, "published"),
ne(schema.recipes.verificationStatus, "verified"),
sql`${schema.recipes.verificationStatus} IN ('unverified', 'rejected')`,
),
);
const overifieradeVisade = publicUnverified[0]?.count ?? 0;