Skip to content

fix(memory): load configured providers for CLI search - #119186

Merged
vincentkoc merged 5 commits into
mainfrom
fix/beta8-memory-cli-plugin-activation
Aug 4, 2026
Merged

vincentkoc merged 5 commits into
mainfrom
fix/beta8-memory-cli-plugin-activation

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where openclaw memory search and read-only memory status commands could ignore configured plugin-owned memory embedding providers. The Gateway could index successfully with the configured provider, while a later CLI process fell back to a different provider identity and returned no matches.

Why This Change Was Made

Memory CLI commands now load a narrow registry containing only the selected memory backend and manifest owners for configured memory embedding providers. The scope is discovery-only: canonical allowlist, deny, and explicit-disable policy remains authoritative and identical to Gateway startup.

User Impact

Users can search memory from a fresh CLI process with the same allowed provider configuration used by the Gateway. Read-only memory commands do not activate unrelated or unallowlisted plugins.

Evidence

@vincentkoc vincentkoc self-assigned this Aug 4, 2026
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: M maintainer Maintainer-authored PR labels Aug 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Aug 4, 2026
@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 10:28 AM ET / 14:28 UTC.

ClawSweeper review

What this changes

The PR makes memory CLI commands load the selected memory backend and configured embedding-provider plugins so fresh searches use the same allowed provider setup as Gateway indexing.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking correctness finding. Current main still skips plugin activation for fresh memory CLI reads, while this PR adds a narrow, policy-preserving registry scope; it remains necessary for maintainer review and the exact-head build artifact gate.

Priority: P1
Reviewed head: 9f40997c7f3879ebd9a3a4256df9281d3b6c615f

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The scoped repair and focused policy coverage are solid, with no actionable review finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR is outside the external-contributor proof gate; its body nevertheless links exact-head checks and runtime proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is outside the external-contributor proof gate; its body nevertheless links exact-head checks and runtime proof.
Evidence reviewed 6 items Current-main gap: On current main, memory search and read-only status skip config validation and set plugin loading to never; pre-action then returns before registry activation.
Narrow repair at the owner boundary: The PR adds a memory registry scope that derives configured embedding-provider owners from the Gateway collector, includes the selected memory backend, and passes only that scope to the canonical loader.
Activation policy remains authoritative: Scoped candidates still pass the canonical activation resolver, which blocks global disablement, denylisted plugins, explicit disablement, and restrictive-allowlist omissions before runtime import.
Findings None None.
Security None None.

How this fits together

CLI memory commands resolve startup policy before searching the local memory index. Gateway startup already maps configured embedding providers to plugin owners; this change gives fresh CLI processes the same narrow runtime activation path.

flowchart LR
A[CLI memory command] --> B[Command startup policy]
B --> C[Pre-action bootstrap]
D[Configured memory settings] --> E[Scoped memory registry]
C --> E
E --> F[Selected backend and provider plugins]
F --> G[Memory search or status result]
Loading

Before merge

  • Resolve merge risk (P1) - Fresh memory reads now execute the configured provider owner in a new CLI process; retain the scoped allow/deny/disable behavior and wait for the exact-head package artifact gate to confirm packaged lazy imports.
  • Complete next step (P2) - No mechanical repair is indicated; this MEMBER-authored, maintainer-labeled PR needs normal exact-head merge validation and human review.
Agent review details

Security

None.

PR surface

Source +42, Tests +203. Total +245 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 4 55 13 +42
Tests 7 216 13 +203
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 271 26 +245

Review metrics

Metric Value Why it matters
Production versus test delta production +55/-11, tests +216/-15 The production growth implements one narrow CLI-to-plugin activation boundary; the larger test delta covers policy and owner-resolution cases.
CLI registry scope 1 added: memory This activates only the selected memory backend and configured embedding-provider owners without adding a user configuration surface.

Stored data model

Persistent data-model change detected: vector/embedding metadata: src/plugins/channel-plugin-ids.test.ts, vector/embedding metadata: src/plugins/runtime/runtime-registry-loader.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Complete exact-head package validation (recommended)
    Let the in-progress build-artifacts and merge gate finish for the current head before merging the CLI startup behavior change.

Technical review

Best possible solution:

Keep the dedicated memory scope, preserve canonical plugin policy, and merge after the exact head completes its artifact and GitHub merge gates.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: configure a plugin-owned embedding provider, index through Gateway, then run a fresh memory search on current main; the current startup policy prevents that provider registry from loading. This review did not execute the live setup.

Is this the best way to solve the issue?

Yes. A command-policy-selected, manifest-derived scope fixes the owner boundary without loading every plugin or duplicating provider ownership inside memory commands.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 52954a1fa8f4.

Labels

Label justifications:

  • P1: A fresh CLI memory search can silently miss data that Gateway indexed under the same configured provider.
  • merge-risk: 🚨 compatibility: Existing configurations with a selected embedding provider now activate that provider plugin during fresh CLI memory reads.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR is outside the external-contributor proof gate; its body nevertheless links exact-head checks and runtime proof.

Evidence

