Repository navigation
refactor: extract Tool Search code controller - #113237
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 24, 2026 05:43
steipete
force-pushed
the
codex/z-tool-search-extract
branch
from
July 24, 2026 05:52
1902a67 to
034d812
Compare
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 24, 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
src/agents/tool-search.tsmixed the host-side Tool Search catalog runtime with a self-contained 7.5 KB child-process controller/model bridge program, making an already oversized owner module harder to navigate and maintain.Why This Change Was Made
Extract the embedded child program verbatim into
tool-search-code-mode-child.tsbehind one narrow source-string export. The host runtime still passes the exact same bytes to Node's--eval; no protocol, config, schema, fallback, or runtime behavior changes. This is AI-assisted maintainer-commissioned LOC-reduction work.The grandfathered max-lines suppression remains: live lint counts 2,157 code lines after extraction against the 700-line limit, so removing it or its baseline entry would weaken/break the ratchet rather than shrink it correctly.
User Impact
No user-visible impact. Tool Search code mode keeps the same sandbox, bridge behavior, error handling, logging, timeout, and IPC protocol while the source ownership is easier to follow.
Evidence
+250/-254(net-4); tests+0/-0.02c26ae9023afe85f6d289a5a33fb03a3e6b5832cc89df9920ec16402ead046e592068f1bbff051e5c073462ced3d320ef0eb83ead957420cf6e17761a44fb6ce0ae86b3690148471d656abaf12640b4b883094777130dd94f69d860d7c56260node scripts/run-vitest.mjs src/agents/tool-search.test.ts src/agents/tool-search.stream-errors.test.ts— 2 files, 81 tests passed.node scripts/check-changed.mjs -- src/agents/tool-search.ts src/agents/tool-search-code-mode-child.ts— passed on Blacksmith Testbox; typechecks, targeted lint, formatting, ratchets, import-cycle analysis, plugin boundaries, and selected guards green (run 30069913329).034d812865bbf2c7422835dbc954d097f3e0c1cb(run 30070641030).f479afb589c2f6b9886c0572d3dd8c3a4f431716— stable patch ID672b602b3c1edc332eba71e39d1b114b18723df0before and after..agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main ...— clean on the final branch, no accepted/actionable findings.Rank-up moves:section to apply; fleet status showed 726 OpenClaw reviews pending (comment).git diff --check— passed.