Repository navigation
perf(cli): finish cold read paths - #117957
Conversation
|
Codex review: found issues before merge. Reviewed August 2, 2026, 6:50 AM ET / 10:50 UTC. ClawSweeper reviewWhat this changesThe PR keeps Merge readiness⛔ Blocked by patch quality or review findings - 7 items remain This PR is still necessary, but the prior P1 blocker remains on the updated head: the shared memory configuration helper skips plugin validation for mutating Priority: P2 Review scores
Verification
How this fits togetherOpenClaw’s command catalog decides whether each CLI invocation validates configuration and loads plugin command groups before the command handler runs. The memory plugin then reads its own configuration and performs read, index, or repair work for the selected agent. flowchart LR
User[CLI invocation] --> Policy[Command startup policy]
Policy --> Guard[Config and plugin validation]
Guard --> Registration[Plugin command registration]
Registration --> Memory[Memory command handler]
Memory --> Action[Read, index, or repair action]
Action --> Output[CLI output]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +85, Tests +251. Total +336 across 14 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Make the shared memory loader accept an explicit read-only validation-bypass mode, pass it only from Do we have a high-confidence way to reproduce the issue? Yes, from source: any malformed unrelated plugin configuration combined with Is this the best way to solve the issue? No: applying Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against de0fa7c2084c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
The latest ClawSweeper P1 is inapplicable because plugin validation for mutating memory commands is owned by the CLI startup guard, not repeated inside the memory helper.
Accordingly, malformed plugin configuration still blocks |
|
Merged via squash.
|
* perf(cli): finish cold read paths * test(cli): satisfy cold path lint gates * test(cli): fix cold path fixture typing
What Problem This Solves
A production CLI sweep after #117932 found five more read-only commands still paying the plugin-load storm on a host with ~150 installed plugins:
hooksskills search <term>memory status --agent <id>skills info <skill>memory search <q> --jsonBaselines on that host:
openclaw --version43 ms,gateway call health~1.8 s, and post-#117932skills list~1.15 s. This finishes the sweep begun in #117705 / #117751 / #117880 / #117900 / #117932.Why This Change Was Made
Each command was diagnosed rather than blanket-patched, and the worst one had a distinct cause:
hookswas the outlier:buildPluginDiagnosticsReport()executed all 151 discovered plugin runtimes. Runtime loading is now scoped to the canonical Gateway startup plan (13 plugins for an empty config), which preserves nativeapi.registerHook()contributions — the reason the report loaded runtimes at all — while not executing unrelated plugins. Barehooksalso skips unrelated config validation. Local repro: 30.53 s → 2.80 s.skills searchlacked a cold catalog policy, so its early proxy-config read validated every plugin; it now usesconfigGuard: "skip"/loadPlugins: "never"while keeping network-proxy routing intact for ClawHub.skills infowas simply a missed sibling oflist/check— its gateway-first and manifest fallback were already correct, so it gets the same policy.memory status/memory searchwere validating unrelated plugins at three separate boundaries: the global guard, plugin-CLI registration, and a command-local config read. All three now skip unrelated validation while still loading the manifest-selected memory owner — the memory engine is a bundled plugin the command genuinely needs, so the goal was never to skip it.memory status --indexand--fixdeliberately retain full validation because they mutate. Thememory searchresult shape and its staleness qualification (from #117706) are unchanged and covered by tests.User Impact
hooksskills searchmemory searchmemory statusskills infoNo output shapes changed. Mutating paths keep their guards.
Evidence
pnpm tsgo:core,pnpm build(3m05s, no[INEFFECTIVE_DYNAMIC_IMPORT]),git diff --check: passed.gpt-5.6-sol, high): clean, "patch is correct" (0.98); trufflehog clean.+67/-19(net +48, explicit startup-policy and ownership plumbing); tests net +267. No new config surface, compatibility path, or fallback.Note: this machine could not recreate the ~150-plugin production topology for the four non-
hookscommands, so the throwing-plugin fixture is the scale-independent proof for those.