Skip to content

Commit 36a059e

Browse files
committed
test(agents): use neutral tool schema fixtures
1 parent b475de8 commit 36a059e

13 files changed

Lines changed: 110 additions & 108 deletions

‎extensions/codex/src/app-server/dynamic-tools.test.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ describe("createCodexDynamicToolBridge", () => {
303303
tools: [
304304
createTool({ name: "message" }),
305305
createTool({
306-
name: "dofbot_move_angles",
306+
name: "fuzzplugin_move_angles",
307307
parameters: { type: "array", items: { type: "number" } },
308308
execute: badExecute,
309309
}),
@@ -324,17 +324,17 @@ describe("createCodexDynamicToolBridge", () => {
324324
expect(bridge.specs.map((tool) => tool.name)).toEqual(["message"]);
325325
expect(bridge.telemetry.quarantinedTools).toEqual([
326326
{
327-
tool: "dofbot_move_angles",
328-
violations: ['dofbot_move_angles.inputSchema.type must be "object"'],
327+
tool: "fuzzplugin_move_angles",
328+
violations: ['fuzzplugin_move_angles.inputSchema.type must be "object"'],
329329
},
330330
]);
331331
expect(warn).toHaveBeenCalledWith(
332-
expect.stringContaining("dofbot_move_angles"),
332+
expect.stringContaining("fuzzplugin_move_angles"),
333333
expect.objectContaining({
334334
tools: [
335335
{
336-
tool: "dofbot_move_angles",
337-
violations: ['dofbot_move_angles.inputSchema.type must be "object"'],
336+
tool: "fuzzplugin_move_angles",
337+
violations: ['fuzzplugin_move_angles.inputSchema.type must be "object"'],
338338
},
339339
],
340340
}),
@@ -349,9 +349,9 @@ describe("createCodexDynamicToolBridge", () => {
349349
runId: "run-1",
350350
sessionId: "session-1",
351351
sessionKey: "agent:main:session-1",
352-
toolName: "dofbot_move_angles",
352+
toolName: "fuzzplugin_move_angles",
353353
deniedReason: "unsupported_tool_schema",
354-
reason: 'dofbot_move_angles.inputSchema.type must be "object"',
354+
reason: 'fuzzplugin_move_angles.inputSchema.type must be "object"',
355355
}),
356356
);
357357

@@ -360,13 +360,13 @@ describe("createCodexDynamicToolBridge", () => {
360360
turnId: "turn-1",
361361
callId: "call-1",
362362
namespace: null,
363-
tool: "dofbot_move_angles",
363+
tool: "fuzzplugin_move_angles",
364364
arguments: {},
365365
});
366366

367367
expect(result).toEqual({
368368
success: false,
369-
contentItems: [{ type: "inputText", text: "Unknown OpenClaw tool: dofbot_move_angles" }],
369+
contentItems: [{ type: "inputText", text: "Unknown OpenClaw tool: fuzzplugin_move_angles" }],
370370
});
371371
expect(badExecute).not.toHaveBeenCalled();
372372
});

‎packages/gateway-protocol/src/schema/agents-models-skills.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ describe("ToolsEffectiveResultSchema", () => {
6060
...toolsEffectiveResult(),
6161
notices: [
6262
{
63-
id: "unsupported-tool-schema:dofbot_move_angles",
63+
id: "unsupported-tool-schema:fuzzplugin_move_angles",
6464
severity: "warning",
6565
message:
66-
'Tool "dofbot_move_angles" from plugin "dofbot" has an unsupported runtime input schema and was quarantined before model projection.',
66+
'Tool "fuzzplugin_move_angles" from plugin "fuzzplugin" has an unsupported runtime input schema and was quarantined before model projection.',
6767
},
6868
],
6969
};
@@ -76,7 +76,7 @@ describe("ToolsEffectiveResultSchema", () => {
7676
...toolsEffectiveResult(),
7777
notices: [
7878
{
79-
id: "unsupported-tool-schema:dofbot_move_angles",
79+
id: "unsupported-tool-schema:fuzzplugin_move_angles",
8080
severity: "warning",
8181
message: "Unsupported schema.",
8282
extra: true,

‎src/agents/agent-bundle-mcp-runtime.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ describe("session MCP runtime", () => {
757757
cfg: {
758758
mcp: {
759759
servers: {
760-
dofbot: {
760+
fuzzplugin: {
761761
command: process.execPath,
762762
args: [serverPath],
763763
},
@@ -771,7 +771,7 @@ describe("session MCP runtime", () => {
771771

772772
expect(catalog.servers).toEqual({});
773773
expect(catalog.tools).toEqual([]);
774-
expect(catalog.diagnostics?.[0]?.serverName).toBe("dofbot");
774+
expect(catalog.diagnostics?.[0]?.serverName).toBe("fuzzplugin");
775775
expect(catalog.diagnostics?.[0]?.message).toContain("Invalid input: expected");
776776
expect(catalog.diagnostics?.[0]?.message).toContain("object");
777777
} finally {

‎src/agents/agent-bundle-mcp-tools.materialize.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ describe("createBundleMcpToolRuntime", () => {
167167
it("preserves catalog diagnostics when MCP servers fail tool listing", async () => {
168168
const diagnostics = [
169169
{
170-
serverName: "dofbot",
171-
safeServerName: "dofbot",
172-
launchSummary: "node dofbot-mcp.mjs",
170+
serverName: "fuzzplugin",
171+
safeServerName: "fuzzplugin",
172+
launchSummary: "node fuzzplugin-mcp.mjs",
173173
message: 'tools[0].inputSchema.type expected "object"',
174174
},
175175
];

‎src/agents/embedded-agent-runner/compact.hooks.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ describe("compactEmbeddedAgentSessionDirect hooks", () => {
473473
execute: async () => ({ text: "ok" }),
474474
},
475475
{
476-
name: "dofbot_move_angles",
477-
label: "Dofbot Move Angles",
476+
name: "fuzzplugin_move_angles",
477+
label: "Fuzzplugin Move Angles",
478478
description: "Move robot joints.",
479479
parameters: { type: "array", items: { type: "number" } },
480480
execute: async () => ({ text: "bad" }),

‎src/agents/embedded-agent-runner/run/attempt.spawn-workspace.context-engine.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ describe("runEmbeddedAttempt context engine sessionKey forwarding", () => {
294294
execute: async () => ({ text: "ok" }),
295295
},
296296
{
297-
name: "dofbot_move_angles",
298-
label: "Dofbot Move Angles",
297+
name: "fuzzplugin_move_angles",
298+
label: "Fuzzplugin Move Angles",
299299
description: "Move robot joints.",
300300
parameters: {
301301
type: "object",

‎src/agents/tools-effective-inventory.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ describe("resolveEffectiveToolInventory", () => {
321321
tools: [
322322
mockTool({ name: "exec", label: "Exec", description: "Run shell commands" }),
323323
mockTool({
324-
name: "dofbot_move_angles",
325-
label: "Dofbot Move Angles",
324+
name: "fuzzplugin_move_angles",
325+
label: "Fuzzplugin Move Angles",
326326
description: "Move robot joints",
327327
parameters: {
328328
type: "object",
@@ -332,18 +332,18 @@ describe("resolveEffectiveToolInventory", () => {
332332
},
333333
}),
334334
],
335-
pluginMeta: { dofbot_move_angles: { pluginId: "dofbot" } },
335+
pluginMeta: { fuzzplugin_move_angles: { pluginId: "fuzzplugin" } },
336336
});
337337

338338
const result = resolveEffectiveToolInventoryLocal7({ cfg: {} });
339339

340340
expect(result.groups.flatMap((group) => group.tools.map((tool) => tool.id))).toEqual(["exec"]);
341341
expect(result.notices).toEqual([
342342
{
343-
id: "unsupported-tool-schema:dofbot_move_angles",
343+
id: "unsupported-tool-schema:fuzzplugin_move_angles",
344344
severity: "warning",
345345
message:
346-
'Tool "dofbot_move_angles" from plugin "dofbot" has an unsupported runtime input schema (dofbot_move_angles.parameters.properties.target.$dynamicRef) and was quarantined before model projection. Fix or disable the owner, or remove the tool from active allowlists.',
346+
'Tool "fuzzplugin_move_angles" from plugin "fuzzplugin" has an unsupported runtime input schema (fuzzplugin_move_angles.parameters.properties.target.$dynamicRef) and was quarantined before model projection. Fix or disable the owner, or remove the tool from active allowlists.',
347347
},
348348
]);
349349
});

‎src/commands/doctor/repair-sequencing.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,16 +434,16 @@ describe("doctor repair sequencing", () => {
434434

435435
it("emits active tool schema projection warnings during doctor repair", async () => {
436436
mocks.collectActiveToolSchemaProjectionWarnings.mockReturnValueOnce([
437-
'- agents.main: active tool "dofbot_move_angles" from plugin "dofbot" has unsupported runtime input schema.',
437+
'- agents.main: active tool "fuzzplugin_move_angles" from plugin "fuzzplugin" has unsupported runtime input schema.',
438438
]);
439439

440440
const result = await runDoctorRepairSequence({
441441
state: {
442442
cfg: {
443-
tools: { allow: ["dofbot_move_angles"] },
443+
tools: { allow: ["fuzzplugin_move_angles"] },
444444
} as OpenClawConfig,
445445
candidate: {
446-
tools: { allow: ["dofbot_move_angles"] },
446+
tools: { allow: ["fuzzplugin_move_angles"] },
447447
} as OpenClawConfig,
448448
pendingChanges: false,
449449
fixHints: [],
@@ -453,11 +453,11 @@ describe("doctor repair sequencing", () => {
453453

454454
expect(result.changeNotes).toStrictEqual([]);
455455
expect(result.warningNotes).toContain(
456-
'- agents.main: active tool "dofbot_move_angles" from plugin "dofbot" has unsupported runtime input schema.',
456+
'- agents.main: active tool "fuzzplugin_move_angles" from plugin "fuzzplugin" has unsupported runtime input schema.',
457457
);
458458
expect(mocks.collectActiveToolSchemaProjectionWarnings).toHaveBeenCalledWith({
459459
cfg: {
460-
tools: { allow: ["dofbot_move_angles"] },
460+
tools: { allow: ["fuzzplugin_move_angles"] },
461461
},
462462
env: process.env,
463463
});

‎src/commands/doctor/shared/active-tool-schema-warnings.test.ts‎

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,23 @@ describe("active tool schema doctor warnings", () => {
8585
it("warns with plugin ownership for active tools blocked by runtime projection", () => {
8686
toolState.tools = [
8787
tool("message", { type: "object", properties: {} }),
88-
tool("dofbot_move_angles", { type: "array", items: { type: "number" } }),
88+
tool("fuzzplugin_move_angles", { type: "array", items: { type: "number" } }),
8989
];
90-
toolState.pluginIds = { dofbot_move_angles: "dofbot" };
90+
toolState.pluginIds = { fuzzplugin_move_angles: "fuzzplugin" };
9191

9292
expect(
9393
collectActiveToolSchemaProjectionWarnings({
9494
cfg: {
9595
plugins: {
9696
entries: {
97-
dofbot: { enabled: true },
97+
fuzzplugin: { enabled: true },
9898
},
9999
},
100100
},
101101
env: { HOME: "/tmp/openclaw-test" },
102102
}),
103103
).toEqual([
104-
'- agents.main: active tool "dofbot_move_angles" from plugin "dofbot" has unsupported runtime input schema (dofbot_move_angles.parameters.type must be "object"). OpenClaw will quarantine this tool at runtime; fix or disable the plugin, or remove the tool from active allowlists.',
104+
'- agents.main: active tool "fuzzplugin_move_angles" from plugin "fuzzplugin" has unsupported runtime input schema (fuzzplugin_move_angles.parameters.type must be "object"). OpenClaw will quarantine this tool at runtime; fix or disable the plugin, or remove the tool from active allowlists.',
105105
]);
106106
expect(toolState.createTools).toHaveBeenCalledWith(
107107
expect.objectContaining({ toolPolicyAuditLogLevel: "debug" }),
@@ -136,8 +136,10 @@ describe("active tool schema doctor warnings", () => {
136136
});
137137

138138
it("does not validate disabled plugin mode", () => {
139-
toolState.tools = [tool("dofbot_move_angles", { type: "array", items: { type: "number" } })];
140-
toolState.pluginIds = { dofbot_move_angles: "dofbot" };
139+
toolState.tools = [
140+
tool("fuzzplugin_move_angles", { type: "array", items: { type: "number" } }),
141+
];
142+
toolState.pluginIds = { fuzzplugin_move_angles: "fuzzplugin" };
141143

142144
expect(
143145
collectActiveToolSchemaProjectionWarnings({
@@ -151,7 +153,7 @@ describe("active tool schema doctor warnings", () => {
151153

152154
it("validates provider-normalized runtime schemas before reporting doctor health", () => {
153155
const healthyTool = tool("message", { type: "object", properties: {} });
154-
const dynamicTool = tool("dofbot_move_angles", { type: "object", properties: {} });
156+
const dynamicTool = tool("fuzzplugin_move_angles", { type: "object", properties: {} });
155157
toolState.runtimeModel = {
156158
id: "gpt-5.5",
157159
name: "GPT-5.5",
@@ -161,7 +163,7 @@ describe("active tool schema doctor warnings", () => {
161163
compat: { unsupportedToolSchemaKeywords: ["$dynamicRef"] },
162164
};
163165
toolState.tools = [healthyTool, dynamicTool];
164-
toolState.pluginIds = { dofbot_move_angles: "dofbot" };
166+
toolState.pluginIds = { fuzzplugin_move_angles: "fuzzplugin" };
165167
toolState.normalizeTools.mockImplementation(({ tools, modelApi, model }) => {
166168
if (
167169
modelApi !== "openai-responses" ||
@@ -171,8 +173,8 @@ describe("active tool schema doctor warnings", () => {
171173
return tools;
172174
}
173175
return tools.map((entry) =>
174-
entry.name === "dofbot_move_angles"
175-
? tool("dofbot_move_angles", {
176+
entry.name === "fuzzplugin_move_angles"
177+
? tool("fuzzplugin_move_angles", {
176178
type: "object",
177179
properties: {
178180
target: { $dynamicRef: "#target" },
@@ -192,14 +194,14 @@ describe("active tool schema doctor warnings", () => {
192194
},
193195
plugins: {
194196
entries: {
195-
dofbot: { enabled: true },
197+
fuzzplugin: { enabled: true },
196198
},
197199
},
198200
},
199201
env: { HOME: "/tmp/openclaw-test" },
200202
}),
201203
).toEqual([
202-
'- agents.main: active tool "dofbot_move_angles" from plugin "dofbot" has unsupported runtime input schema (dofbot_move_angles.parameters.properties.target.$dynamicRef). OpenClaw will quarantine this tool at runtime; fix or disable the plugin, or remove the tool from active allowlists.',
204+
'- agents.main: active tool "fuzzplugin_move_angles" from plugin "fuzzplugin" has unsupported runtime input schema (fuzzplugin_move_angles.parameters.properties.target.$dynamicRef). OpenClaw will quarantine this tool at runtime; fix or disable the plugin, or remove the tool from active allowlists.',
203205
]);
204206
expect(toolState.createTools).toHaveBeenCalledWith(
205207
expect.objectContaining({
@@ -253,7 +255,7 @@ describe("active tool schema doctor warnings", () => {
253255

254256
expect(
255257
collectActiveToolSchemaProjectionWarnings({
256-
cfg: { plugins: { entries: { dofbot: { enabled: true } } } },
258+
cfg: { plugins: { entries: { fuzzplugin: { enabled: true } } } },
257259
env: { HOME: "/tmp/openclaw-test" },
258260
}),
259261
).toEqual([

‎src/commands/doctor/shared/preview-warnings.test.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,17 +388,17 @@ describe("doctor preview warnings", () => {
388388

389389
it("includes active tool schema projection warnings", async () => {
390390
activeToolSchemaState.warnings = [
391-
'- agents.main: active tool "dofbot_move_angles" from plugin "dofbot" has unsupported runtime input schema.',
391+
'- agents.main: active tool "fuzzplugin_move_angles" from plugin "fuzzplugin" has unsupported runtime input schema.',
392392
];
393393

394394
const warnings = await collectDoctorPreviewWarnings({
395-
cfg: { tools: { allow: ["dofbot_move_angles"] } },
395+
cfg: { tools: { allow: ["fuzzplugin_move_angles"] } },
396396
doctorFixCommand: "openclaw doctor --fix",
397397
});
398398

399-
expect(warnings.some((warning) => warning.includes('active tool "dofbot_move_angles"'))).toBe(
400-
true,
401-
);
399+
expect(
400+
warnings.some((warning) => warning.includes('active tool "fuzzplugin_move_angles"')),
401+
).toBe(true);
402402
});
403403

404404
it("warns but skips auto-removal when plugin discovery has errors", async () => {

0 commit comments

Comments
 (0)