fix: tini entrypoint, event routing wildcard, orphan recovery

This commit is contained in:
Dev Agent
2026-05-22 13:52:46 +03:00
parent c326ef0ac4
commit 0ad56e1f0a
5 changed files with 29 additions and 1 deletions

View File

@@ -122,6 +122,17 @@ async def handle_work_item_created(data: dict):
logger.info(f"Task created: {work_item_id} ({name}), branch={branch}, stage=analysis")
# Launch analyst agent
try:
task_row = get_db().execute("SELECT id FROM tasks WHERE work_item_id=?", (work_item_id,)).fetchone()
if task_row:
task_id = task_row[0]
task_desc = f"Work item: {work_item_id}\nRepo: {repo}\nBranch: {branch}\nStage: analysis\nTitle: {name}"
run_id = launcher.launch("analyst", repo, task_desc, task_id=task_id)
logger.info(f"Task {task_id}: launched analyst (run_id={run_id})")
except Exception as e:
logger.error(f"Failed to launch analyst for {work_item_id}: {e}")
async def handle_comment(data: dict):
"""