Skip to content

Release v1.14.0 — alert webhooks (#225) - #512

Merged
unjica merged 23 commits into
mainfrom
release/v1.14.0
Jul 17, 2026
Merged

unjica merged 23 commits into
mainfrom
release/v1.14.0

Conversation

@unjica

@unjica unjica commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Promote v1.14.0 from develop → main (first ship of milestone v1.14.x — Notifications).
  • Ships #225 alert webhooks (merged via #509): HTTPS destinations on Alerts → Delivery, durable queue + signed alert.fired POSTs, DNS-pinned SSRF checks, delivery log.
  • Parent #492 remains vision-only (Notification Center / Slack / Discord / email not in this release).
  • Release prep: CHANGELOG [1.14.0] - 2026-07-17, committed API_VERSION 1.14.0.

Deploy / post-merge (before tag)

  1. Migrate production DB — DATABASE_URL=… pnpm --filter api exec prisma migrate deploy (ProjectWebhook / AlertWebhookDelivery).
  2. Run alert webhook worker in prod — pnpm --filter api alert-webhook-worker (or Railway service equivalent); optional env ALERT_WEBHOOK_WORKER_POLL_MS / ALERT_WEBHOOK_WORKER_LEASE_MS.
  3. Verify — GET /health shows "version":"1.14.0"; configure a webhook on Alerts → Delivery and run Test.

Test plan

  • CI green (build, etc.) on this PR
  • After merge: production migration applied
  • Alert webhook worker running in production
  • /health reports 1.14.0
  • Create webhook + Test delivery succeeds; firing an alert enqueues and delivers
  • Docs: ALERT-WEBHOOKS.md

After merge (RELEASE.md)

  1. Tag v1.14.0 on main (after migrate + verify) — triggers product update email (MINOR).
  2. Publish GitHub Release from docs/RELEASE_NOTES_TEMPLATE.md.
  3. Sync main → develop and push.
  4. Leave Integration: outbound HTTPS alert webhooks #225 open until prod verify if preferred; close after confirm.

Made with Cursor

unjica and others added 20 commits July 17, 2026 10:38
…-develop

chore: sync main v1.13.2 into develop
Add project webhook CRUD, signed alert.fired dispatch with retry/dead-letter, and an operator-facing delivery history on Alerts → Delivery so MVP #225 is closable after merge.

Co-authored-by: Cursor <[email protected]>
…as FAILED

DNS-rebinding helper hostnames passed create-time string checks; re-check resolved IPs on each delivery. Single-shot test deliveries never retry, so record FAILED instead of DEAD.

Co-authored-by: Cursor <[email protected]>
Add ## [1.8.11] and ## [1.5.0] so historical release notes and
changelog anchors resolve correctly.

Co-authored-by: Cursor <[email protected]>
Use the resolved, validated address for direct alert deliveries and record retry outcomes without relying on unsupported queue states.

Co-authored-by: Cursor <[email protected]>
Enqueue PENDING AlertWebhookDelivery rows before fireProjectAlert returns,
process them via a claim/lease worker (brief-worker pattern), and pin HTTPS
connects to validated resolved IPs to close DNS-rebinding TOCTOU.

Co-authored-by: Cursor <[email protected]>
…version-headings

fix(docs): restore missing CHANGELOG version headings
Keep AlertEvent insert and PENDING enqueue in one transaction so a failed createMany cannot orphan a dedupe key, and reuse the test delivery UUID in the log row.

Co-authored-by: Cursor <[email protected]>
Normalize IPv6 hextets so IPv4-mapped and IPv4-compatible forms
(compressed, expanded, or hex-mapped) cannot bypass the delivery blocklist.

Co-authored-by: Cursor <[email protected]>
Check completeAlertWebhookDelivery after successful POST so a lost lease
is not reported as success, renew the lease before POST, and create
webhooks under a serializable count+insert to honor MAX_PROJECT_WEBHOOKS.

Co-authored-by: Cursor <[email protected]>
When HTTP delivery succeeds but the lease-scoped complete misses, still
mark the row SUCCESS so it cannot stay PROCESSING and be POSTed again.

Co-authored-by: Cursor <[email protected]>
Prevent short lease overrides from expiring mid-HTTPS POST, and persist
test delivery rows before sending so Recent deliveries cannot miss a hit.

Co-authored-by: Cursor <[email protected]>
Exclude webhook:test: rows from worker claim and fail null alert_event_id
deliveries instead of inventing a generic payload that could double-POST.

Co-authored-by: Cursor <[email protected]>
Retry the final SUCCESS/FAILED update and fall back to FAILED so
claim-excluded webhook:test rows cannot stay PROCESSING forever.

Co-authored-by: Cursor <[email protected]>
Clear PROCESSING immediately without burning the attempt toward DEAD, so a still-owned row is not stuck until lease expiry.

Co-authored-by: Cursor <[email protected]>
Reclaiming an expired lease no longer increments attempt, so a crash before
POST still gets the full WEBHOOK_MAX_ATTEMPTS of real deliveries.

Co-authored-by: Cursor <[email protected]>
…ooks

feat(alerts): outbound HTTPS webhooks + delivery log (#225)
Promote alert webhooks (#225) from develop: finalize CHANGELOG and stamp API_VERSION 1.14.0.

Co-authored-by: Cursor <[email protected]>
@unjica unjica added this to the v1.14.x — Notifications milestone Jul 17, 2026
Abandon expired webhook:test PROCESSING rows as FAILED without re-POST,
and keep worker leases at least POST timeout plus margin.

Co-authored-by: Cursor <[email protected]>
Delivery-time DNS had no timeout while the claim lease only covered POST+margin, so a slow resolver could expire the lease mid-flight and allow duplicate POSTs. Cap DNS at WEBHOOK_DNS_TIMEOUT_MS and clamp lease to DNS+POST+margin.

Co-authored-by: Cursor <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8163eda. Configure here.

A successful outbound POST must never leave a reclaimable PROCESSING
row; retry scoped finalize and last-resort update SUCCESS by id.

Co-authored-by: Cursor <[email protected]>
@unjica
unjica merged commit eda9787 into main Jul 17, 2026
5 of 7 checks passed
@unjica
unjica deleted the release/v1.14.0 branch July 17, 2026 11:54
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.

1 participant