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.5 /home/ubuntu/wt/issue-22748/apps/server stdout | src/orchestration-v2/Orchestrator.control-reads.test.ts > provider.switch instance (true) [01:31:40.698] ERROR (#1): Error [AssertionError]: a refused switch must preserve the turn, session and selection: expected { thread: { …(24) }, …(17) } to deeply equal { thread: { …(24) }, …(17) } at /home/ubuntu/wt/issue-22748/apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts:201:14 { actual: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex-other', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, expected: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [ [Object] ], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } stdout | src/orchestration-v2/Orchestrator.control-reads.test.ts > provider.switch restart (true) [01:31:41.104] ERROR (#7043): Error [AssertionError]: a refused switch must preserve the turn, session and selection: expected { thread: { …(24) }, …(17) } to deeply equal { thread: { …(24) }, …(17) } at /home/ubuntu/wt/issue-22748/apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts:201:14 { actual: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, expected: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [ [Object] ], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } stdout | src/orchestration-v2/Orchestrator.control-reads.test.ts > thread.model-selection.set instance (true) [01:31:41.207] ERROR (#9392): Error [AssertionError]: a refused switch must preserve the turn, session and selection: expected { thread: { …(24) }, …(17) } to deeply equal { thread: { …(24) }, …(17) } at /home/ubuntu/wt/issue-22748/apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts:201:14 { actual: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex-other', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, expected: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [ [Object] ], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } stdout | src/orchestration-v2/Orchestrator.control-reads.test.ts > thread.model-selection.set restart (true) [01:31:41.530] ERROR (#16434): Error [AssertionError]: a refused switch must preserve the turn, session and selection: expected { thread: { …(24) }, …(17) } to deeply equal { thread: { …(24) }, …(17) } at /home/ubuntu/wt/issue-22748/apps/server/src/orchestration-v2/Orchestrator.control-reads.test.ts:201:14 { actual: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, expected: { thread: { createdBy: 'user', creationSource: 'web', id: 'thread:instance-switch', projectId: 'project:instance-switch', title: 'Instance switch', providerInstanceId: 'codex', modelSelection: [Object], runtimeMode: 'full-access', interactionMode: 'default', branch: null, worktreePath: null, pullRequests: [], activeProviderThreadId: 'provider-thread:instance-switch', lineage: [Object], forkedFrom: null, createdAt: DateTime.Utc(1970-01-01T00:00:00.000Z), updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z), archivedAt: null, settledOverride: null, settledAt: null, snoozedUntil: null, snoozedAt: null, lastVisitedAt: null, deletedAt: null }, runs: [ [Object] ], attempts: [], nodes: [], subagents: [], providerSessions: [ [Object] ], providerThreads: [ [Object] ], providerTurns: [ [Object] ], runtimeRequests: [], messages: [], plans: [], turnItems: [], checkpointScopes: [], checkpoints: [], contextHandoffs: [], contextTransfers: [], visibleTurnItems: [], updatedAt: DateTime.Utc(1970-01-01T00:00:00.000Z) }, showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } ❯ src/orchestration-v2/Orchestrator.control-reads.test.ts (18 tests | 4 failed | 10 skipped) 1119ms × provider.switch instance (true) 290ms × provider.switch restart (true) 122ms × thread.model-selection.set instance (true) 104ms × thread.model-selection.set restart (true) 106ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 4 ⎯⎯⎯⎯⎯⎯⎯ FAIL src/orchestration-v2/Orchestrator.control-reads.test.ts > provider.switch instance (true) FAIL src/orchestration-v2/Orchestrator.control-reads.test.ts > thread.model-selection.set instance (true) AssertionError: a refused switch must preserve the turn, session and selection: expected { thread: { …(24) }, …(17) } to deeply equal { thread: { …(24) }, …(17) } - Expected + Received @@ -5,116 +5,11 @@ "contextHandoffs": [], "contextTransfers": [], "messages": [], "nodes": [], "plans": [], - "providerSessions": [ - { - "capabilities": { - "approvals": { - "approvalCallbacksAreLiveOnly": true, - "approvalsCanOriginateFromSubagents": true, - "approvalsHaveNativeRequestIds": true, - "supportsApplyPatchApproval": true, - "supportsCommandApproval": true, - "supportsFileChangeApproval": true, - "supportsFileReadApproval": true, - }, - "checkpointing": { - "appCanCheckpointFilesystem": true, - "providerCanReadConversationSnapshot": true, - "providerCanRollbackConversation": true, - "providerRollbackReturnsSnapshot": true, - "supportsNestedCheckpointScopes": true, - }, - "context": { - "acceptsDeveloperContext": true, - "acceptsSyntheticUserContext": true, - "acceptsSystemContext": true, - "canConsumeHandoffSummaries": true, - "canGenerateSummaries": true, - "maxRecommendedHandoffChars": null, - "supportsDeltaHandoff": true, - "supportsFullThreadHandoff": true, - }, - "identity": { - "nativeItemIds": "strong", - "nativeRequestIds": "strong", - "nativeThreadIds": "strong", - "nativeTurnIds": "strong", - }, - "planning": { - "emitsPlanUpdated": true, - "emitsProposedPlan": true, - "emitsTodoList": true, - "planDeltasHaveItemIds": true, - "supportsStructuredQuestions": true, - }, - "runtimePolicy": { - "enforcement": "native", - }, - "sessions": { - "pendingRequestsSurviveRestart": false, - "supportsModelSwitchInSession": true, - "supportsMultipleProviderThreadsPerSession": true, - "supportsProviderSwitchingViaHandoff": true, - "supportsRuntimeModeSwitchInSession": true, - }, - "streaming": { - "emitsMessageCompleted": true, - "streamsAssistantText": true, - "streamsPlanText": true, - "streamsReasoning": true, - "streamsToolOutput": true, - }, - "subagents": { - "canCloseSubagents": true, - "canForkSubagentThread": true, - "canWaitForSubagents": true, - "emitsSubagentLifecycle": true, - "exposesSubagentThreadIds": true, - "supportsSubagents": true, - }, - "threads": { - "canCreateEmptyThread": true, - "canForkFromSubagentThread": true, - "canForkFromTurn": true, - "canForkThread": true, - "canReadThreadSnapshot": true, - "canRollbackThread": true, - "exposesNativeThreadId": true, - }, - "tools": { - "emitsToolCompleted": true, - "emitsToolOutput": true, - "emitsToolStarted": true, - "exposesToolItemIds": true, - "supportsDynamicToolCallbacks": true, - "supportsMcpTools": true, - }, - "turns": { - "emitsTurnCompleted": true, - "emitsTurnStarted": true, - "exposesNativeTurnId": true, - "supportsActiveSteering": true, - "supportsInterrupt": true, - "supportsQueuedMessages": true, - "supportsSteeringByInterruptRestart": true, - "terminalStatusQuality": "strong", - }, - }, - "createdAt": "1970-01-01T00:00:00.000Z", - "cwd": "/repo", - "driver": "codex", - "id": "session:instance-switch", - "lastError": null, - "model": "gpt-5.1-codex", - "providerInstanceId": "codex", - "status": "ready", - "updatedAt": "1970-01-01T00:00:00.000Z", - }, - ], + "providerSessions": [], "providerThreads": [ { "appThreadId": "thread:instance-switch", "contextUsage": null, "createdAt": "1970-01-01T00:00:00.000Z", @@ -197,15 +92,15 @@ "parentThreadId": null, "relationshipToParent": null, "rootThreadId": "thread:instance-switch", }, "modelSelection": { - "instanceId": "codex", + "instanceId": "codex-other", "model": "gpt-5.1-codex", }, "projectId": "project:instance-switch", - "providerInstanceId": "codex", + "providerInstanceId": "codex-other", "pullRequests": [], "runtimeMode": "full-access", "settledAt": null, "settledOverride": null, "snoozedAt": null, ❯ src/orchestration-v2/Orchestrator.control-reads.test.ts:201:14 199| const after = yield* projections.getThreadProjection(threadId); 200| if (active && selectionChange !== "next-turn") { 201| assert.deepEqual( | ^ 202| after, 203| before, ❯ ~effect/Effect/successCont ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1422:28 ❯ ~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 ❯ FiberImpl.evaluate ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:589:27 ❯ Array. ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1025:13 ❯ MixedSchedulerDispatcher.runTasks ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/Scheduler.ts:254:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/4]⎯ FAIL src/orchestration-v2/Orchestrator.control-reads.test.ts > provider.switch restart (true) FAIL src/orchestration-v2/Orchestrator.control-reads.test.ts > thread.model-selection.set restart (true) AssertionError: a refused switch must preserve the turn, session and selection: expected { thread: { …(24) }, …(17) } to deeply equal { thread: { …(24) }, …(17) } - Expected + Received @@ -5,116 +5,11 @@ "contextHandoffs": [], "contextTransfers": [], "messages": [], "nodes": [], "plans": [], - "providerSessions": [ - { - "capabilities": { - "approvals": { - "approvalCallbacksAreLiveOnly": true, - "approvalsCanOriginateFromSubagents": true, - "approvalsHaveNativeRequestIds": true, - "supportsApplyPatchApproval": true, - "supportsCommandApproval": true, - "supportsFileChangeApproval": true, - "supportsFileReadApproval": true, - }, - "checkpointing": { - "appCanCheckpointFilesystem": true, - "providerCanReadConversationSnapshot": true, - "providerCanRollbackConversation": true, - "providerRollbackReturnsSnapshot": true, - "supportsNestedCheckpointScopes": true, - }, - "context": { - "acceptsDeveloperContext": true, - "acceptsSyntheticUserContext": true, - "acceptsSystemContext": true, - "canConsumeHandoffSummaries": true, - "canGenerateSummaries": true, - "maxRecommendedHandoffChars": null, - "supportsDeltaHandoff": true, - "supportsFullThreadHandoff": true, - }, - "identity": { - "nativeItemIds": "strong", - "nativeRequestIds": "strong", - "nativeThreadIds": "strong", - "nativeTurnIds": "strong", - }, - "planning": { - "emitsPlanUpdated": true, - "emitsProposedPlan": true, - "emitsTodoList": true, - "planDeltasHaveItemIds": true, - "supportsStructuredQuestions": true, - }, - "runtimePolicy": { - "enforcement": "native", - }, - "sessions": { - "pendingRequestsSurviveRestart": false, - "supportsModelSwitchInSession": true, - "supportsMultipleProviderThreadsPerSession": true, - "supportsProviderSwitchingViaHandoff": true, - "supportsRuntimeModeSwitchInSession": true, - }, - "streaming": { - "emitsMessageCompleted": true, - "streamsAssistantText": true, - "streamsPlanText": true, - "streamsReasoning": true, - "streamsToolOutput": true, - }, - "subagents": { - "canCloseSubagents": true, - "canForkSubagentThread": true, - "canWaitForSubagents": true, - "emitsSubagentLifecycle": true, - "exposesSubagentThreadIds": true, - "supportsSubagents": true, - }, - "threads": { - "canCreateEmptyThread": true, - "canForkFromSubagentThread": true, - "canForkFromTurn": true, - "canForkThread": true, - "canReadThreadSnapshot": true, - "canRollbackThread": true, - "exposesNativeThreadId": true, - }, - "tools": { - "emitsToolCompleted": true, - "emitsToolOutput": true, - "emitsToolStarted": true, - "exposesToolItemIds": true, - "supportsDynamicToolCallbacks": true, - "supportsMcpTools": true, - }, - "turns": { - "emitsTurnCompleted": true, - "emitsTurnStarted": true, - "exposesNativeTurnId": true, - "supportsActiveSteering": true, - "supportsInterrupt": true, - "supportsQueuedMessages": true, - "supportsSteeringByInterruptRestart": true, - "terminalStatusQuality": "strong", - }, - }, - "createdAt": "1970-01-01T00:00:00.000Z", - "cwd": "/repo", - "driver": "codex", - "id": "session:instance-switch", - "lastError": null, - "model": "gpt-5.1-codex", - "providerInstanceId": "codex", - "status": "ready", - "updatedAt": "1970-01-01T00:00:00.000Z", - }, - ], + "providerSessions": [], "providerThreads": [ { "appThreadId": "thread:instance-switch", "contextUsage": null, "createdAt": "1970-01-01T00:00:00.000Z", @@ -198,11 +93,11 @@ "relationshipToParent": null, "rootThreadId": "thread:instance-switch", }, "modelSelection": { "instanceId": "codex", - "model": "gpt-5.1-codex", + "model": "gpt-6", }, "projectId": "project:instance-switch", "providerInstanceId": "codex", "pullRequests": [], "runtimeMode": "full-access", ❯ src/orchestration-v2/Orchestrator.control-reads.test.ts:201:14 199| const after = yield* projections.getThreadProjection(threadId); 200| if (active && selectionChange !== "next-turn") { 201| assert.deepEqual( | ^ 202| after, 203| before, ❯ ~effect/Effect/successCont ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1422:28 ❯ ~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 ❯ FiberImpl.evaluate ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:589:27 ❯ Array. ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1025:13 ❯ MixedSchedulerDispatcher.runTasks ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/Scheduler.ts:254:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/4]⎯ Test Files 1 failed (1) Tests 4 failed | 4 passed | 10 skipped (18) Start at 01:31:34 Duration 6.74s (import 50%, transform 31%, tests 17%, setup 2%)