Conversation
… permanent (Core-Foundry#643) Webhook retry decisions were spread across two modules with slightly different rules. This introduces one canonical classifier and routes both the delivery service and the bounded retry helper through it. - Add webhook-response-classifier.ts: 2xx -> success; 429 and any 5xx -> retryable; redirects/other 4xx/1xx -> permanent; network/timeout errors -> retryable. Unrecognised outcomes default to permanent (never loop forever). - webhook-delivery-service now reports a 'category' on WebhookDeliveryResult and logs retryable vs permanent failures accordingly. - webhook-retry-helper delegates isRetryable to the classifier (behaviour preserved for the existing status-code matrix). - Document the rules in listener/docs/WEBHOOK_RESPONSE_CLASSIFICATION.md. - Add classifier tests plus category assertions in the delivery tests.
|
@Goodyslim Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #643.
What
Introduces a single, documented classifier for webhook delivery responses and routes both delivery paths through it.
Categories
successretryablepermanentChanges
listener/src/services/webhook-response-classifier.ts-classifyWebhookStatus,classifyWebhookError,isRetryableStatus, plus exported status-code sets. Unrecognised outcomes default topermanentso a bug can only under-retry, never loop.webhook-delivery-service.ts-WebhookDeliveryResultnow carries acategory; logging keys off it (5xx keeps its existing warn message; 429 is now correctly retryable).webhook-retry-helper.ts-isRetryabledelegates to the classifier (existing 4xx/5xx matrix preserved).listener/docs/WEBHOOK_RESPONSE_CLASSIFICATION.mddocumenting the rules.Tests
webhook-response-classifier.test.tscovers representative codes per category and the error classifier.webhook-delivery-service.test.tsgainscategoryassertions for 2xx, 429/5xx, 4xx, timeouts, and network errors. Existing delivery/retry tests are unchanged.