feat(webhook): populate and expose delivery request, response and error + test plan

Merged
PO
4mo ago
+750-26

Why

WebhookDeliveryTask exposed http_request, http_response, and error, but nothing populated them. This branch captures what each delivery attempt exchanges and surfaces it on the task, and fixes two issues in the task Retry/Cancel actions.

Closes IFC-2917, IFC-2918, IFC-2919

What changed

  • The webhook-send flow records the outgoing request (URL, redacted headers), the response (status, body, latency), and any classified failure (class, message, remediation) as a Prefect artifact on its run, on both success and failure, reflecting the last attempt.
  • The write goes through a new create_artifact on the Prefect client adapter, behind a writer protocol mirroring the read side. The artifact key and type are owned by the task-manager Prefect-integration layer.
  • The task query reads the artifact back (most recent per run) and projects it onto http_request, http_response, and error, gated on the GraphQL selection. No GraphQL schema shape change; secrets stay redacted.

Fixes

  • fix(frontend): a single toast on task action failure. A failed Retry or Cancel now surfaces one toast instead of several.
  • fix(webhook): handle the CANCELLING state for task actions. Action availability now accounts for a delivery that is mid-cancellation, so Retry/Cancel are gated correctly for that state.

Tests

  • Unit and functional: capture builder, adapter write round-trip, reader latest-per-run, serializer projection and selection gating; capture present on success and failure reflecting the last attempt, no raw secret persisted.
  • Verified live against a running stack; all ten delivery scenarios pass, including the previously-unpopulated fields.
  • Manual UI plan: dev/specs/ifc-2755-webhook-delivery-operability/ui-test-plan.md.

Follow-up

PR to open on the SDK project in order to make the new fields available.

šŸ¤– Generated with Claude Code