Files
KanbanGit/docs/releases/v0.5-webhook-notification/01-notification-action-foundation.md
T

2.5 KiB

01 Notification Action Foundation

Implementation guide: Ticket Implementation Guide

Branch

codex/v0.5-webhook-notification/01-notification-action-foundation

Start this branch from the chosen release base branch.

Goal

Create the backend foundation for project-scoped notification actions and delivery logs.

Requirements

  • Add database tables for configured notification actions and delivery attempts.
  • Add models, factories, resources, enums, and reusable actions or services for notification action management.
  • A notification action belongs to a project.
  • A notification action has a name, enabled flag, event type, channel, channel configuration, optional message template, and secret delivery URL.
  • Supported event type for this release: ticket_status_changed.
  • Supported channels for this release: webhook and discord.
  • Store webhook and Discord URLs encrypted and hide them from serialized model/resource output.
  • Add delivery logs that can record action, event type, channel, delivery status, attempt count, HTTP status, response or error excerpt, payload metadata, and timestamps.
  • Keep the schema extensible for later event types and channels.

Acceptance Criteria

  • Notification action records can be created, updated, listed, and deleted through backend actions or services.
  • Secret URLs are encrypted at rest and are not exposed by resources.
  • Delivery log records can represent pending, succeeded, failed, and retryable attempts.
  • The foundation does not dispatch external HTTP requests yet.
  • Existing ticket, project, API, and MCP behavior is unchanged.

Tests

  • Model tests for relationships, casts, enum handling, and hidden secret URL output.
  • Factory tests or feature-backed assertions proving webhook and Discord action records can be created.
  • Action/service tests for create, update, delete, and project ownership behavior.
  • Delivery log tests for supported statuses and relationship integrity.

Verification

  • vendor/bin/pint --dirty --format agent
  • php artisan test --compact tests/Feature/Models tests/Feature/Notifications
  • git diff --check

Commit And Push

  • Commit only this ticket's changes.
  • Push with git push origin codex/v0.5-webhook-notification/01-notification-action-foundation.

Out of Scope

  • Project settings UI
  • Ticket status changed event dispatch
  • Actual webhook or Discord HTTP delivery
  • User bell notifications
  • Unread counters
  • Slack, Teams, email, or other channels
  • Incoming webhooks
  • API or MCP management endpoints