PR #19758 head 9395aad79f; base 9077e818d8. Fail-before: temporarily restored only the pre-fix MCP service; source restored byte-for-byte afterward. note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead. RUN v5.0.1 /home/ubuntu/wt/terminal-preview-20 ❯ apps/server/src/mcp/OrchestratorMcpService.activity.test.ts (8 tests | 3 failed | 2 skipped) 59ms × readThread defaults to 20 items and the 5 newest runs on the first page 13ms × readThread previews tool output and long messages, and continues one item on request 6ms × readThread omits item metadata that is empty or implied by the read thread 4ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 3 ⎯⎯⎯⎯⎯⎯⎯ FAIL apps/server/src/mcp/OrchestratorMcpService.activity.test.ts > readThread defaults to 20 items and the 5 newest runs on the first page AssertionError: expected [ { position: +0, …(14) }, …(29) ] to have a length of 20 but got 30 - Expected + Received - 20 + 30 ❯ apps/server/src/mcp/OrchestratorMcpService.activity.test.ts:780:25 778| const service = yield* OrchestratorMcpService.OrchestratorMcpServi… 779| const first = yield* service.readThread(makeScope(), { threadId: r… 780| expect(first.items).toHaveLength(20); | ^ 781| expect(first.hasMore).toBe(true); 782| expect(first.recentRuns.map((run) => run.ordinal)).toEqual([8, 7, … ❯ IteratorImpl.~effect/Effect/successCont node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1422:28 ❯ ExitPrimitive.~effect/Effect/evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/core.ts:585:30 ❯ FiberImpl.runLoop node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:654:41 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:595:23 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5689:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/3]⎯ FAIL apps/server/src/mcp/OrchestratorMcpService.activity.test.ts > readThread previews tool output and long messages, and continues one item on request AssertionError: expected { position: +0, …(14) } to match object { textTruncated: true, …(1) } (13 matching properties omitted from actual) - Expected + Received { - "nextTextOffset": 600, - "textTruncated": true, + "nextTextOffset": null, + "textTruncated": false, } ❯ apps/server/src/mcp/OrchestratorMcpService.activity.test.ts:831:18 829| }); 830| const [tool, reply] = page.items; 831| expect(tool).toMatchObject({ textTruncated: true, nextTextOffset: … | ^ 832| expect(tool!.text).toHaveLength(600); 833| expect(reply).toMatchObject({ textTruncated: true, nextTextOffset:… ❯ IteratorImpl.~effect/Effect/successCont node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1422:28 ❯ ExitPrimitive.~effect/Effect/evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/core.ts:585:30 ❯ FiberImpl.runLoop node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:654:41 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:595:23 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5689:9 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/3]⎯ FAIL apps/server/src/mcp/OrchestratorMcpService.activity.test.ts > readThread omits item metadata that is empty or implied by the read thread AssertionError: expected [ { position: +0, …(14) }, …(1) ] to deeply equal [ { position: +0, …(8) }, …(1) ] - Expected + Received [ { + "createdBy": null, + "creationSource": null, "itemId": "item-0", "messageId": "message-0", + "nextTextOffset": null, "position": 0, "runId": "run-read-1", + "sourceThreadId": "thread-mcp-orchestrator-read", "status": "completed", "text": "reply", "textTruncated": false, + "title": null, "type": "assistant_message", "updatedAt": "2026-08-04T12:00:00.000Z", + "visibility": "local", }, { + "createdBy": null, + "creationSource": null, "itemId": "item-1", "messageId": "message-1", + "nextTextOffset": null, "position": 1, + "runId": null, "sourceThreadId": "thread-mcp-orchestrator-parent", "status": "completed", "text": "from the parent", "textTruncated": false, + "title": null, "type": "assistant_message", "updatedAt": "2026-08-04T12:00:00.000Z", "visibility": "inherited", }, ] ❯ apps/server/src/mcp/OrchestratorMcpService.activity.test.ts:873:24 871| const service = yield* OrchestratorMcpService.OrchestratorMcpServi… 872| const page = yield* service.readThread(makeScope(), { threadId: re… 873| expect(page.items).toEqual([ | ^ 874| { 875| position: 0, ❯ IteratorImpl.~effect/Effect/successCont node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1422:28 ❯ ExitPrimitive.~effect/Effect/evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/core.ts:585:30 ❯ FiberImpl.runLoop node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:654:41 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:595:23 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5689:9 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5767:19 ❯ Arguments. node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5786:5 ❯ pipeArguments node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/Pipeable.ts:574:21 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/3]⎯ Test Files 1 failed (1) Tests 3 failed | 3 passed | 2 skipped (8) Start at 02:07:59 Duration 11.81s (transform 69%, import 29%, setup 1%, tests 1%) Transform transforming modules took 8.01s · 69% of tracked time, re-done on every run persist transforms across runs with fsModuleCache: true learn more: https://vitest.dev/guide/improving-performance#caching-between-reruns Pass-after: note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead. RUN v5.0.1 /home/ubuntu/wt/terminal-preview-20 Test Files 6 passed (6) Tests 74 passed (74) Start at 02:12:04 Duration 44.03s (tests 48%, transform 32%, import 18%, setup 1%) Transform transforming modules took 21.63s · 32% of tracked time, re-done on every run persist transforms across runs with fsModuleCache: true learn more: https://vitest.dev/guide/improving-performance#caching-between-reruns Existing workflow schema consumer: note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead. RUN v5.0.1 /home/ubuntu/wt/terminal-preview-20 Test Files 1 passed (1) Tests 1 passed | 16 skipped (17) Start at 02:13:23 Duration 13.06s (transform 74%, import 25%, setup 1%) Transform transforming modules took 9.56s · 74% of tracked time, re-done on every run persist transforms across runs with fsModuleCache: true learn more: https://vitest.dev/guide/improving-performance#caching-between-reruns