Skip to content

Refactor Scheduler Handlers, Context Naming, and Dispatcher Logic#1

Merged
fancyboi999 merged 5 commits intofancyboi999:refactor/scheduler-architecturefrom
tangg555:fancy-scheduler
Feb 5, 2026
Merged

Refactor Scheduler Handlers, Context Naming, and Dispatcher Logic#1
fancyboi999 merged 5 commits intofancyboi999:refactor/scheduler-architecturefrom
tangg555:fancy-scheduler

Conversation

@tangg555
Copy link

@tangg555 tangg555 commented Feb 5, 2026

Description

Summary: (summary)

This PR focuses on refactoring the memory scheduler and dispatcher modules to improve code clarity, fix import issues, and standardize handler implementation.

Key Changes

  • Code Clarity & Naming:

    • Renamed ctx to scheduler_context in GeneralScheduler and SchedulerHandlerRegistry to improve readability.
    • Standardized logic by extracting common functionality into BaseSchedulerHandler .
  • Dispatcher & Config Sync:

    • Ensured orchestrator configuration is properly synced and removed when unregistering handlers in the dispatcher.
    • Fixed TaskPriorityLevel imports and usage in the dispatcher.
  • Fixes:

    • Corrected the register_handlers signature in BaseSchedulerQueueMixin .
    • Fixed handler registry imports, relative import paths, and the initialization map.

Fix: #(issue)

Docs Issue/PR: (docs-issue-or-pr-link)

Reviewer: @(reviewer)

Checklist:

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常
  • I have created related documentation issue/PR in MemOS-Docs (if applicable) | 我已在 MemOS-Docs 中创建了相关的文档 issue/PR(如果适用)
  • I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用)
  • I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人

tangg555 and others added 5 commits February 4, 2026 18:47
…r-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
Rename abbreviation 'ctx' to 'scheduler_context' in GeneralScheduler and SchedulerHandlerRegistry to improve code readability and clarity.
- 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
@fancyboi999 fancyboi999 merged commit 9031d0f into fancyboi999:refactor/scheduler-architecture Feb 5, 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