Repository navigation
refactor(agents): split embedded runner orchestration - #106552
Merged
Merged
Conversation
Contributor
Author
|
Land-ready proof for exact head
Known proof gaps: none. |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 14, 2026
* refactor(agents): split embedded runner orchestration * test(agents): fix skill startup fixture type * style(agents): format runner imports * refactor(agents): remove stale attempt import * refactor(agents): reuse attempt result slot type * fix(test): avoid truncating extension test inventory
This was referenced Oct 27, 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.
Related: #72072
What Problem This Solves
The embedded runner entry points mixed queue admission, lifecycle ownership, session bootstrap, progress reporting, model resolution, auth scoping, skill startup, and tool-runtime preparation into two very large orchestration modules. That made ordering and cleanup invariants difficult to review.
Why This Change Was Made
Extract cohesive, narrow helpers while keeping the retry loop and per-attempt stream sequence visible in their owning orchestrators.
run.tsdrops from 5,092 to 4,413 lines;run/attempt.tsdrops from 3,867 to 3,469 lines against currentmain. Every new production helper is 220 lines or smaller.The extraction also makes two existing cleanup obligations explicit: restore skill environment overrides when later startup preparation throws, and dispose partially created MCP/LSP runtimes when later bundle preparation fails.
The test-planner guard now gives
git ls-filesa 16 MiB output buffer. The repository inventory crossed Node's 1 MiBspawnSyncdefault, which truncated discovery and incorrectly forced a filesystem fallback.User Impact
No intended user-visible behavior change. Internal runner ownership and review surfaces become smaller; existing API, config, protocol, provider, and tool behavior remain unchanged.
Evidence
7e66f090fdac712241518d85cdf556ea58cdd6fftbx_01kxe70qwrrt6vkm3m8jehfsrkgit diff --checkpassed.pnpm check:changedpassed on the same Testbox lease in 12m36.856s, including core/core-test typechecks, tooling checks, all core lint shards, database-first guards, and import-cycle checks.