Skip to content

fix(gateway): allow memory slot tool plugin invokes#75160

Open
Etnly wants to merge 1 commit intoopenclaw:mainfrom
Etnly:fix/p0b-memory-tools-invoke-20260430
Open

fix(gateway): allow memory slot tool plugin invokes#75160
Etnly wants to merge 1 commit intoopenclaw:mainfrom
Etnly:fix/p0b-memory-tools-invoke-20260430

Conversation

@Etnly
Copy link
Copy Markdown

@Etnly Etnly commented Apr 30, 2026

Summary

  • add regression coverage for Gateway HTTP /tools/invoke fallback to plugin-backed memory slot tools
  • verify memory slot tool ids resolve successfully when they are cataloged core ids but only available through the configured plugin slot
  • verify ordinary known core tool invokes still keep plugin tools disabled

Why

/tools/invoke needs to support memory slot tools such as memory_search / memory_get when memory is provided through the configured plugin slot. Upstream main now contains the generalized production fallback behavior: first resolve known core tools with plugin tools disabled, then fall back to plugin-enabled resolution if that requested known core tool is absent.

This PR keeps that production implementation and adds targeted tests to lock the behavior so memory slot tools do not regress.

Verification

Executed from a clean local worktree on branch fix/p0b-memory-tools-invoke-20260430 after rebasing onto current upstream main:

  • node scripts/run-vitest.mjs run --config test/vitest/vitest.gateway.config.ts src/gateway/tools-invoke-http.test.ts — PASS, 27/27
  • pnpm tsgo:core:test — PASS
  • pnpm tsgo:core — PASS
  • git diff --check — PASS
  • pnpm exec oxfmt --check src/gateway/tools-invoke-http.test.ts — PASS

Notes

  • Current head: b167c63bb52458bca863b46f33c78ad324ae431c
  • Stable patch-id after rebase: 35635d4cfe2d909e8ba6e5236602eadfc170d58b
  • GitHub currently reports the PR as mergeable; CI/review still needs to complete.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Apr 30, 2026
@Etnly Etnly force-pushed the fix/p0b-memory-tools-invoke-20260430 branch from 3ac08f0 to b167c63 Compare April 30, 2026 16:28
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented Apr 30, 2026

Codex review: needs maintainer review before merge.

Summary
The PR adds Gateway HTTP /tools/invoke tests that model memory_search and memory_get as plugin-backed memory slot tools and assert ordinary known core invokes still keep plugin tools disabled.

Reproducibility: yes. The PR creates a deterministic unit path where memory_search is a cataloged core ID that disappears when plugin tools are disabled, then verifies /tools/invoke retries with plugin tools enabled.

Next step before merge
No automated repair is needed from code review, but the branch is currently dirty against main and needs rebase/conflict handling plus normal maintainer review.

Security
Cleared: The diff is test-only and does not change runtime code, workflows, dependencies, package metadata, permissions, or secret handling.

Review details

Best possible solution:

Keep the current runtime fallback and land this focused memory-slot regression coverage after the branch is rebased and normal maintainer review passes.

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

Yes. The PR creates a deterministic unit path where memory_search is a cataloged core ID that disappears when plugin tools are disabled, then verifies /tools/invoke retries with plugin tools enabled.

Is this the best way to solve the issue?

Yes for the patch content. Because the production fallback already exists on main, targeted regression coverage is the narrowest maintainable change; the remaining issue is mergeability, not design.

Acceptance criteria:

  • Rebase the PR onto current main, then run the targeted gateway test for src/gateway/tools-invoke-http.test.ts and the relevant core test/type lanes.
  • Confirm the PR remains test-only or explain any conflict-resolution runtime changes before merge.

What I checked:

Likely related people:

  • @ai-hpc: Merged PR feat(gateway): add SDK-facing tools.invoke RPC #74804 added the shared invokeGatewayTool path and SDK-facing tools.invoke surface that this PR covers with memory-specific regression tests. (role: introduced current shared Gateway tool-invoke implementation; confidence: high; commits: ef0eb126159f; files: src/gateway/tools-invoke-shared.ts, src/gateway/server-methods/tools-invoke.ts, src/gateway/tools-invoke-http.test.ts)
  • @steipete: Recent history shows maintenance on the gateway test harness, plugin-backed catalog tool fallback, and tool catalog surfaces involved here. (role: recent gateway/tool-policy maintainer; confidence: medium; commits: 98a99765af18, 161b72230387, c4e5ca862517; files: src/gateway/tools-invoke-http.test.ts, src/gateway/tools-invoke-shared.ts, src/agents/tool-catalog.ts)
  • @BunsDev: Recent commit history on tools-invoke-shared.ts includes fix(gateway): keep requested plugin tools invokable #76285 for keeping directly requested plugin tools invokable under restrictive profiles, adjacent to the fallback behavior covered by this PR. (role: recent adjacent owner; confidence: medium; commits: 57d6e63f30bc; files: src/gateway/tools-invoke-shared.ts, src/gateway/tool-resolution.ts, src/gateway/tools-invoke-http.test.ts)

Remaining risk / open question:

  • The PR head is currently dirty against main, so the final diff and CI result may change after rebase.

Codex review notes: model gpt-5.5, reasoning high; reviewed against a4c1c28a1731.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant