chahinebrini
c3de7055a5
feat(mail): Sucht-Compound-Regel + Phase-1-Training-Foundation
Task B — linguistische FP-Fix:
- mail-classifier.ts: Subject-Keyword-Loop überspringt Keyword-Score wenn
Subject das Keyword als Sucht-Compound enthält (z.B. "glücksspiel" in
"Glücksspielsucht" → kein +50 Score). Globale linguistische Invariante
Deutsch — Gambling-Marketer schreiben nie "Glücksspielsucht-Bonus".
- gambling-keywords.mjs: GAMBLING_WHITELIST erweitert um Stamm-Varianten
(wettsucht, spielsucht, suchtberatung, suchthilfe) als Fallback für
Compounds wo keyword ≠ exakter Stamm.
- 4 neue Tests: Forum Glücksspielsucht → PASS, Hilfe bei Spielsucht → PASS,
Wettsucht-Selbsthilfe → PASS, Glücksspiel-Bonus 100€ → BLOCK.
Task C — Phase-1-Data-Foundation:
- mail-training-utils.ts: sanitizeSubjectForTraining() (PII-Stripping via
Regex: EMAIL/URL/NUM/Greeting/ALL-CAPS) + detectSubjectLanguage() via
franc (iso639-3). 26 Unit-Tests.
- franc@6.2.0 installiert (~50KB ESM).
- mail.ts insertMailClassificationSample(): ruft sanitizeSubjectForTraining()
auf, schreibt detectedLang + subjectSanitized in features-JSON
(Interim bis Schema-Migration).
- mail-retention-cron.ts: Subject-Nullification nach 30 Tagen (täglich) +
Sample-Purge nach 12 Monaten (monatlich). DSGVO Art. 5 Abs. 1e.
105 Tests grün (58 classifier + 26 training-utils + 11 display-name + 10 gmail).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 08:14:57 +02:00
..
2026-05-08 22:30:03 +02:00
2026-05-09 15:48:35 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-17 23:48:25 +02:00
2026-05-13 16:35:18 +02:00
2026-05-06 07:13:43 +02:00
2026-05-25 07:11:47 +02:00
2026-05-16 00:29:35 +02:00
2026-05-17 17:48:05 +02:00
2026-05-28 16:07:05 +02:00
2026-05-06 07:13:43 +02:00
2026-05-29 08:14:57 +02:00
2026-05-09 15:48:35 +02:00
2026-05-06 07:13:43 +02:00
2026-05-26 00:46:44 +02:00
2026-05-15 22:41:17 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-06 07:13:43 +02:00
2026-05-09 16:28:36 +02:00