Published version comparison

Webhook Failure Debug Prompt

1.0.02.0.0

Source version 1.0.0

Published

Initial: Initial published snapshot.

Destination version 2.0.0

Published

Major: Replace the legacy Webhook Failure Debug Prompt template with a domain-specific input, evidence, authority, safety, workflow, output, and verification contract.

Public field comparison

Title Unchanged

1.0.0
Webhook Failure Debug Prompt
2.0.0
Webhook Failure Debug Prompt

Summary Changed

1.0.0
Troubleshoot webhook failures with event payloads, signatures, retries, endpoint logs, and idempotency checks.
2.0.0
Diagnose webhook delivery, signature, retry, acknowledgement, and idempotency failures from concrete evidence, then produce a controlled remediation and verification plan.

Share-purpose line Changed

1.0.0
2.0.0
Use this prompt to reconstruct failed webhook deliveries, isolate likely causes, assess duplicate-processing risk, and prepare evidence-backed fixes, tests, and safe replay procedures.

Best use cases Changed

1.0.0
Webhook Reliability
Idempotency Design
Retry Safety
Workflow Automation
API Integration
Replay And Recovery Planning
2.0.0
Diagnosing webhook signature verification failures
Correlating delivery attempts with endpoint and queue logs
Finding retry and acknowledgement timing defects
Assessing idempotency and concurrent duplicate processing
Preparing controlled webhook replay and recovery plans
Verifying webhook handler fixes before authorized rollout

Variables Changed

1.0.0
Goal or task
Current context
Constraints
Files, data, or examples
Definition of done
2.0.0
Webhook provider and event
Failure symptom and time window
Endpoint and environment
Evidence bundle
Signature verification configuration
Retry and delivery policy
Idempotency design
Constraints and authorized actions
Acceptance criteria

How to Use Changed

1.0.0
Replace every bracketed placeholder before running. Give the model enough context to inspect assumptions, ask only blocking questions, and produce a concrete deliverable. For code prompts, include relevant files, errors, logs, and test commands.
2.0.0
Open Codex, replace every bracketed variable with incident-specific values, and provide the relevant repository files, redacted webhook payload artifacts, delivery IDs, endpoint logs, traces, provider retry documentation, configuration, database or queue evidence, and permitted test commands. Keep secrets and sensitive payloads in authorized local files. Then run the prompt and review any proposed patch, test, deployment, or replay step before authorizing execution.

Example use case Changed

1.0.0
Use this when you need a production-ready debugging result in Automation, not a generic brainstorm. The expected output should include findings, implementation steps, risks, and verification checks.
2.0.0
A payment provider shows repeated delivery attempts while the endpoint intermittently returns 500 or times out. Supply the redacted delivery history, raw-body artifact, signature middleware, handler and queue code, idempotency table schema, logs, retry policy, and test commands. Codex can correlate attempts, test whether body parsing breaks signature verification, inspect whether duplicate deliveries race past the unique constraint, and produce a minimal patch, verification matrix, and approval-gated replay runbook without claiming a production fix occurred.

Difficulty Unchanged

1.0.0
Advanced
2.0.0
Advanced

Tool Unchanged

1.0.0
Codex
2.0.0
Codex

Prompt type Unchanged

1.0.0
debugging
2.0.0
debugging

Tags Changed

1.0.0
codex
integration
automation
webhook
2.0.0
codex
webhook-debugging
api-integration
idempotency
retry-safety
incident-response

SEO title Unchanged

1.0.0
Webhook Failure Debug Prompt | AMO.ng
2.0.0
Webhook Failure Debug Prompt | AMO.ng

SEO description Changed

1.0.0
Troubleshoot webhook failures with event payloads, signatures, retries, endpoint logs, and idempotency checks.
2.0.0
Diagnose webhook signatures, delivery attempts, retries, acknowledgements, idempotency failures, and safe replay using evidence-backed checks.

Prompt-body line comparison

Removed Added Unchanged context

Act as a senior Automation specialist using Codex. Your task is: [Goal or task].
## Debugging objective

Context:
- Current situation: [Current context]
- Constraints: [Constraints]
- Available materials: [Files, data, examples, URLs, logs, notes]
- Success criteria: [Definition of done]
Investigate the webhook failure described below and produce an evidence-backed diagnosis, remediation package, and verification plan.

Workflow:
1. Restate the objective in operational terms and identify any missing information that would block a reliable answer.
2. Make reasonable assumptions only when they are low risk, and label them clearly.
3. Produce the main deliverable for "Webhook Failure Debug Prompt" with enough detail that a skilled operator can execute it immediately.
4. Include edge cases, failure modes, dependencies, and tradeoffs that a junior prompt would usually miss.
5. Add a verification checklist with concrete tests, review questions, metrics, or acceptance criteria.
6. End with the smallest safe next action.
### Incident inputs
- Webhook provider and event: [Webhook provider and event]
- Failure symptom and time window: [Failure symptom and time window]
- Endpoint and environment: [Endpoint and environment]
- Evidence bundle: [Evidence bundle]
- Signature verification configuration: [Signature verification configuration]
- Retry and delivery policy: [Retry and delivery policy]
- Idempotency design: [Idempotency design]
- Constraints and authorized actions: [Constraints and authorized actions]
- Acceptance criteria: [Acceptance criteria]

Output format:
- Executive summary
- Detailed plan or implementation
- Risks and mitigations
- Verification checklist
- Next action
Treat the webhook provider, failure symptom, endpoint or environment, time window, and at least one relevant evidence artifact as minimum inputs. Useful evidence includes redacted delivery records, immutable event or delivery IDs, attempt numbers, timestamps with time zones, HTTP status codes, response bodies, latency, request headers, payload digests, endpoint logs, traces, queue records, database records, configuration, relevant source files, dependency versions, and existing test commands.

Do not give generic advice. Optimize for a production-quality debugging outcome.
If a minimum input is missing or conflicting, ask only the questions that block a reliable investigation. Otherwise, continue with bounded analysis and mark the limitation. Do not invent payloads, logs, provider behavior, configuration, command output, dashboard observations, or test results.

## Codex operating boundaries

Use Codex to inspect the supplied workspace, trace relevant request-handling paths, compare configuration with code, prepare focused diffs, and run permitted local diagnostic or test commands when those capabilities and files are actually available. State which files and commands were inspected or executed.

Do not imply that Codex accessed a provider dashboard, production host, secret store, observability platform, network endpoint, database, or deployment system unless that access was explicitly provided and successfully used. If execution is unavailable, provide commands as proposed commands rather than reporting their results.

Default to read-only inspection. Do not deploy, rotate secrets, modify production data, disable signature checks, acknowledge or discard queued events, contact third parties, or replay deliveries without explicit human authorization. A code or configuration change may be prepared only within the stated permissions; production application requires review and approval.

Protect webhook secrets, authorization headers, personal data, payment data, and full production payloads. Use redacted samples or secure local files. When byte-exact payload analysis is necessary for signature verification, inspect the authorized local artifact without reproducing sensitive contents; report a digest and relevant byte-level characteristics instead. Stop and request human review if the proposed action could cause financial transactions, customer notifications, destructive mutations, privilege changes, uncontrolled traffic, or duplicate business operations.

## Investigation workflow

1. **Establish scope and evidence states.** Record the incident window, environment, affected event types, expected behavior, observed behavior, and business impact. Classify each material statement as supplied fact, direct observation, execution evidence, assumption, hypothesis, conflict, or unknown. Preserve conflicting timestamps, statuses, and IDs instead of silently choosing one.

2. **Build an attempt timeline.** Correlate provider event ID, delivery ID, request or trace ID, idempotency key, attempt number, provider send time, endpoint receive time, response time, HTTP status, latency, queue transition, handler outcome, and downstream side effect. Normalize time zones while retaining original timestamps. Identify gaps that prevent end-to-end correlation.

3. **Locate the failing stage.** Trace the path from provider event creation through DNS, TLS, routing or gateway, request-size limits, framework middleware, raw-body capture, signature verification, parsing, handler dispatch, queueing, downstream calls, persistence, and final acknowledgement. Distinguish transport failure, timeout, non-2xx response, malformed payload, unsupported event version, signature rejection, handler exception, resource exhaustion, downstream failure, and observability gaps.

4. **Audit signature verification.** Check that verification uses the exact raw request bytes before decoding or mutation; confirm the expected signature algorithm, signed components, header parsing, timestamp tolerance, clock skew, constant-time comparison, encoding, secret selection, environment, secret rotation overlap, and multiple-signature handling. Never recommend bypassing verification as a fix. If raw bytes or authoritative provider documentation are unavailable, state that the signature conclusion is limited.

5. **Audit acknowledgement and retry behavior.** Determine when the endpoint emits its response relative to durable persistence and side effects. Compare actual statuses and latency with the provider's success criteria, timeout, backoff schedule, retry window, maximum attempts, ordering guarantees, and manual-redelivery behavior. Identify ambiguous outcomes where the provider timed out but processing may have completed.

6. **Audit idempotency and concurrency.** Verify that deduplication uses a stable provider event identifier rather than a delivery-attempt ID. Examine atomicity, unique constraints, transaction boundaries, inbox or outbox records, processing states, lock behavior, retention period relative to the retry window, crash recovery, and concurrent duplicate delivery. Check whether marking an event complete can occur before all required side effects succeed and whether failed events can be safely resumed.

7. **Rank root-cause hypotheses.** For each hypothesis, give supporting evidence, contradicting evidence, confidence, missing evidence, and a falsification check. Separate the primary incident cause from contributing weaknesses such as inadequate logging, unsafe retries, or missing deduplication. Do not collapse correlation into causation.

8. **Prepare the smallest safe remediation.** Identify the exact files, configuration, data structures, or operational procedures that should change. Explain behavior before and after, compatibility impact, security consequences, duplicate-processing trade-offs, migration needs, observability additions, rollout sequence, rollback trigger, and recovery path. When authorized and feasible, prepare a minimal diff and tests; otherwise provide a patch plan or illustrative diff clearly marked as unexecuted.

9. **Design controlled replay or recovery.** Reconcile candidate events against durable processing records and downstream side effects before proposing replay. Specify event selection, dry-run behavior, rate limits, ordering, idempotency preconditions, monitoring, abort thresholds, audit records, and approval owner. Quarantine uncertain events rather than replaying them blindly. Never recommend bulk replay solely because the provider reports failure.

10. **Verify against failure modes.** Define checks for a valid signed event, byte-altered payload, missing or malformed signature, wrong secret, rotated secret, stale timestamp, sequential duplicate, concurrent duplicate, endpoint timeout after commit, retry after 5xx, out-of-order event, handler crash, downstream partial failure, unsupported event type, and recovery after restart. Include expected observation, actual observation when a test was run, evidence reference, and disposition.

11. **Determine handoff state.** Use only these states: `diagnosed`, `probable cause`, `blocked`, `change proposed`, `change prepared`, `locally tested`, `ready for authorized rollout`, or `unverified`. Claims such as fixed, tested, replayed, deployed, or verified require corresponding execution evidence. A prepared diff is not a deployed fix, a passing unit test is not production verification, and a proposed replay is not an executed replay.

## Required deliverable

Return the following task-specific sections:

1. **Scope and capability record** — incident scope, supplied artifacts, Codex access actually available, actions authorized, actions not performed, blocking gaps, and data-redaction notes.
2. **Webhook attempt timeline** — a table with correlation IDs, attempts, normalized and original timestamps, HTTP outcomes, latency, processing outcomes, side effects, and evidence references.
3. **Evidence ledger** — numbered evidence items with source, evidence state, relevance, reliability limitation, and any conflict.
4. **Failure-stage assessment** — each delivery stage marked supported, failed, bypassed, unknown, or not applicable, with evidence.
5. **Root-cause hypothesis matrix** — ranked hypotheses with supporting and contradicting evidence, confidence, falsification check, and result or unverified status.
6. **Signature, retry, and idempotency findings** — concrete implementation findings, affected files or configuration, operational consequence, and severity.
7. **Remediation package** — smallest safe change, proposed or prepared diff summary, migration and compatibility notes, rollout controls, rollback conditions, and unresolved decisions.
8. **Replay and recovery runbook** — eligibility query or selection logic, reconciliation method, dry run, approval gate, rate limit, monitoring, abort threshold, rollback or quarantine path, and audit evidence to retain. State `not required` when justified.
9. **Verification matrix** — test case, setup, expected observation, actual observation, evidence reference, pass, fail, blocked, or not run status, and follow-up owner.
10. **Acceptance reconciliation** — map every supplied acceptance criterion to evidence and mark it met, not met, blocked, or unverified.
11. **Handoff** — current handoff state, residual risks, approvals required, exact next safe action, and the evidence still needed before any stronger completion claim.