What I checked:

  • Current-main gap: On current main, memory search and read-only status skip config validation and set plugin loading to never; pre-action then returns before registry activation. (src/cli/command-catalog.ts:611, 52954a1fa8f4)
  • Narrow repair at the owner boundary: The PR adds a memory registry scope that derives configured embedding-provider owners from the Gateway collector, includes the selected memory backend, and passes only that scope to the canonical loader. (src/plugins/runtime/runtime-registry-loader.ts:21, 9f40997c7f38)
  • Activation policy remains authoritative: Scoped candidates still pass the canonical activation resolver, which blocks global disablement, denylisted plugins, explicit disablement, and restrictive-allowlist omissions before runtime import. (src/plugins/loader-runtime-candidate.ts:92, 52954a1fa8f4)
  • Focused coverage: Exact-head tests cover manifest owner mapping, restricted allowlists, deny and explicit-disable policy, and an empty scope when memory is disabled. (src/plugins/runtime/runtime-registry-loader.test.ts:164, 9f40997c7f38)
  • Current-path provenance: Blame assigns the pre-PR startup branch and registry loader baseline to the current shallow-boundary commit; the PR head is directly based on current main. (src/cli/program/preaction.ts:140, 0dc99706243e)
  • Release check: No local release tag contains the PR head; the requested repair is not on current main and therefore is not shipped. (9f40997c7f38)

Likely related people:

  • vincentkoc: Current-main blame attributes the pre-action and registry baseline to Vincent Koc, and the exact PR head contains five commits by the same contributor. (role: recent CLI and plugin-runtime contributor; confidence: high; commits: 0dc99706243e, 9f40997c7f38; files: src/cli/program/preaction.ts, src/plugins/runtime/runtime-registry-loader.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Allow build-artifacts and GitHub's exact-head merge gate to complete before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (6 earlier review cycles)
  • reviewed 2026-08-04T11:04:17.001Z sha 12ec9b9 :: needs changes before merge. :: [P1] Resolve embedding adapters to owner plugins
  • reviewed 2026-08-04T11:18:50.490Z sha e221a4a :: found issues before merge. :: [P1] Preserve restrictive plugin allowlists
  • reviewed 2026-08-04T11:29:24.110Z sha 2ec89af :: needs changes before merge. :: [P1] Preserve restrictive plugin allowlists
  • reviewed 2026-08-04T13:28:11.891Z sha af50418 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T14:06:28.362Z sha af50418 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-04T14:17:58.427Z sha 9f40997 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. labels Aug 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/beta8-memory-cli-plugin-activation branch from 2ec89af to af50418 Compare August 4, 2026 13:22
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact repaired head af50418f94e2d75ca08a5c3eb532f3082cf2c1d0 removes the memory-only restrictive-allowlist bypass and preserves canonical allowlist, deny, and explicit-disable policy. Added Gateway/fresh-CLI parity coverage for an unallowlisted configured provider.

Proof:

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc

Copy link
Copy Markdown
Member Author

ClawSweeper rank-up move is already satisfied on the reviewed head af50418f94e2d75ca08a5c3eb532f3082cf2c1d0:

No rank-up move is being skipped; the durable review's “pre-final-head” characterization is stale relative to the evidence already recorded in the PR body.

@vincentkoc
vincentkoc marked this pull request as ready for review August 4, 2026 14:00
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 4, 2026
@vincentkoc
vincentkoc force-pushed the fix/beta8-memory-cli-plugin-activation branch from 1e66fd8 to 9f40997 Compare August 4, 2026 14:11
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 4, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Final rebased head 9f40997c7f3879ebd9a3a4256df9281d3b6c615f preserves the reviewed production tree and adds only the missing plugin-owned memory root classification found by exact-head CI.

Proof:

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vincentkoc
vincentkoc merged commit 1aedd8f into main Aug 4, 2026
130 of 132 checks passed
@vincentkoc
vincentkoc deleted the fix/beta8-memory-cli-plugin-activation branch August 4, 2026 14:31
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Aug 4, 2026
…licy-config-20260804

* origin/main:
  fix(memory): load configured providers for CLI search (#119186)
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main:
  fix(agents): protect private memory in shared chats (#119198)
  perf(cli): skip absent gateway workspace dotenv (#119227)
  fix(agents): observe native provider prompt egress (#119219)
  fix(feishu): report bot identity retry failures (#102185)
  fix(memory): load configured providers for CLI search (#119186)
  fix(discord): count retained speech bytes
  test(discord): isolate exact speech overflow
  test(discord): cover exact speech overflow
  fix(discord): bound realtime exact speech
vincentkoc added a commit that referenced this pull request Aug 4, 2026
* origin/main:
  fix(agents): protect private memory in shared chats (#119198)
  perf(cli): skip absent gateway workspace dotenv (#119227)
  fix(agents): observe native provider prompt egress (#119219)
  fix(feishu): report bot identity retry failures (#102185)
  fix(memory): load configured providers for CLI search (#119186)
  fix(discord): count retained speech bytes
  test(discord): isolate exact speech overflow
  test(discord): cover exact speech overflow
  fix(discord): bound realtime exact speech
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 5, 2026
* fix(memory): activate configured providers in CLI commands

* fix(memory): resolve configured embedding provider owners

* test(memory): keep metadata mock unset by default

* fix(memory): preserve plugin allowlist policy

* test(memory): classify plugin-owned root command
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 6, 2026
* origin/main:
  fix(agents): protect private memory in shared chats (openclaw#119198)
  perf(cli): skip absent gateway workspace dotenv (openclaw#119227)
  fix(agents): observe native provider prompt egress (openclaw#119219)
  fix(feishu): report bot identity retry failures (openclaw#102185)
  fix(memory): load configured providers for CLI search (openclaw#119186)
  fix(discord): count retained speech bytes
  test(discord): isolate exact speech overflow
  test(discord): cover exact speech overflow
  fix(discord): bound realtime exact speech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant