Skip to content

feat(dataplane): record delivery attempt request/response timestamps#2694

Merged
mekilis merged 1 commit into
mainfrom
smart/delivery-attempt-timestamps
Jun 26, 2026
Merged

feat(dataplane): record delivery attempt request/response timestamps#2694
mekilis merged 1 commit into
mainfrom
smart/delivery-attempt-timestamps

Conversation

@mekilis

@mekilis mekilis commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Record per delivery attempt requested_at (when the request is sent) and responded_at (when the response is received). responded_at is null when the endpoint returns no HTTP response (network error or timeout).
  • Add acknowledged_at, requested_at and responded_at to eventdelivery.* meta event payloads so the pushed payload matches the delivery attempt polling API.
  • Surface delivery_mode in the dashboard: a selector on the subscription form, and a delivery mode indicator on the event delivery details page.

Details

  • New migration adds nullable requested_at/responded_at columns to delivery_attempts. The partition and unpartition rebuilds copy the new columns so existing data is preserved.
  • The worker threads the dispatch start time and measured response time into the attempt on both the first delivery and retry paths.
  • Legacy attempts created before the migration have null timestamps; the dashboard hides the fields when they are absent.

Test plan

  • unit: parseAttemptFromResponse for success, response-with-error-status, and no-response (responded_at null)
  • unit: meta event payload includes acknowledged_at, requested_at, responded_at
  • integration: attempt persistence round trip and partition parity for the new columns
  • manual: success (200), failure-with-response (500), no-response, 3xx and 4xx; verified timestamps on the polling API and in the live meta event body
  • dashboard builds (AOT); delivery mode selector and details indicator render

Note

Medium Risk
Touches the core webhook delivery worker and delivery_attempts schema/partition migrations; nullable columns and tests limit blast radius, but incorrect timestamps could affect observability and meta-event consumers.

Overview
Adds requested_at and responded_at on delivery attempts end-to-end: nullable DB columns (migration + partition rebuilds), worker capture on initial delivery and retry (responded_at only when an HTTP status is received), persistence/API exposure, and OpenAPI updates.

Meta events now include acknowledged_at on the delivery envelope and the attempt’s requested_at / responded_at in eventdelivery.* payloads so webhook consumers match the polling API.

The dashboard gains delivery mode configuration on subscriptions and an at most once indicator on event delivery details, plus Requested/Responded timestamps on the attempt panel when present (legacy rows stay hidden).

Reviewed by Cursor Bugbot for commit 3321bcb. Bugbot is set up for automated code reviews on this repo. Configure here.

add per-attempt requested_at (request sent) and responded_at (response
received) to delivery attempts. responded_at is null when the endpoint
returns no HTTP response (network error or timeout).

include acknowledged_at, requested_at and responded_at in eventdelivery.*
meta event payloads so the push payload matches the delivery attempt
polling api.

surface delivery_mode in the dashboard: a selector on the subscription
form and a delivery mode indicator on the event delivery details page.

migration adds nullable requested_at/responded_at columns to
delivery_attempts; partition and unpartition rebuilds preserve them.
@mekilis mekilis added this pull request to the merge queue Jun 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@mekilis mekilis added this pull request to the merge queue Jun 26, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 26, 2026
@mekilis mekilis added this pull request to the merge queue Jun 26, 2026
Merged via the queue into main with commit 1324e6d Jun 26, 2026
36 checks passed
@mekilis mekilis deleted the smart/delivery-attempt-timestamps branch June 26, 2026 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants