feat: Pass source_doc_id in task completion logs#664
Merged
Conversation
This commit addresses the issue where 'source_doc_id' was not being propagated
in task completion (success/failure) logs emitted by the scheduler dispatcher.
Changes made:
- Added 'source_doc_id: str | None' field to the 'ScheduleLogForWebItem' schema
in 'src/memos/mem_scheduler/schemas/message_schemas.py'.
- Modified '_maybe_emit_task_completion' in
'src/memos/mem_scheduler/task_schedule_modules/dispatcher.py' to:
- Extract 'source_doc_id' from 'ScheduleMessageItem.info'.
- Pass 'source_doc_id' to the 'ScheduleLogForWebItem' constructor for both
'completed' and 'failed' task status events.
This ensures better traceability and debugging for task completion events
related to specific source documents.
tangg555
approved these changes
Dec 9, 2025
tianxing02
pushed a commit
to tianxing02/MemOS
that referenced
this pull request
Feb 24, 2026
This commit addresses the issue where 'source_doc_id' was not being propagated
in task completion (success/failure) logs emitted by the scheduler dispatcher.
Changes made:
- Added 'source_doc_id: str | None' field to the 'ScheduleLogForWebItem' schema
in 'src/memos/mem_scheduler/schemas/message_schemas.py'.
- Modified '_maybe_emit_task_completion' in
'src/memos/mem_scheduler/task_schedule_modules/dispatcher.py' to:
- Extract 'source_doc_id' from 'ScheduleMessageItem.info'.
- Pass 'source_doc_id' to the 'ScheduleLogForWebItem' constructor for both
'completed' and 'failed' task status events.
This ensures better traceability and debugging for task completion events
related to specific source documents.
Co-authored-by: glin1993@outlook.com <>
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.
This commit addresses the issue where 'source_doc_id' was not being propagated in task completion (success/failure) logs emitted by the scheduler dispatcher.
Changes made:
This ensures better traceability and debugging for task completion events related to specific source documents.
Description
Summary: (summary)
Fix: #(issue)
Docs Issue/PR: (docs-issue-or-pr-link)
Reviewer: @(reviewer)
Checklist: