Skip to content

Commit ba61466

Browse files
committed
test(codex): trim duplicate app-server regressions
1 parent c9da900 commit ba61466

2 files changed

Lines changed: 0 additions & 92 deletions

File tree

‎extensions/codex/src/app-server/event-projector.assistant.test.ts‎

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -279,35 +279,6 @@ describe("CodexAppServerEventProjector assistant projection", () => {
279279
expect(snapshot).toContain(coda);
280280
});
281281

282-
it("lets a later unphased message replace an earlier final answer", async () => {
283-
const projector = await createProjector(await createParams());
284-
285-
await projector.handleNotification(
286-
forCurrentTurn("item/started", {
287-
item: { type: "agentMessage", id: "answer-1", phase: "final_answer", text: "" },
288-
}),
289-
);
290-
await projector.handleNotification(agentMessageDelta("First candidate", "answer-1"));
291-
await projector.handleNotification(
292-
forCurrentTurn("item/completed", {
293-
item: {
294-
type: "agentMessage",
295-
id: "answer-1",
296-
phase: "final_answer",
297-
text: "First candidate",
298-
},
299-
}),
300-
);
301-
await projector.handleNotification(agentMessageDelta("Later unphased reply", "answer-2"));
302-
await projector.handleNotification(
303-
turnCompleted([{ type: "agentMessage", id: "answer-2", text: "Later unphased reply" }]),
304-
);
305-
306-
const result = projector.buildResult(buildEmptyToolTelemetry());
307-
expect(result.assistantTexts).toEqual(["Later unphased reply"]);
308-
expect(JSON.stringify(result.messagesSnapshot)).not.toContain("First candidate");
309-
});
310-
311282
it("drops a pre-unphased final when a later final follows the replacement", async () => {
312283
const projector = await createProjector(await createParams());
313284

@@ -453,52 +424,6 @@ describe("CodexAppServerEventProjector assistant projection", () => {
453424
expect(JSON.stringify(result.messagesSnapshot)).not.toContain("First candidate");
454425
});
455426

456-
it("drops a trailing silent final when an earlier audible final remains", async () => {
457-
const projector = await createProjector(await createParams());
458-
459-
await projector.handleNotification(
460-
forCurrentTurn("item/started", {
461-
item: { type: "agentMessage", id: "answer-1", phase: "final_answer", text: "" },
462-
}),
463-
);
464-
await projector.handleNotification(agentMessageDelta("Keep this answer", "answer-1"));
465-
await projector.handleNotification(
466-
forCurrentTurn("item/completed", {
467-
item: {
468-
type: "agentMessage",
469-
id: "answer-1",
470-
phase: "final_answer",
471-
text: "Keep this answer",
472-
},
473-
}),
474-
);
475-
await projector.handleNotification(
476-
forCurrentTurn("item/started", {
477-
item: { type: "agentMessage", id: "answer-2", phase: "final_answer", text: "" },
478-
}),
479-
);
480-
await projector.handleNotification(agentMessageDelta("NO_REPLY", "answer-2"));
481-
await projector.handleNotification(
482-
forCurrentTurn("item/completed", {
483-
item: {
484-
type: "agentMessage",
485-
id: "answer-2",
486-
phase: "final_answer",
487-
text: "NO_REPLY",
488-
},
489-
}),
490-
);
491-
await projector.handleNotification(
492-
turnCompleted([
493-
{ type: "agentMessage", id: "answer-2", phase: "final_answer", text: "NO_REPLY" },
494-
]),
495-
);
496-
497-
const result = projector.buildResult(buildEmptyToolTelemetry());
498-
expect(result.assistantTexts).toEqual(["Keep this answer"]);
499-
expect(JSON.stringify(result.messagesSnapshot)).not.toContain("NO_REPLY");
500-
});
501-
502427
it("drops a trailing JSON silent payload when an earlier audible final remains", async () => {
503428
const projector = await createProjector(await createParams());
504429
const jsonSilent = '{"action":"NO_REPLY"}';

‎extensions/codex/src/app-server/run-attempt-connection.test.ts‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -94,23 +94,6 @@ describe("prepareCodexAttemptConnection", () => {
9494
expect(resolveModelPolicy).toHaveBeenCalledTimes(2);
9595
});
9696

97-
it("keeps effective default yolo ahead of generic tool approval hooks", async () => {
98-
initializeGlobalHookRunner(
99-
createMockPluginRegistry([{ hookName: "before_tool_call", handler: vi.fn() }]),
100-
);
101-
const sessionFile = path.join(tempDir, "session.jsonl");
102-
const workspaceDir = path.join(tempDir, "workspace");
103-
const params = createParams(sessionFile, workspaceDir);
104-
params.agentDir = path.join(tempDir, "agent");
105-
registerCodexTestSessionIdentity(sessionFile, params.sessionId, params.sessionKey);
106-
const connection = await prepareCodexAttemptConnection({
107-
params,
108-
options: { bindingStore: testCodexAppServerBindingStore },
109-
});
110-
111-
expect(connection.appServer.approvalPolicy).toBe("never");
112-
});
113-
11497
it("does not give OpenClaw ownership of an explicit operator approval policy", async () => {
11598
initializeGlobalHookRunner(
11699
createMockPluginRegistry([{ hookName: "before_tool_call", handler: vi.fn() }]),

0 commit comments

Comments
 (0)