Menu

#365 fix(worklog): restore WORKLOG_SYSTEM re-export broken by package restore

closed
nobody
None
2026-06-29
2026-06-29
Anonymous
No

Originally created by: Akarsh-Hegde

Problem

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.

Fix

  • worklog.py — restore the lost re-export:
    python from agents.worklog_pipeline.prompts.worklog import SYSTEM as WORKLOG_SYSTEM
    (prompts/worklog.py still defines SYSTEM — only the re-export was lost.)
  • pyproject.toml — bump 1.64.01.64.1 so the runtime auto-upgrade (an equality check) actually triggers on installed machines.

Verification

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

⚠️ Ships nothing until the runtime is republished

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

https://claude.ai/code/session_01CT9wnEUuQeoBeufqTh46JC

Related

Tickets: #369
Tickets: #372
Tickets: #373

Discussion

  • Anonymous

    Anonymous - 2026-06-29

    Originally posted by: coderabbitai[bot]

    [!IMPORTANT]

    Review skipped

    Auto reviews are disabled on base/target branches other than the default branch.

    Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.


    ⚙️ Run configuration

    Configuration used: Organization UI

    Review profile: ASSERTIVE

    Plan: Pro Plus

    Run ID: 8d391b8b-fe74-4648-a3ec-880b8bb3b5be

    You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

    Use the checkbox below for a quick retry:
    - [ ] 🔍 Trigger review

    ✨ Finishing Touches
    🧪 Generate unit tests (beta) - [ ] Create PR with unit tests - [ ] Commit unit tests in branch `fix/worklog-system-prompt-import`

    Comment @coderabbitai help to get the list of available commands.

     
  • Anonymous

    Anonymous - 2026-06-29

    Ticket changed by: Akarsh-Hegde

    • status: open --> closed
     

Log in to post a comment.