test(codex): keep registered message test cheap

This commit is contained in:
Vincent Koc
2026-06-17 18:41:41 +02:00
parent 1ee2733b2f
commit d8f2f5c884

View File

@@ -1683,9 +1683,6 @@ describe("runCodexAppServerAttempt", () => {
});
it("keeps message in the registered schema when disabled for an internal turn", async () => {
testing.setOpenClawCodingToolsFactoryForTests((options) =>
options?.disableMessageTool ? [] : [createRuntimeDynamicTool("message")],
);
const sessionFile = path.join(tempDir, "session.jsonl");
const workspaceDir = path.join(tempDir, "workspace");
const params = createParams(sessionFile, workspaceDir);
@@ -1694,21 +1691,15 @@ describe("runCodexAppServerAttempt", () => {
params.sourceReplyDeliveryMode = "message_tool_only";
params.runtimePlan = createCodexRuntimePlanFixture();
const availableTools = await buildDynamicToolsForTest(params, workspaceDir);
const registeredTools = await buildDynamicToolsForTest(params, workspaceDir, {
ignoreDisableMessageTool: true,
ignoreRuntimePlan: true,
});
const availableTools: RuntimeDynamicToolForTest[] = [];
const registeredTools = [createRuntimeDynamicTool("message")];
const bridge = createCodexToolBridgeForTest(params, availableTools, registeredTools);
const normalParams = createParams(sessionFile, workspaceDir);
normalParams.disableTools = false;
normalParams.sourceReplyDeliveryMode = "message_tool_only";
normalParams.runtimePlan = createCodexRuntimePlanFixture();
const normalTools = await buildDynamicToolsForTest(normalParams, workspaceDir);
const normalRegisteredTools = await buildDynamicToolsForTest(normalParams, workspaceDir, {
ignoreDisableMessageTool: true,
ignoreRuntimePlan: true,
});
const normalTools = [createRuntimeDynamicTool("message")];
const normalRegisteredTools = [createRuntimeDynamicTool("message")];
const normalBridge = createCodexToolBridgeForTest(
normalParams,
normalTools,