Repository navigation
refactor(gateway): split session handlers - #107677
Merged
Merged
Conversation
steipete
force-pushed
the
codex/refactor-gateway-sessions
branch
from
July 14, 2026 17:27
53508bd to
0e2cbed
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 15, 2026
* refactor(gateway): split session handlers * chore(gateway): drop obsolete max-lines suppression * test(gateway): preserve session boundary ratchets * test(gateway): update session boundary fixtures * style(auto-reply): restore formatter compliance
Closed
4 of 6 tasks
zooqueen
pushed a commit
to zooqueen/openclaw
that referenced
this pull request
Sep 11, 2026
* refactor(gateway): split session handlers * chore(gateway): drop obsolete max-lines suppression * test(gateway): preserve session boundary ratchets * test(gateway): update session boundary fixtures * style(auto-reply): restore formatter compliance
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 gateway session RPC surface had grown into one nearly 4,000-line module spanning unrelated read, lifecycle, messaging, compaction, and mutation responsibilities. That made ownership and review difficult and left the file grandfathered above the repository max-lines limit.
Why This Change Was Made
Split the handler implementation into responsibility-focused modules while keeping
sessions.tsas the small public composition point. Preserve the existing handler registry and behavior, extract only the model-backed compaction request builder, and retarget the session accessor/transcript boundary ratchets to every new child module.The final commit also restores one missing trailing comma in
src/auto-reply/reply/reply-config-runtime-mode.ts. That malformed file was already onmainfrom #107678 and made every new exact-head formatter cohort fail; the repair is formatting-only and isolated from the session refactor.No protocol, config, storage, or user-visible behavior changes.
User Impact
No user-visible change. Maintainers get smaller review surfaces, explicit ownership boundaries, and normal max-lines enforcement for the session gateway methods.
Evidence
sessions.tsbaseline removed.oxfmt --checkpassed for all changed TypeScript files and the current-main formatter repair.AI-assisted. I reviewed the handler boundaries, registry parity, compaction extraction, guard retargeting, exact-set fixtures, and formatter repair and understand the resulting code.