Skip to content

fix: avoid over-rewriting query and wrong reference display - #1

Merged
CaralHsi merged 2 commits into
CaralHsi:feat/modify_playgroundfrom
endxxxx:fix/over-rewrite-query
Jul 31, 2025
Merged

fix: avoid over-rewriting query and wrong reference display#1
CaralHsi merged 2 commits into
CaralHsi:feat/modify_playgroundfrom
endxxxx:fix/over-rewrite-query

Conversation

@CaralHsi

Copy link
Copy Markdown
Owner

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

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.

  • Unit Test
  • Test Script (please provide)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@CaralHsi
CaralHsi merged commit bb0ef2c into CaralHsi:feat/modify_playground Jul 31, 2025
20 checks passed
@endxxxx
endxxxx deleted the fix/over-rewrite-query branch February 5, 2026 06:14
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
CaralHsi pushed a commit that referenced this pull request Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants