@@ -5,57 +5,61 @@ Based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
55
66---
77
8- ## [ 2.0.0+] — 2026-05-15 (post-2.0.0, branche ` v2.0.0 ` )
8+ ## [ 2.0.0+] — 2026-05-15 (post-2.0.0, branch ` v2.0.0 ` )
99
10- ** 🔬 Issue #17 — Backlog consolidateur ** : implémentation des 2 mitigations
11- laissées en backlog par v1.9.0 (validation post-pass ` unattributed_claims_count `
12- + marker ` [inféré] ` pour la traçabilité des inférences ). Aucun bump de version :
13- ces ajouts sont ** opt-in** (zéro impact pour les déploiements existants ).
10+ ** 🔬 Issue #17 — Consolidator backlog ** : implementation of the 2 mitigations
11+ left in backlog by v1.9.0 (post-pass validation ` unattributed_claims_count `
12+ + ` [inféré] ` marker for inference traceability ). No version bump: these
13+ additions are ** opt-in** (zero impact for existing deployments ).
1414
1515### Added
1616
17- - ** Pass de validation post-consolidation** (` src/live_mem/core/consolidator.py ` ) :
18- nouvelle fonction ` _validate_unattributed_claims() ` qui compare la bank
19- avant/après chaque batch consolidé et compte les "claims" (faits chiffrés,
20- dates, versions, refs PR/issue, statuts forts) qui ne sont ni sourcés dans
21- les notes du batch ni explicitement marqués ` [inféré] ` . Approche
22- ** code-only** (regex + diff par ligne) : déterministe, zéro token LLM,
23- observable via le champ ` validation ` du retour de ` bank_consolidate ` .
24- - ** Règle #8 du SYSTEM_PROMPT — Markers ` [inféré] ` ** : le LLM consolidateur
25- doit désormais annoter chaque fait produit par inférence transitive
26- (règle #7 ) avec le marker ` [inféré] ` . Le marker sert d'attribution
27- explicite et garantit que le pass de validation ne flagge pas ces lignes.
28- - ** Nouvelles ENV vars opt-in** (defaults sûrs, désactivé par défaut) :
29- - ` CONSOLIDATION_VALIDATION_ENABLED=false ` — active la pass de validation
30- et l'ajout du bloc ` validation ` dans la réponse MCP.
31- - ` CONSOLIDATION_VALIDATION_MAX_EXAMPLES=20 ` — borne le nombre d'exemples
32- de claims non sourcés remontés (protège la taille du payload).
17+ - ** Post-consolidation validation pass** (` src/live_mem/core/consolidator.py ` ):
18+ new ` _validate_unattributed_claims() ` function comparing the bank
19+ before/after each consolidated batch and counting "claims" (numeric
20+ metrics, dates, versions, PR/issue refs, strong status keywords) that
21+ are neither sourced from a batch note nor explicitly tagged ` [inféré] ` .
22+ ** Code-only approach** (regex + per-line diff): deterministic, zero
23+ additional LLM tokens, observable via the ` validation ` field of the
24+ ` bank_consolidate ` response.
25+ - ** SYSTEM_PROMPT rule #8 — ` [inféré] ` markers** : the LLM consolidator
26+ must now annotate every fact produced by transitive inference (rule #7 )
27+ with the ` [inféré] ` marker. The marker serves as explicit attribution
28+ and ensures the validation pass does not flag those lines as unsourced.
29+ Note: the SYSTEM_PROMPT is kept in French for consistency with the
30+ 7 other anti-hallucination rules already defined in French in v1.9.0.
31+ - ** New opt-in ENV vars** (safe defaults, disabled by default):
32+ - ` CONSOLIDATION_VALIDATION_ENABLED=false ` — enables the validation pass
33+ and the addition of the ` validation ` block in the MCP response.
34+ - ` CONSOLIDATION_VALIDATION_MAX_EXAMPLES=20 ` — bounds the number of
35+ unsourced-claim examples returned (protects the payload size).
3336
3437### Tests
3538
36- - ** ` tests/test_issue17_validation.py ` ** : 53 tests anti-complaisants
37- couvrant les helpers (` _extract_claim_tokens ` , ` _has_strong_status_claim ` ,
38- ` _normalize_for_match ` , ` _INFERRED_MARKER_RE ` ), la fonction
39- ` _validate_unattributed_claims ` (happy paths, détection d'hallucinations,
40- bornage des exemples, diff-only), la présence de la règle # 8 dans le
41- SYSTEM_PROMPT, et la configuration opt-in.
42- - ** Suite globale ** : ** 346/346 PASS** (293 existants + 53 nouveaux ). Aucune
43- régression sur ` test_security_hardening_v2.py ` (122 tests v2.0.0),
44- ` test_tokens.py ` , ` test_proxy.py ` , ou les autres suites.
39+ - ** ` tests/test_issue17_validation.py ` ** : 53 non-complacent tests covering
40+ the helpers (` _extract_claim_tokens ` , ` _has_strong_status_claim ` ,
41+ ` _normalize_for_match ` , ` _INFERRED_MARKER_RE ` ), the
42+ ` _validate_unattributed_claims ` function (happy paths, hallucination
43+ detection by counter-proof, example bounding, diff-only), the presence
44+ of rule # 8 in the SYSTEM_PROMPT, and the opt-in configuration .
45+ - ** Global suite ** : ** 346/346 PASS** (293 existing + 53 new ). No
46+ regression on ` test_security_hardening_v2.py ` (122 v2.0.0 tests ),
47+ ` test_tokens.py ` , ` test_proxy.py ` , or other suites.
4548
4649### Fixed
4750
48- - ** Regex ` _METRIC_RE ` ** : ajout de ` (?=\W|$) ` pour matcher correctement
49- les métriques se terminant par ` % ` (ex: ` 80% ` ), ` \b ` étant inopérant
50- entre ` % ` et un espace. Ajout de ` [.,/]\d+ ` dans le motif numérique pour
51- matcher ` 171/171 ` comme une seule métrique .
52- - ** ` _STATUS_KEYWORDS ` ** : enrichi des formes fléchies françaises (féminin
53- singulier/pluriel : ` fermée ` , ` résolue ` , ` mergée ` , ` publiée ` , ` déployée ` ,
54- ` validée ` , etc.) car ` \b ` Python exige une frontière ` \w↔non-\w ` en fin
55- de mot, ce qui ne fonctionne pas avec une racine accentuée suivie de ` e ` .
51+ - ** ` _METRIC_RE ` regex ** : added ` (?=\W|$) ` to correctly match metrics
52+ ending with ` % ` (e.g. ` 80% ` ), since ` \b ` is inoperative between ` % `
53+ and a space. Added ` [.,/]\d+ ` in the numeric pattern to match
54+ ` 171/171 ` as a single metric .
55+ - ** ` _STATUS_KEYWORDS ` ** : enriched with French inflected forms (feminine
56+ singular/plural : ` fermée ` , ` résolue ` , ` mergée ` , ` publiée ` , ` déployée ` ,
57+ ` validée ` , etc.) because Python's ` \b ` requires a ` \w↔non-\w ` boundary
58+ at word-end, which does not work for accented roots followed by ` e ` .
5659
5760---
5861
62+
5963## [ 2.0.0] — 2026-05-15
6064
6165
0 commit comments