Originally created by: Akarsh-Hegde
No worklogs have drafted on installed machines since ~June 27. Every hourly slot in pm_worklog_hours is stuck status=pending, task_count=0, processed_at=NULL, while upstream data is healthy (sessions + summarised coding-agent rows are present).
Root cause: the worklog pipeline fires every poll but the MLX server's /worklog_hour returns HTTP 500:
cannot import name 'WORKLOG_SYSTEM' from 'agents.worklog_pipeline.worklog'
pipeline.py imports WORKLOG_SYSTEM from worklog.py (3 references), but the re-export line was dropped when cf525ba1 ("restore worklog_pipeline package from cleanup branch") restored the package. The constant is defined nowhere, so importing pipeline raises ImportError, the endpoint 500s, and the Rust daemon leaves every hour pending.
worklog.py — restore the lost re-export:python
from agents.worklog_pipeline.prompts.worklog import SYSTEM as WORKLOG_SYSTEMprompts/worklog.py still defines SYSTEM — only the re-export was lost.)pyproject.toml — bump 1.64.0 → 1.64.1 so the runtime auto-upgrade (an equality check) actually triggers on installed machines.Ran the import chain under the runtime's Python against this source:
worklog import OK; WORKLOG_SYSTEM len = 933
pipeline import OK: agents.worklog_pipeline.pipeline
This repo fix does not reach any running app on its own — /worklog_hour runs from ~/.meridian/runtime/, versioned independently. After merge, cut runtime tags from the merge commit (runtime-staging-v1.64.1 and/or runtime-v1.64.1). Once installed trays auto-upgrade, the backlog of pending hours should process on the next poll since the upstream summarised sessions are intact.
🤖 Generated with Claude Code
Originally posted by: coderabbitai[bot]
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `fix/worklog-system-prompt-import`Comment
@coderabbitai helpto get the list of available commands.Ticket changed by: Akarsh-Hegde