refactor(session-catalog): normalize search at gateway#108240
Merged
Conversation
Co-authored-by: Leon-SK668 <[email protected]>
Contributor
Author
|
Land-ready at exact head Retrospective result:
Validation:
Direct Codex dependency check at
No known proof gaps. Co-authorship preserves Leon-SK668's contribution from the earlier fix that exposed this duplication. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 16, 2026
Co-authored-by: Leon-SK668 <[email protected]>
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 session catalog gateway accepted one
searchvalue, but ACPX and OpenCode each repeated the same trim, empty-value, 500-code-unit, and surrogate-boundary policy in local and node paths. That duplicated a gateway-wide input invariant and left every other provider free to observe different values.Why This Change Was Made
This is the retrospective cleanup from the recent session-search fixes. Normalize once at the generic gateway owner boundary, document the provider contract, and delete the ACPX/OpenCode copies. The centralized tests exercise two providers, blank input, a surrogate pair crossing the cap, and a complete pair ending at the cap.
Net result: 54 insertions, 108 deletions; one canonical policy instead of four runtime branches and duplicate provider test matrices.
User Impact
Session catalog search keeps the same trimmed, non-empty, UTF-16-safe 500-code-unit behavior. The behavior is now consistent for every registered provider, including Codex and Anthropic catalogs.
Evidence
tbx_01kxjm8kwpya8ksxy9hs21ndp2ThreadListParams.search_termis optional substring input; the server owns its own search semanticspnpm check:changedrunning against the exact patch; exact-head hosted CI remains the merge gateCo-authorship preserves the contributor whose prior fix exposed the duplicated invariant.