Skip to content

feat(eval): memory eval foundation — research survey + L1/L2/L3 harness + frozen baselines - #2

Merged
fasdwcx merged 25 commits into
mainfrom
feat/memory-eval-foundation
Jul 27, 2026
Merged

feat(eval): memory eval foundation — research survey + L1/L2/L3 harness + frozen baselines#2
fasdwcx merged 25 commits into
mainfrom
feat/memory-eval-foundation

Conversation

@fasdwcx

@fasdwcx fasdwcx commented Jul 27, 2026

Copy link
Copy Markdown

Closes #3

Summary

Phase 0 + Phase 1 of the memory eval & optimization program (spec: docs/superpowers/specs/2026-07-24-memory-eval-optimization-design.md, plan: docs/superpowers/plans/2026-07-24-memory-eval-foundation.md).

Program goal: double the memory uplift and halve the memory-injected token cost of engram+MemoryLake, measured on phoenix as testbed. This PR delivers the research survey and the complete measurement foundation, with baselines frozen.

Phase 0 — Research

  • docs/research/2026-07-24-memory-sota-survey.md: 38 techniques across 4 directions, 29-row priority matrix feeding Phase 2.

Phase 1 — Eval foundation (eval/, never ships in the release binary)

  • L1 retrieval quality: 54-case frozen QA dataset (phoenix-retrieval-v1), recall@k/MRR/token/latency against live MemoryLake; LLM-verify fallback for keyword misses.
  • L2 token accounting: static protocol + mem_context + retrieval composite.
  • L3 end-to-end: 15 frozen phoenix tasks (phoenix-e2e-v1), isolated no-memory vs memory arms for headless Claude Code, calibrated single-turn LLM judge (tools disabled), checkpoint/resume, judge retry.
  • Product code touched only by two 1-line read-only exports (memorylake.ListAllFacts, mcp.ServerInstructions).

Baseline anchors (Phase 2 acceptance)

Anchor Baseline Target
L3 memory uplift 2.267 (6.000 vs 3.733) ≥ 4.53
L2 injected tokens/session 7824 ≤ 3912

Key insight: all uplift comes from gotcha tasks (+8.50); memory is currently a net drag on architecture-qa (−0.90) and small-fix (−0.80), and the memory arm emits +48% output tokens. Full analysis in eval/results/baseline-report.md.

Notes

  • Tests intentionally hit live MemoryLake (canary decision, mid-branch isolation commits reverted).
  • Final whole-branch review verdict: READY WITH NOTES; both must-fix doc corrections applied (5e44d66).

🤖 Generated with Claude Code

fasdwcx added 23 commits July 24, 2026 05:22
…l ~/.engram enablement/config"

This reverts commit d019221.
…ake enablement never receives test writes"

This reverts commit 91ef1ba.
…judge failures, checkpoint/resume

Judge calls now retry up to 3 attempts (10s/30s backoff), capture claude's
stderr on ExitError (truncated to 500B), and on final failure return a
sentinel verdict (Score -1) instead of fataling the whole grid.

runL3 excludes judge-failed items (Score < 0) from mean_score_<arm> rather
than counting them as 0, marks them with per-item judge_failed:1, emits
judge_failed_count, and warns loudly to stderr when an arm exceeds 20% failures.

New eval/e2e/checkpoint.go writes an incremental <out>.runs.jsonl sidecar
(run line before judging, verdict line after, kind-discriminated, flushed per
line) and replays it on startup to skip completed work and re-judge-only work.
Pure serialize/parse/classify logic is unit-tested (no claude calls).
@fasdwcx
fasdwcx merged commit 3382a70 into main Jul 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory eval foundation: research survey + L1/L2/L3 eval harness + frozen baselines

1 participant