Repository navigation
refactor(gateway): split session utilities - #113118
Merged
Merged
Conversation
steipete
force-pushed
the
refactor/split-gateway-session-utils
branch
from
July 23, 2026 17:39
20684e7 to
e763fb0
Compare
steipete
marked this pull request as ready for review
July 23, 2026 17:40
steipete
force-pushed
the
refactor/split-gateway-session-utils
branch
from
July 23, 2026 18:37
9263428 to
2061ca9
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 2026
* refactor(gateway): split session utilities * fix(gateway): privatize thinking row projection
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
src/gateway/session-utils.tshad grown past 3,000 lines and required a grandfathered max-lines suppression, coupling client-visible row projection, store targeting, model/thinking metadata, search, and pagination.Why This Change Was Made
Split the unchanged public facade into focused contracts, list-context projection, store access/target resolution, model/thinking projection, row construction, search, and pagination modules. Shared row/store contracts and model-cache identity live in a leaf module, keeping the runtime import graph acyclic and preserving client projection shapes.
The production diff grows by about 186 lines, almost entirely explicit imports and the public re-export facade. No projection path or compatibility behavior is duplicated.
User Impact
No user-visible behavior changes. Gateway clients receive the same session rows, thinking/model metadata, store resolution, search results, and pagination while every resulting module stays below 700 physical lines.
Evidence
node scripts/run-vitest.mjs src/gateway/session-utils.test.ts src/gateway/session-utils.fs.test.ts src/gateway/session-utils.subagent.test.ts— 232 tests passed.node --import tsx scripts/check-madge-import-cycles.ts— zero cycles.node scripts/check-changed.mjs -- <touched files>— passed on Blacksmith Testbox, including both typechecks, full core lint, max-lines ratchet, boundary guards, and zero runtime import cycles.$HOME/.claude/skills/autoreview/scripts/autoreview --mode branch --base origin/main— clean.