test(entity): add staged repair recall harness#8
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a local-only “real data entity tag repair” evaluation harness that restores a production snapshot into two isolated local stacks, runs staged repair modes on the candidate, and compares recall/diagnostics (including Qdrant vector identity checks and recall preflight gating).
Changes:
- Added
scripts/real_data_entity_repair_eval.shto restore DB-only lab stacks, start local APIs, run repair plans, and produce recall/vector/audit artifacts (with staged-loop and migration options). - Added
runners/vector_identity.py(+ tests) to validate baseline/candidate Qdrant point/vector identity with retries and failure summaries. - Enhanced
runners/compare_recall_endpoints.py(+ tests) with HTTP retries, vector-readiness preflight, Qdrant payload diagnostics, and near-tie top-swap classification.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/real_data_entity_repair_eval.sh | New local-only staged repair + recall comparison wrapper with restore/startup/diagnostics plumbing |
| runners/vector_identity.py | New Qdrant vector identity comparison tool (scroll + diff summary) |
| runners/test_vector_identity.py | Unit tests for vector identity comparison, retry logic, and failure summaries |
| runners/test_real_data_entity_repair_eval.py | CLI/behavior tests for the new wrapper script (help, local guards, staged-loop planning) |
| runners/compare_recall_endpoints.py | Adds HTTP retrying, preflight checks, regression diagnostics, and near-tie top-swap handling |
| runners/test_compare_recall_endpoints.py | Expanded unit coverage for HTTP retries, diagnostics, preflight, and updated classification behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
sync-only,reject-only,canonicalize-safe, and optional post-migration runs.Breaking Changes
None. This is eval harness/test tooling only.
Related
Paired with verygoodplugins/automem#176.
Test Plan
bash -n scripts/real_data_entity_repair_eval.shpython3 -m unittest runners.test_compare_recall_endpoints runners.test_real_data_entity_repair_eval runners.test_vector_identity-> 44 tests passedprod-api-20260608-220749: staged loop passed vector identity, zero bare-tag mutations, and no hard preserve regressions.prod-api-20260609-102848: deterministic stages passed; post-migration produced one review-only LoCoMo near-tie with no lost top-5 IDs and no hard preserve regression.