test(coding-agent): make ACP /move path assertion portable on Windows

This commit is contained in:
oldschoola
2026-06-12 03:15:29 -07:00
committed by can1357
parent 0bf5f5f7bf
commit ed8df083fa
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -279,6 +279,7 @@
- Fixed `omp bench` reporting "tokens 0, TPS 0.0" successes on repeated OpenRouter runs: pi-ai opts every OpenRouter request into response caching, so bench's byte-identical request replayed a cached generation with zeroed usage at edge speed. Bench now sends `X-OpenRouter-Cache: false` so every run measures a fresh generation
- Fixed `omp bench` failing with HTTP 400 `{"detail":"Instructions are required"}` against `openai-codex` models: bench requests now carry a minimal default system prompt (same guard as eval's completion bridge)
- Fixed pressing `Ctrl+T` (toggle thinking blocks) — or hitting any other rebuild path such as the theme/preset selector — during the pre-streaming window after a submission erasing the just-submitted user message until the first assistant token arrived: the user message is rendered optimistically before `session.prompt(...)` lands it in session entries, so `rebuildChatFromMessages()` had no record of it; it now replays an in-flight optimistic submission after rebuilding the transcript, gated on `optimisticUserMessageSignature` (cleared by `EventController` once the real `message_start` lands) so it cannot duplicate post-streaming ([#2372](https://github.com/can1357/oh-my-pi/issues/2372)).
- Fixed ACP `/move` builtin test expectations to compare the resolved destination path so the test is portable on Windows and Unix.
## [15.11.6] - 2026-06-12
@@ -1,4 +1,5 @@
import { describe, expect, it, spyOn } from "bun:test";
import * as path from "node:path";
import type {
ResetCreditAccountStatus,
ResetCreditRedeemOutcome,
@@ -478,11 +479,12 @@ describe("session lifecycle commands", () => {
runtime.notifyTitleChanged = async () => {
notified = true;
};
const expectedMovedTo = path.resolve("/tmp");
const result = await executeAcpBuiltinSlashCommand("/move /tmp", runtime);
expect(result).toEqual({ consumed: true });
expect(fakeSessionManager._flushed).toBe(true);
expect(fakeSessionManager._movedTo).toBe("/tmp");
expect(output[0]).toContain("/tmp");
expect(fakeSessionManager._movedTo).toBe(expectedMovedTo);
expect(output[0]).toContain(expectedMovedTo);
expect(notified).toBe(true);
});