Repository navigation
context-graph: message actions carry their plain text - #421
Merged
Merged
Conversation
actions-graph writes a plain `text` property on user and assistant messages when it records them: string content as is, content blocks as their joined text blocks. System messages, tool traffic and empty messages get none. Turn text otherwise lives only inside the JSON string `Action.properties`, which Cypher can't unpack, and both the full-text index and the coming vector index (#393) need a plain property. The eval's ensure_turn_text_index no longer materializes `text` in Python; it counts, indexes and probes. The graph-agent schema describer now never samples `text`: with messages carrying it from creation, a small graph's short turns read as enumerable and leaked into the prompt. Closes #415.
This was referenced Oct 5, 2026
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.
Closes #415. Part of map #390; the first ticket of the read path (#415 → #416 → #417 → #418).
What
actions-graph:record_actionwrites a plaintextproperty on user and assistant messages.textblocks.text.Action.properties, which Cypher can't unpack. The full-text index and the vector index from Where embeddings live, and what gets embedded #393 both need a plain property.text_search.ensure_turn_text_index: no longer readscontentout in Python and writesa.textback. It counts the turns that carrytext, creates the index, and runs a probe search.retrieval.py(graph-agent schema describer):textis never sampled. Messages now carrytextfrom creation, so on a small graph, short turns looked enumerable and leaked into the prompt (test_schema_never_leaks_the_content_being_asked_about). Real eval graphs have long turns and never hit this. The frozen graph-agent baseline would see one more property in its schema.Tests
All suites ran against a real Memgraph:
actions-graphtest_only_turns_carry_plain_text,test_an_empty_message_has_no_textsessions-graph