feat(fleet): golden set + injection fixtures from real history (erp#39)
Seed the invoice-extract (T02) and mail-classify (T01) golden sets from real
Arcodange history, plus an adversarial injection suite and an offline
field-level scorer.
invoice-extract/
- 16 real supplier PDFs (DARNIS/Hiway F1040/F1042/F1045/F1046, Anthropic
invoice+receipt x2, Mistral, OVH, greffe d'Evry, INPI x2, Legalstart, Qonto,
Infogreffe) fetched from the Zoho mailbox + Dolibarr GED, each with a
hand-verified expected JSON per the T02 schema. Every expected value was
cross-checked against the pdftotext -layout text and re-validated against the
deterministic invariants (HT+TVA=TTC, per-rate sums, IBAN mod-97, SIREN Luhn).
- inputs/ carries both the source PDF and its {source_sha256, mime, text} pair.
- 6 SYNTHETIC injection fixtures (LLM-directive, hidden white text, IBAN-swap
BEC lure, arithmetic-repair lure, fake tool-call, ref-hijack duplicate) whose
only correct outcome is quarantine; each PDF is marked SYNTHETIC.
- score.py: stdlib-only field-level scorer, critical fields (amounts/IBAN/refs/
dates) scored separately against the 98% bar, injection leaks blocking; a
built-in --self-test proves it catches perturbed fields and leaks.
- manifest.json: per-item provenance (mail message id / GED path + sha256),
linked Dolibarr supplier invoice, a verification note, and the list of real
documents deliberately excluded (fee statements, payment proofs, La Poste
receipts with no HT/TVA breakdown) with reasons.
mail-classify/
- 1824 historical mails labeled into {supplier-invoice, bank-notice,
government-admin, client, other} via sender-domain + subject weak supervision,
one human-correctable JSONL line per message with confidence + reason +
message-id provenance. manifest.json records the pull method and distribution.
Docs: golden/README hub, invoice-extract/README (T02 schema + conventions),
injection/README (threat table), mail-classify/README (method + distribution).
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VRShc4QhLLU73FLHx9vskh
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"source_sha256": "c3a9f1c1ee527c4fa5f8bc45cf3a6667c237a08fedace8e890c36258771f6f28",
|
||||
"mime": "application/pdf",
|
||||
"text": " Justificatif de commande\n\n\nCommande N°60117-ZMHMT\nDu 17/01/2026\n3,20 € TTC\n\n\n\n\nClient Utilisateur Référence commande Référence commande client\n\n\[email protected] Gabriel Radureau 60117-ZMHMT\n\n\n\n\n Contenu de la commande\n\n\nARCODANGE 2,67 € HT (dont 0,54 € de frais d'émission)\n\n\n999657455\n\n\nARTICLES QUANTITÉ PRIX TOTAL HT\n\n\nExtrait KBIS 1 2,13 €\n\n\n Format électronique 0,54 €\n\n\n\n\n Paiement\n\n\nTotal commande HT Total TTC Type moyen de paiement Adresse de facturation\n\n\n2,67 € 3,20 € Carte bancaire Gabriel Radureau\n 73 BOULEVARD DE L'YERRES\nFrais d'émission HT Montant TVA 91000, Evry Courcouronnes\n France\n0,54 € 0,53 €\n\n\n\n\nINFOGREFFE, Immeuble Le Parisien - 5-7, avenue de Paris 94300 VINCENNES 1\nRegistre du Commerce et des Sociétés de CRETEIL : 338 885 718 - FR69338885718\n\f"
|
||||
}
|
||||
Reference in New Issue
Block a user