Skip to content

refactor(infra): split outbound delivery services - #113099

Merged
steipete merged 2 commits into
mainfrom
refactor/split-outbound-deliver
Jul 23, 2026
Merged

steipete merged 2 commits into
mainfrom
refactor/split-outbound-deliver

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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.ts facade. 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.ts and node scripts/check-import-cycles.ts — zero cycles.
  • node scripts/check-deadcode-exports.mjs — production/full-tree/script scans passed.
  • Hosted 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.
  • Blacksmith Testbox run: https://github.com/openclaw/openclaw/actions/runs/30025021912
  • $HOME/.claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean, no accepted/actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XL maintainer Maintainer-authored PR labels Jul 23, 2026
@steipete
steipete marked this pull request as ready for review July 23, 2026 16:49
@steipete
steipete merged commit 6f6c2ac into main Jul 23, 2026
195 of 197 checks passed
@steipete
steipete deleted the refactor/split-outbound-deliver branch July 23, 2026 17:01
@steipete

Copy link
Copy Markdown
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant