Skip to content

Split WebHookManager into delivery client and route factory - #75

Merged
Skeyelab merged 1 commit into
masterfrom
Skeyelab/gh-issue-66-webhook-split
Jun 17, 2026
Merged

Skeyelab merged 1 commit into
masterfrom
Skeyelab/gh-issue-66-webhook-split

Conversation

@Skeyelab

Copy link
Copy Markdown
Member

Closes #66

Summary

  • Extracts HTTP delivery, HMAC signing, retry/backoff, and delivery recording into WebhookDeliveryClient (injectable URLSession, KeychainAccessor)
  • Extracts route-wiring into WebhookRouteFactory: produces [Route] with live call closures from RichWebhook — eliminates the "patch empty closure at runtime" pattern from updateHooks
  • WebHookManager is now a thin coordinator: owns keychain bootstrapping and MessageDelegate/RoutingModule conformance; delegates HTTP work to the client
  • WebhookManagementWindowController.sendTest() now uses WebhookDeliveryClient (same signing/retry/recording path as production) instead of a direct URLSession.shared.dataTask call
  • Updated WebhookDeliveryTests to reference WebhookDeliveryClient static methods directly

Test plan

  • bash ./.github/scripts/test-macos.sh — 106 tests, all pass
  • All WebhookTests pass (integration via WebHookManager)
  • All WebhookDeliveryTests pass (unit tests updated to target WebhookDeliveryClient)
  • testWebHookManagerPersistsDelivery fixed to filter notifications by wm.client object (prevents stale notification interference from prior tests)

🤖 Generated with Claude Code

Extract HTTP/signing/retry logic into WebhookDeliveryClient and route
wiring into WebhookRouteFactory; WebHookManager becomes a thin coordinator.
sendTest() in the management UI now uses the production delivery path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Skeyelab
Skeyelab merged commit abe5208 into master Jun 17, 2026
2 checks passed
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.

Architecture: split WebHookManager into delivery client and route factory

2 participants