Repository navigation
fix: agent exec loads installed harnesses locally - #119855
Conversation
|
Land-ready proof for exact head Root cause: the scoped-registry refactor removed the implicit process-global owner, but direct local agent commands still reached model/harness selection without a request-owned plugin registry. Architectural owner and fix: local agent-command ingress now owns one lifecycle/request/recovery/plugin-registry generation. It loads only configured runtime owners when no Gateway registry exists; an existing Gateway scope remains authoritative. The old inline local admission block was removed from Production LOC: +102/-44 (net +58). Tests/test support: +88/-24 (net +64). No config, environment, protocol, plugin SDK, dependency, or schema surface changed. Proof:
Best-fix verdict: this is the clean bounded owner-boundary repair. Loading a process-global registry would reintroduce the retired ownership model; adding a downstream harness guard would preserve the empty-registry failure; broad-loading all plugins would add startup work and violate the scoped plan. Known gap: ClawSweeper's later batch publication job hit its GitHub App installation quota, so its exact-head placeholder was not edited. The immutable shard artifact itself completed and was read directly. The earlier exploratory broad |
|
Merged via squash.
|
* fix(agents): bind local plugin harness registry (openclaw#119852) * test(agents): isolate local registry in command suites
Closes #119852
What Problem This Solves
Fixes an issue where users running
openclaw agent execwith a configured plugin-owned native harness would receiveAgent harness runtime ... is not present in the prepared registrybefore the harness could start.Why This Change Was Made
Direct local agent commands now bind one bounded plugin-registry generation around preparation and execution when no Gateway-owned registry is already in scope. The local scope loads only configured runtime owners, while Gateway and embedded hosts keep their existing authoritative registry. The regression fixture now represents a real installed plugin by seeding the canonical SQLite install index.
The local admission/scoping flow moved into a focused module so
agent-command.tsremains below the repository's max-lines gate instead of adding a suppression.Production LOC: +102/-44 (net +58) | Tests: +88/-24 (net +64)
The positive production delta establishes the missing local registry ownership boundary and extracts the existing local admission flow from an oversized orchestrator.
User Impact
Operators can use installed native harness plugins through
openclaw agent execagain. Normal runs inherit the configured harness;--isolatedstill cannot access it, and one-shot run state remains ephemeral.Evidence
src/commands/agent-exec-plugin.e2e.test.tsfailed 1/1 with the prepared-registry error on https://github.com/openclaw/openclaw/actions/runs/31069323224.--isolatedexited 1 without the marker; noagentsdirectory persisted; onlyopenclaw.sqlite*registry files remained. https://github.com/openclaw/openclaw/actions/runs/31075489600pnpm buildandpnpm check:changed: https://github.com/openclaw/openclaw/actions/runs/31076853010.ad56b2ceb8efcfb9866469c63fdb176775eaa7c3: https://github.com/openclaw/openclaw/actions/runs/31078325974.be647c32918125a65512ab9a0ceb358cb5ce6d65.An exploratory broad
test:changedfallback did not complete: https://github.com/openclaw/openclaw/actions/runs/31071327908 ended with VitestWorker exited unexpectedlyafter its preceding shards passed. The exact failed bins, full build, repository-native changed gate, and exact-head hosted CI above are green.AI-assisted: yes. I reviewed the complete affected command, plugin-registry, prepared-runtime, and test paths and understand the ownership change.