fix: avoid over-rewriting query and wrong reference display - #1
Merged
CaralHsi merged 2 commits intoJul 31, 2025
Merged
Conversation
CaralHsi
pushed a commit
that referenced
this pull request
Feb 6, 2026
…nsor#1004) * refactor(scheduler): modularize handlers and search - extract scheduler handlers into dedicated modules - split retriever into pipelines (search/enhance/rerank/filter) - centralize text search logic for API and scheduler Refs MemTensor#1003 * fix: resolve ruff lint errors and address Copilot review feedback - Fix TC001/TC002/TC003: move type-only imports into TYPE_CHECKING blocks - Fix RUF059: prefix unused variables with underscore - Fix typos: "Memorires" -> "Memories", "exeption" -> "exception" - Remove self-assignment: `text_mem_base = text_mem_base` - Remove unused `user_context` param from `build_search_context` - Restore original `QUERY_TASK_LABEL` in activation memory update - Apply ruff format to all modified files * fix(redis): serialize schedule messages for streams - json-encode list/dict fields for Redis XADD - decode chat_history safely when reading from streams * fix(examples): use scheduler handlers - avoid private _memory_update_consumer call - delegate mem update handler to built-in handler * style(ruff): fix isinstance union syntax - apply X | Y form to satisfy UP038 * style(ruff): format message schemas - align datetime line breaks with ruff format * refactor: integrate architectural improvements from refactor-scheduler-stage2 This commit merges key modularization benefits and bug fixes from the refactor-scheduler-stage2 branch into fancy-scheduler: Modularize activation memory logic into ActivationMemoryManager Introduce SchedulerSearchService for unified memory search coordination Extract filtering and reranking logic into MemoryPostProcessor Maintain intentional search scope of LongTermMemory and UserMemory in SearchPipeline and SchedulerSearchService Update BaseScheduler to initialize and manage lifecycle of new modules Refactor BaseSchedulerMemoryMixin to delegate tasks to specialized managers * refactor: extract common logic to BaseSchedulerHandler and fix import paths * refactor: rename ctx to scheduler_context in mem_scheduler Rename abbreviation 'ctx' to 'scheduler_context' in GeneralScheduler and SchedulerHandlerRegistry to improve code readability and clarity. * refactor: sync orchestrator config and fix scheduler imports - Sync orchestrator config removal when unregistering handlers in dispatcher - Fix missing TaskPriorityLevel import in dispatcher - Fix register_handlers signature in BaseSchedulerQueueMixin - Fix handler registry imports and initialization map - Fix relative imports in handlers package * fix: resolve PR #1 review issues (P0 imports, P3 types/init) * chore(ruff): fix unused unpacked vars - prefix unused unpacked vars with underscore - apply ruff format changes * perf(search): include embeddings for mmr * fix: Pass user_context in mem_read and pref_add handlers - Update MemReadMessageHandler to extract user_context from message and pass it to _process_memories_with_reader and transfer_mem. - Update PrefAddMessageHandler to extract user_context from message and pass it to pref_mem.add. - This ensures user context information is available during memory reading and preference adding operations. --------- Co-authored-by: chentang <travistang@foxmail.com> Co-authored-by: glin1993@outlook.com <>
CaralHsi
pushed a commit
that referenced
this pull request
Mar 2, 2026
Two bugs in `get_default_config()` / `get_default_cube_config()`: 1. `get_default_config()` injects `act_mem` dict into MOSConfig when `enable_activation_memory=True`, but MOSConfig has no `act_mem` field and inherits `extra="forbid"` from BaseConfig. This causes a `ValidationError: Extra inputs are not permitted` for any user calling `get_default()` with activation memory enabled. 2. `get_default_cube_config()` hardcodes `extractor_llm` backend to `"openai"` for KV cache activation memory, but `KVCacheMemoryConfig` validator requires `huggingface`/`huggingface_singleton`/`vllm` (KV cache needs local model access for attention tensor extraction). This causes `ConfigurationError` even if bug #1 is fixed. Fix: Remove `act_mem` from MOSConfig dict (the `enable_activation_memory` bool flag is sufficient). In MemCube config, require explicit `activation_memory_backend` kwarg instead of hardcoding `"openai"`. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CaralHsi
pushed a commit
that referenced
this pull request
Mar 9, 2026
fix(memos-local-openclaw): honor memory_search maxResults
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
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please delete options that are not relevant.
Checklist:
Maintainer Checklist