feat(memory): memory_promoted/memory_promotion_declined decision types (F8 emits)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 13:22:07 +02:00
co-authored by Claude Fable 5
parent ccc4f4c9dd
commit cadbdf177a
3 changed files with 32 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
"""L1: gate di promozione memorie (F8) — tipi di decisione + filtro candidati.
La promozione era solo CLI facoltativa (mai innescata): il gate reviewer_memory_promote
la rende un passo del workflow. Questi test fissano il contratto harness-side:
- i due nuovi decision type esistono e sono ammessi dalla Fase 8 (workflow.yaml emits)
- i candidati rifiutati al gate (memory_promotion_declined, detail "seq:<n>") non
vengono riproposti da reusable_promotions/preview_promotions.
"""
from datetime import datetime
from tht.decisions import DecisionRecord
from tht.workflow import load_workflow
def test_promotion_decision_types_are_valid():
for t in ("memory_promoted", "memory_promotion_declined"):
d = DecisionRecord(
seq=1, ts=datetime(2026, 1, 1), type=t, subject="fact_x", detail="seq:5"
)
assert d.type == t
def test_promotion_decision_types_min_phase_is_f8():
wf = load_workflow()
assert wf.decision_min_phase("memory_promoted") == 8
assert wf.decision_min_phase("memory_promotion_declined") == 8