Repository navigation
refactor(infra): split outbound delivery services - #113099
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 23, 2026 16:49
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
* refactor(infra): split outbound delivery services * fix(infra): preserve outbound compatibility surface
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.
What Problem This Solves
The outbound delivery implementation had grown to 2,854 lines, combining channel resolution, payload planning, hooks, durable queue transitions, platform execution, result reconciliation, and transcript mirroring in one grandfathered module. That made the delivery boundary hard to review and maintain.
Why This Change Was Made
This maintainer-requested refactor splits those responsibilities into focused modules behind the existing
deliver.tsfacade. Queue ordering, unknown-send handling, hook behavior, result identity reconciliation, media custody, and transcript mirroring remain unchanged. The max-lines suppression and baseline entry are removed, and every resulting module is below 700 lines.The generated Plugin SDK API manifest changes only because it records declaration source paths for channel message/outbound entrypoints; exported symbols and signatures remain intact. AI-assisted.
User Impact
No user-visible behavior changes. Maintainers can review and evolve outbound delivery planning, queueing, and transport execution independently.
Evidence
node scripts/run-vitest.mjs src/infra/outbound/deliver.test.ts src/infra/outbound/deliver.queue-integration.test.ts src/infra/outbound/delivery-queue-media-directive-durability.test.ts src/channels/message/send.test.ts src/channels/turn/durable-delivery.test.ts— 191 tests passed across 2 shards.node scripts/check-madge-import-cycles.tsandnode scripts/check-import-cycles.ts— zero cycles.node scripts/check-deadcode-exports.mjs— production/full-tree/script scans passed.node scripts/check-changed.mjs -- <touched paths>— passed, including max-lines ratchet, SDK/deprecation guards, core/core-test typechecks, full core/script lint, database/state guards, and runtime-cycle checks.$HOME/.claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean, no accepted/actionable findings.