Skip to content

[Feature]: Dependency Unblock Notifications (TASK_UNBLOCKED Event & Outbox Dispatch) #26

Description

@espdesign

Summary

Automatically detect when prerequisite tasks finish and dispatch a transactional TASK_UNBLOCKED outbox notification to dependent task assignees and watchers, alerting them that work is ready to proceed.

Background & Context

Tech Tree DAGs and prerequisite dependencies are central to dgg-pm. However, when Task A is marked completed, contributors assigned to dependent Task B currently receive no notification that their blocker was resolved. They must periodically check the forum to discover when they can begin.

Proposed Capabilities

  1. Unblock Evaluation in TaskService.update_status():
    • When a task transitions to TaskStatus.COMPLETED, query all immediate downstream dependent tasks.
    • For each dependent task, check if all of its prerequisite dependencies are now in TaskStatus.COMPLETED state.
  2. Transactional Event Generation:
    • For each newly unblocked task, atomically enqueue an EventType.TASK_UNBLOCKED outbox event with task metadata, assignee ID, and thread snowflake.
  3. Notification Delivery:
    • In DiscordNotifier, dispatch an alert via DM / thread ping:

      "🎉 All prerequisite blockers for [INF-2] Frontend UI have completed! You are now clear to begin work."

    • Includes a direct jump link button to open the Task Thread Workspace.

Acceptance Criteria

  • Completing a prerequisite task triggers evaluation of downstream dependents.
  • TASK_UNBLOCKED event enqueued only when 100% of prerequisites for a task are satisfied.
  • Dispatches notifications honoring user preferences (DM, Channel, Both).
  • Reopening a task does not result in false positive unblock notifications.
  • Unit and integration tests covering outbox event dispatch and notification delivery.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions