fix(notifications): task titles and agent slugs replace raw UUIDs (#616)

* fix(notifications): task titles and agent slugs replace raw UUIDs

Notification producers interpolated raw task/agent UUIDs into subjects and
bodies ('Task 68e1e4db-... unblocked', 'handed back to 00000000-...-0004').
A tiny notification_text helper (task_display: title-first with a #id8
fallback; agent_display: identity-map slug first, DB lookup fallback) now
feeds every producer: all 13 NotificationService methods, the 7
delivery-service bodies whose subjects were already title-based, the
substitute-PM ad-hoc insert, and the orchestrator/choreographer callers,
which thread the task row's title one call deeper. Fixes the literal
'cell_pm' role string sent as an agent slug in the merge-conflict
notification. Tool-call examples like unblock('<uuid>') keep the raw id on
purpose — agents need it.

* test(notifications): board-review subject assertion matches the humanized format

---------

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
Renzo F
2026-07-20 20:59:36 +02:00
committed by GitHub
co-authored by Renn F
parent f6cca66afa
commit c8f55be904
13 changed files with 335 additions and 71 deletions
+2 -1
View File
@@ -226,6 +226,7 @@ async def test_ceo_handoff_once_when_board_review_complete() -> None:
svc = AsyncMock()
task_svc = AsyncMock()
task_svc.get.return_value = SimpleNamespace(title="Strategic feature")
db_ctx, task_ctx = _patch_handoff_db(task_svc)
with (
patch.object(orch, "_is_agent_active", return_value=False),
@@ -239,7 +240,7 @@ async def test_ceo_handoff_once_when_board_review_complete() -> None:
task_svc.mark_board_review_complete.assert_awaited_once()
svc.send_board_review_complete_notification.assert_awaited_once_with(
task_id=task_id
task_id=task_id, task_title="Strategic feature"
)
assert task_id in orch._board_review_ceo_notified