Route agent memory writes through the lifecycle and complete memory diagnostics - #1782
Merged
Merged
Conversation
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.
First of three deliveries for #1717.
Problems
POST /api/memory/addwrote straight to the vector store. On a protected install that row has no canonical claim, so the current-truth gate treats it as legacy memory. Once an owner's legacy memory is reconciled, legacy admission ends and every new explicit save was stored, reported as saved, and never recalled.POST /api/memory/delete_alldeleted vector rows and left every canonical claim active with a projection pointing at nothing.Changes
MemoryFactLifecycleService.create(newagentevidence kind, scope routed as before). A failed projection returns 503 instead of a success. Only facts are accepted there.missingrows (current facts with no search row). The service audits each owner at startup and after projection retries and stores counts inmemory_vector_audit(schema 96); install status reads them, since it runs as root and must not open the service-owned vector store. Workshop's search index check and the CLI audit show missing rows too.states=(...),vector drift=..., andlegacy review pending=N owner(s); unclassified rows count as gaps only for owners who applied an audit. Episode status breaks follow-ups down by relationship.kai.memoryto a reviewed allowlist.Verification
replay gaps=0andactive; a vector audit of every owner finds zero orphan, unknown, duplicate, and missing rows.