feat(mem0-agent): capture gate, eval harness, and mixed-window fix

- triggers.py: hard-drop rules now filter PER TURN, so a durable fact sitting
  between two progress lines survives instead of being dropped with them. The
  eval harness caught this: 3 mixed-window fixtures were being destroyed
  client-side before the extractor ever saw them.
- widened flag rules for 13 plainly durable windows the gate was missing
  (standing preferences, X-over-Y decisions, stated rules, diagnoses, verified
  procedures); verified procedures moved from aggressive to balanced
- eval/: 56 labeled fixtures from the audited v1 corpus plus offline and live
  runners with a --check regression gate
- un-ignore integrations/mem0-agent/eval (root .gitignore excluded it silently)

Offline scorecard: hard_drop_recall 1.000, extract_recall 1.000,
flag_precision 1.000, 0 misclassified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Deshraj Yadav
2026-07-28 02:02:37 -07:00
co-authored by Claude Fable 5
parent 3ea00cf88c
commit 4d5f2e653c
8 changed files with 1735 additions and 11 deletions
@@ -353,9 +353,11 @@ def test_decision_is_gated_to_balanced_and_up():
assert classify(DECISION_WINDOW, "aggressive").mtype == "decision"
def test_runbook_is_gated_to_aggressive_only():
def test_verified_runbook_is_captured_from_balanced_up():
"""A procedure the user says they verified is durable knowledge, not a stretch goal.
`aggressive` is for completed goals and procedures the assistant merely proposes."""
assert classify(RUNBOOK_WINDOW, "conservative").action == "skip"
assert classify(RUNBOOK_WINDOW, "balanced").action == "skip"
assert classify(RUNBOOK_WINDOW, "balanced").mtype == "runbook"
assert classify(RUNBOOK_WINDOW, "aggressive").mtype == "runbook"