mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
95d7d95515
* feat(tools): support batched tool search queries * fix(tools): harden batched tool search * fix(tools): preserve batch search contracts * fix(tools): bound batch search processing * fix(tools): bound batch candidate metadata * fix(tools): preserve callable batch candidates * docs(tools): align batch search QA proof * refactor(tools): isolate search request parsing * test(qa): strengthen structured search proof * test(qa): align structured directory proof * fix(tools): preserve scalar search compatibility * test(qa): disable batch scenario retries * test(qa): allow direct-only tools in structured proof * test(qa): verify nested catalog call result * test(qa): remove obsolete result scanner
122 lines
4.9 KiB
YAML
122 lines
4.9 KiB
YAML
title: Tool Search gateway E2E
|
|
|
|
scenario:
|
|
id: tool-search-gateway-e2e
|
|
surface: runtime
|
|
coverage:
|
|
primary:
|
|
- agent-runtime.hosted-tool-use
|
|
- plugins.plugin-tools
|
|
secondary:
|
|
- plugins.tool-plugin-invocation
|
|
objective: Verify Tool Search keeps a large plugin-owned catalog compact, supports structured batch discovery, and still invokes the selected plugin tool.
|
|
successCriteria:
|
|
- Direct mode exposes the fake plugin tool schemas and calls the selected plugin tool.
|
|
- All three lanes report the selected tool through tools.effective with source=plugin and pluginId=tool-search-e2e-fixture.
|
|
- Tool Search code mode exposes only the compact bridge to the provider.
|
|
- Tool Search code mode automatically advertises the selected tool in its bounded system-prompt directory.
|
|
- The compact bridge calls the same selected plugin tool and records bridge plus target tool mentions in session logs.
|
|
- Structured Tool Search resolves two independent queries in one outer call, then records a typed result for the selected plugin tool.
|
|
- The Tool Search request payload is smaller than direct tool exposure for the large fake catalog.
|
|
docsRefs:
|
|
- docs/tools/tool-search.md
|
|
- docs/gateway/protocol.md
|
|
- docs/concepts/qa-e2e-automation.md
|
|
codeRefs:
|
|
- extensions/qa-lab/src/tool-search-gateway.fixture.ts
|
|
- extensions/qa-lab/src/tool-search-gateway.fixture.test.ts
|
|
execution:
|
|
kind: flow
|
|
retryCount: 0
|
|
suiteIsolation: isolated
|
|
isolationReason: Mutates gateway plugin/tool-search config and restarts the QA gateway between direct, compact, and structured lanes.
|
|
summary: Flow-backed gateway E2E for direct, compact, and structured Tool Search with plugin-owned tool invocation.
|
|
config:
|
|
requiredProviderMode: mock-openai
|
|
targetTool: fake_plugin_tool_17
|
|
toolCount: 36
|
|
|
|
flow:
|
|
steps:
|
|
- name: stages fake plugin tool catalog
|
|
actions:
|
|
- assert:
|
|
expr: "env.providerMode === config.requiredProviderMode"
|
|
message: this seeded scenario is mock-openai only
|
|
- call: qaImport
|
|
saveAs: toolSearch
|
|
args:
|
|
- ./tool-search-gateway.fixture.js
|
|
- call: toolSearch.stageToolSearchGatewayFixture
|
|
saveAs: toolSearchFixture
|
|
args:
|
|
- env:
|
|
ref: env
|
|
targetTool:
|
|
expr: config.targetTool
|
|
toolCount:
|
|
expr: config.toolCount
|
|
detailsExpr: toolSearchFixture
|
|
|
|
- name: compares direct, compact, and structured Tool Search gateway lanes
|
|
actions:
|
|
- call: toolSearch.runToolSearchGatewayLane
|
|
saveAs: normalLane
|
|
args:
|
|
- env:
|
|
ref: env
|
|
fixture:
|
|
ref: toolSearchFixture
|
|
lane: normal
|
|
- call: toolSearch.runToolSearchGatewayLane
|
|
saveAs: codeLane
|
|
args:
|
|
- env:
|
|
ref: env
|
|
fixture:
|
|
ref: toolSearchFixture
|
|
lane: code
|
|
- call: toolSearch.runToolSearchGatewayLane
|
|
saveAs: toolsLane
|
|
args:
|
|
- env:
|
|
ref: env
|
|
fixture:
|
|
ref: toolSearchFixture
|
|
lane: tools
|
|
- call: toolSearch.assertToolSearchLaneResults
|
|
args:
|
|
- normal:
|
|
ref: normalLane
|
|
code:
|
|
ref: codeLane
|
|
targetTool:
|
|
ref: toolSearchFixture.targetTool
|
|
- call: toolSearch.assertToolSearchBatchLaneResult
|
|
args:
|
|
- tools:
|
|
ref: toolsLane
|
|
targetTool:
|
|
ref: toolSearchFixture.targetTool
|
|
detailsExpr: |-
|
|
({
|
|
targetTool: toolSearchFixture.targetTool,
|
|
directDeclaredTools: normalLane.providerDeclaredToolCount,
|
|
compactDeclaredTools: codeLane.providerDeclaredToolCount,
|
|
directDirectoryContainsTarget: normalLane.providerDirectoryContainsTarget,
|
|
compactDirectoryContainsTarget: codeLane.providerDirectoryContainsTarget,
|
|
directRawBytes: normalLane.providerRawBytes,
|
|
compactRawBytes: codeLane.providerRawBytes,
|
|
directPlannedTools: normalLane.providerPlannedTools,
|
|
compactPlannedTools: codeLane.providerPlannedTools,
|
|
structuredPlannedTools: toolsLane.providerPlannedTools,
|
|
structuredToolOutput: toolsLane.providerToolOutputSnippet,
|
|
directMentions: normalLane.sessionLogToolMentions,
|
|
compactMentions: codeLane.sessionLogToolMentions,
|
|
directEffectiveTool: normalLane.targetToolIdentity,
|
|
compactEffectiveTool: codeLane.targetToolIdentity,
|
|
structuredEffectiveTool: toolsLane.targetToolIdentity,
|
|
structuredMentions: toolsLane.sessionLogToolMentions,
|
|
structuredTargetToolResults: toolsLane.sessionLogTargetToolResults,
|
|
})
|