Reconcile missed webhooks with job status polling

3 November 2026

Network switches with blue and green Ethernet cables in a rack.
Illustrative photograph. Cropped and resized. Photo: “Wikimedia Servers-0001 42.jpg” — Helpameout / Wikimedia Commons. · CC BY-SA 3.0

When automated webhook notifications fail to deliver, asynchronous status polling acts as the essential fallback mechanism to discover terminal job states. To reconcile a missed webhook notification with an API status query, the integration engine must record the polled terminal state under a canonical job identity and revision number, assign a unique output identity to prevent secondary execution, and log an explicit reconciliation record. When the delayed webhook subsequently arrives, the receiver evaluates its job revision and event identifier against the stored terminal state, distinguishing a newly seen event from a duplicate business action.

Understanding Missed Webhook Scenarios in PDF Workflows

In distributed document processing systems, HTTP webhook deliveries can fail due to network timeouts, service restarts, or transport errors. If a webhook event is lost in transit, a system relying solely on push notifications risks leaving completed jobs unresolved. Active status polling provides a necessary safeguard by querying the provider's API for job status updates.

In local contract testing, event structures follow schema templates such as event-contract.json, defining fields including kind (PROPOSED_EVENT_NOT_VENDOR_SPEC), schema_version (1), source (SYN-PROCESSOR), event_id (E02), tenant (SYN-T01), job_id (SYN-J01), job_revision (2), and state (SUCCEEDED). For the proposed pilot, suppose a poll reports SYN-J01 at terminal revision 2 before an event arrives. Keep that assumption separate from the measured event sequence. Event contract · Signed event results

Reconcile state and delivery without executing the result twice

Treat the API poll as one observation of the job, and a later webhook as a separately identified observation. A previously unseen event ID can corroborate an already processed result. It is not necessarily a duplicate delivery. The business action, such as attaching an approved output, can nevertheless be a duplicate action that should be suppressed. Event contract · Signed event results

Observation in the hypothetical pilotWhat to saveDecision to test
Poll reports a terminal job with no completion event on fileAuthorised endpoint result, tenant, job revision, observed state and stable output identifier or versionVerify that the output exists and that the same business action has not already been committed.
Matching terminal event arrives laterIts own event ID, signature check, job revision, output reference and arrival timeRecord the new delivery and reconcile it to the polled result. Avoid a second attachment, mail or posting.
Earlier running-state event arrivesIts distinct event ID plus the older revisionKeep it for audit without rolling back the terminal result.
Poll and valid event disagreeBoth observations and their provenanceHold downstream effects and query the appropriate source of truth; do not silently prefer whichever arrived last.

Choose an action key with enough scope to distinguish tenant, job, output version and purpose. A single job can produce several outputs, so a job ID alone may suppress legitimate work. Conversely, using a different key for push and poll may send the same output twice. Use a conditional write or transaction to reserve the downstream action and record its outcome; test two workers reaching the decision at the same time.

What the local fixture did show

The supplied contract uses tenant SYN-T01, job SYN-J01 and revisions 1 and 2. The local events recorded completion at revision 2, a repeated delivery and a stale running event at revision 1. The duplicate event and stale event did not roll the job back. An authenticated body that reused an already-seen event ID with different contents was rejected as an identity conflict. An unknown schema and a different tenant were separate cases. None of those observations came from a status API or a polling transaction. Event contract · Signed event results

Synthetic Test Scope and Execution Context

Evaluation records reflect specific local environment parameters. Synthetic evaluation was conducted using Python 3.12.14 with 0 external network calls, a fixture clock set to 2026-10-31T12:00:00Z, a freshness window of 300 seconds, and public test key PUBLIC_TEST_VALUE_NOT_A_CREDENTIAL under HMAC-SHA256 signature validation. Event contract · Signed event results

The local webhook_server component is explicitly recorded as NOT_RUN. Unexecuted fixture templates establish no live network interactions. While the test suite passed 9 local cases, evidence documents two operational limitations: no endpoint, TLS, durable queue, provider redelivery, or source-of-truth API was exercised, and the fixture remains a bounded local test rather than a production validation or security audit. Event contract · Signed event results

Next Step: Validating Webhook Reconciliation in Future Tests

To verify polling fallback and duplicate prevention, plan a local integration test that simulates a network disconnection during job processing, asserts that API polling records SYN-J01 as SUCCEEDED at revision 2, and confirms that a previously unseen completion delivery is recorded without triggering a second downstream action. Event contract · Signed event results

Part of the Test duplicate and out-of-order PDF webhook events guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).