Repository navigation
refactor(auto-reply): split config dispatch pipeline - #113154
Merged
Merged
Conversation
steipete
force-pushed
the
steipete/simplify-w3-dispatch-split
branch
from
July 23, 2026 22:07
3bca539 to
2f19e50
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
* refactor(auto-reply): split config dispatch pipeline * refactor(auto-reply): keep phase result types private
This was referenced Nov 9, 2026
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
dispatchReplyFromConfigInnerwas the repository's most complex function: 2,821 lines with a branch score of 234, inside a 3,061-line file that required a max-lines exception. Its intertwined request preparation, routing, execution, and finalization made safe review and parallel maintenance unnecessarily difficult.Why This Change Was Made
This is a behavior-preserving structural decomposition into named gather, delivery preparation, operation preparation, route selection, execution preparation, execution, and finalization phases. A single prepared-state object flows forward; mutable facts use live accessors so later callbacks and audit handling observe the same state without rediscovery or copied stale booleans.
The entry module is now 98 lines, every extracted production module is at or below 654 lines, and the obsolete max-lines baseline entry is removed. The +809 net line delta is explicit phase-state and module-boundary plumbing around the unchanged dispatch logic; no behavior, config, protocol, or persistence contract changed.
Collision note: #96095, #97649, and #83988 were open and updated within 48 hours when this work started. #96095 and #83988 overlap the final-delivery/TTS region; #97649 changes the ACP/hook routing region. This PR does not duplicate their semantic changes and will need semantic rebasing if one lands first. #109109 was also open but outside the 48-hour active window.
User Impact
No user-visible behavior changes. Maintainers get a reviewable dispatch pipeline with explicit ownership boundaries and no max-lines suppression.
Evidence
dispatch-from-config.test.tsand final-outcome counts, 278/278 passing.src/auto-replysuites (4,456 tests), Discord reply delivery (18), and Slack outbound delivery (3) passed.check:changedpassed production/test typechecks, formatting, max-lines, lint, architecture guards, and import-cycle checks.gpt-5.6-sol, xhigh): no findings; patch correctness confidence 0.91.