Repository navigation
feat(smartcomment): add optional execution graph tracing - #2629
Draft
consultantQ wants to merge 32 commits into
Draft
consultantQ wants to merge 32 commits into
consultantQ wants to merge 32 commits into
Conversation
Simplify internal tracing helpers while preserving graph identity, lineage, snapshots, lifecycle and hook boundaries. Refine integration-owned hook tests, preserve upstream tests, and document the changes and validation limits.
Clarify node, event, and link descriptions and group related handlers. Remove unused TraceValue.name and legacy snapshot migration while preserving current-format recovery and existing lineage rules. Validation: plugin and Hook/Reader suite 82 passed; related MemOS suite 266 passed, 1 skipped. Full make test was blocked by an Ollama model-list network request. Scoped pre-commit checks passed.
…ce graph; Add memory type and memory cube node in search trace graph; Change search memory nodes into a search memory list; Convert each stage of search to a dynamic import.
Port the reviewed Hook-only tests from smartcomment-integration. Keep upstream Search tests intact apart from required hook_context assertions, and isolate new behavior tests with an opt-in fixture. Cover Reader grouping/order and all five MemRead operation sites. Validation on feat/add-more-plugin-hooks: 49 targeted tests passed; related regression: 266 passed, 1 skipped. Individual test files, Ruff, staged pre-commit, and diff checks passed. Full make test stopped after 180 seconds at the existing Ollama network request.
…mment-integration
- Normalize scheduler context to dictionaries and remove target parameter - Include reader and deletion arguments in operation inputs - Remove archive observations and redundant search context initialization - Update hook documentation and regression tests
…ltantQ/MemOS into feat/smartcomment-integration
… add, removed the node for nodes filtered out during the search phase, and aligned some handler changes with the corresponding hook changes.
… feat/smartcomment-integration
- Defer search event assembly and stage comparisons to the writer - Reduce redundant snapshot copies and serialization - Batch user index updates while checkpointing graphs per event - Preserve write retries and flush guarantees with regression tests
Keep deferred Search assembly and persistence retries while isolating request state and graph identities. Recover empty reservation directories, validate numeric settings, align lineage defaults, and close the writer after application components. Add focused regression coverage for concurrent requests, snapshot preservation, storage recovery and application shutdown. Verified with 133 related tests, scoped make format and pre-commit checks.
… feat/smartcomment-integration
- Add tests for Add/Search handlers, lineage, recording, and serialization - Cover queue limits and trace recovery after restart - Update ignore rules to track integration tests - Consolidate bilingual user guides and remove superseded documentation
- Introduce plugin features before explaining the MemTrace relationship - Simplify wording and remove redundant guidance
…ization docs(smartcomment): fix visualization examples
added 2 commits
November 17, 2026 17:41
…nto feat/smartcomment-integration
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.
Description
Depends on #2623. Please merge #2623 first.
This PR adds an optional SmartComment plugin for tracing MemOS memory operations as execution graphs. The graphs help investigate missing memories and unexpected search results by showing the recorded extraction, storage, background processing, and retrieval steps.
The plugin lives in
apps/memtrace-memos-integrationand uses the hooks introduced in #2623. It is disabled by default and requires explicit activation throughMEMOS_ENABLED_PLUGINS=smartcomment.The integration includes:
The plugin requires Python 3.12+ and
smartcomment>=0.1.2.The current diff includes the prerequisite hook changes from #2623. Review the SmartComment-only changes for the scope of this PR.
Related issue: None linked. The prerequisite PR is #2623.
Type of change
How has this been tested?
make test): 1155 passed, 9 skipped, 39 warnings in 138.01s.poetry run pytest tests/plugins apps/memtrace-memos-integration/tests -q): 169 passed in 1.50s.The focused tests cover concurrent request isolation, search result preservation, persistence across restarts, history linking, write failures, and shutdown behavior.
Checklist
Reviewer checklist