feat(scripts): cross-process persistence mode for recall benchmark (Run 3)#1209
Merged
Conversation
…un 3)
Adds --phase {all,persistence,capture,evaluate} to
scripts/memory_recall_eval.py. Persistence mode captures the corpus in
one subprocess, lets it exit, then evaluates from a brand-new
PersonalMemory instance in a second subprocess against the same
on-disk global root.
Result: identical to Run 2 in every dimension (hit@1 18/18, hit@3
18/18, same score distributions) - recall is fully file-backed and
survives process death. Logged as Run 3 in
docs/specs/memory-recall-eval/decisions.md.
Results pass between subprocesses via a JSON file rather than stdout
because attune_rag's structlog output prints to stdout.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1208, closing the starter's recommended next step: Runs 1–2 of the memory recall benchmark captured and queried within the same
PersonalMemoryinstance/process, leaving cross-process persistence an untested assumption. This adds a--phase persistencemode that captures the corpus in one subprocess, lets it exit, then evaluates from a brand-newPersonalMemoryinstance in a second subprocess against the same on-diskglobal_root.Result (logged as Run 3 in the spec's decisions.md)
Identical to Run 2 in every dimension — hit@1 18/18 (100%), hit@3 18/18 (100%), byte-identical positive/negative score distributions. Recall is fully file-backed and survives process death; the "probably fine mechanically" assumption is now a measured fact.
Changes
scripts/memory_recall_eval.py: splitrun_benchmark()intocapture_corpus()+evaluate(); add--phase {all,persistence,capture,evaluate}CLI (defaultallpreserves Runs 1–2 behavior exactly). Subprocess results pass via a JSON file, not stdout —attune_rag's structlog lines print to stdout and corrupt inline JSON.docs/specs/memory-recall-eval/decisions.md: Run 3 entry with method, numbers, and verdict.Verification
Both modes run green locally with identical output:
--phase all(default): hit@1 18/18, hit@3 18/18 — matches Run 2--phase persistence: hit@1 18/18, hit@3 18/18 — same distributions🤖 Generated with Claude Code