Originally created by: Akarsh-Hegde
Originally owned by: Akarsh-Hegde
Summary
- Jira updater agent: fetches in-progress tasks via mcp-atlassian, pulls session data per task from the new Meridian MCP
get-task-sessions tool, generates 3–5 bullet-point summaries via hermes AIAgent, and posts timed progress comments back to Jira
- Slot-based scheduler daemon: fires at configurable office-hour slots (default: 1pm and 5pm for 9–17 window with 4h interval); SIGTERM-safe via
run_in_executor + asyncio.Event
- Meridian MCP enhancements: 4 new tools —
get-task-sessions (AI-classified ticket links + session dimensions tags), get-recent-sessions, get-task-breakdown, get-active-task — all with from_time/to_time ISO 8601 range support
- Dedup:
jira_update_log table (migration 015) with UNIQUE index on (task_key, period_start, period_end) prevents double-posting on daemon restart
Architecture
mcp-atlassian → fetch in-progress tasks
Meridian MCP → get-task-sessions (ticket_links JOIN + session_dimensions tags)
hermes → one-shot AIAgent bullet-point generation (no tools, max_iterations=1)
mcp-atlassian → jira_add_comment (body param, Markdown)
jira_update_log → dedup + audit (state: pending → sent/failed)
Critical fixes applied (from code review)
run_update() dispatched via run_in_executor so its asyncio.run() calls (MCP stdio clients) don't conflict with the daemon's event loop — without this every scheduled slot would crash
- DB connection wrapped in
try/finally — previously leaked on MCP subprocess failure
_get_update_id() called unconditionally after UPSERT — lastrowid is unreliable on the conflict path across SQLite versions
wait_for(stop.wait()) replaces shield(ensure_future(...)) — eliminates orphaned task accumulation each slot
Test plan
- [x] 40 pytest tests passing — parse functions, db helpers, slot logic, comment formatting (no network/subprocess)
- [x] Dry-run verified end-to-end:
python -m agents.jira_updater_daemon --task KAN-108 --dry-run
- [x] Live comment posted to KAN-108 and visible in Jira
- [x]
jira_update_log dedup confirmed — second --trigger-now on same window skips re-post
CLI reference
# One-shot (all in-progress tasks)
python -m agents.jira_updater_daemon --trigger-now
# Single task
python -m agents.jira_updater_daemon --task KAN-108
# Dry run
python -m agents.jira_updater_daemon --task KAN-108 --dry-run
# Daemon (blocks, fires on schedule)
python -m agents.jira_updater_daemon
Environment variables required in services/.env
JIRA_URL=https://your-org.atlassian.net
JIRA_EMAIL=you@example.com
JIRA_API_TOKEN=...
🤖 Generated with Claude Code
Ticket changed by: Akarsh-Hegde
Originally posted by: adityaharishch
🎉 This PR is included in version 1.0.0 🎉
The release is available on:
v1.0.0Your semantic-release bot 📦🚀