Skip to content

Prevent deleted webhook endpoints from starving the delivery queue #16

Open

Description

@LunaStev

Problem

DeleteEndpoint removes the endpoint but keeps delivery history. deliver returns immediately when lookup fails, leaving pending status and scheduling untouched. Pending always selects the oldest 20 records, so orphaned work can indefinitely occupy every slot.

Evidence / regression scenario

In an isolated test, 20 queued records referenced a missing endpoint, followed by one valid delivery. Two ProcessPending calls produced zero HTTP requests for the valid delivery.

Code references

Audit baseline: 50eb207.

Completion criteria

  • Transition deliveries for a permanently deleted endpoint to a terminal cancelled/failed state while preserving history.
  • Do not treat transient storage failures as proof of deletion; return/log an actionable processing error.
  • Ensure orphaned jobs cannot repeatedly starve unrelated endpoints.
  • Cover at least 20 orphaned records followed by a valid record across multiple batches, plus endpoint deletion after queuing.

Scope and dependencies

Difficulty: medium.

Related #15 owns endpoint disable semantics. This issue owns deleted endpoints and orphaned queue progress.

Backlog index: #12. Keep the change limited to this issue and include focused verification in the pull request.

Activity

  1. added
    bug
    help wanted
    webhooks
    priority high
    needs testing
    on Sep 23, 2026
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

    bughelp wantedneeds testingpriority highwebhooks

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions