$ git show a46f80ee28:apps/server/src/storageCleanup.ts > apps/server/src/storageCleanup.ts # tests stay at PR head 0c13691d9a $ cd apps/server && vp test run src/storageCleanup.test.ts -t "prunes deleted threads' refs after their worktree is removed" 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-24083/apps/server stdout | src/storageCleanup.test.ts > prunes deleted threads' refs after their worktree is removed [12:41:18.099] INFO (#1): Migrations ran successfully { migrations: [ '1_OrchestrationEvents', '2_OrchestrationCommandReceipts', '3_CheckpointDiffBlobs', '4_ProviderSessionRuntime', '5_Projections', '6_ProjectionThreadSessionRuntimeModeColumns', '7_ProjectionThreadMessageAttachments', '8_ProjectionThreadActivitySequence', '9_ProviderSessionRuntimeMode', '10_ProjectionThreadsRuntimeMode', '11_OrchestrationThreadCreatedRuntimeMode', '12_ProjectionThreadsInteractionMode', '13_ProjectionThreadProposedPlans', '14_ProjectionThreadProposedPlanImplementation', '15_ProjectionTurnsSourceProposedPlan', '16_CanonicalizeModelSelections', '17_ProjectionThreadsArchivedAt', '18_ProjectionThreadsArchivedAtIndex', '19_ProjectionSnapshotLookupIndexes', '20_AuthAccessManagement', '21_AuthSessionClientMetadata', '22_AuthSessionLastConnectedAt', '23_ProjectionThreadShellSummary', '24_BackfillProjectionThreadShellSummary', '25_CleanupInvalidProjectionPendingApprovals', '26_CanonicalizeModelSelectionOptions', '27_ProviderSessionRuntimeInstanceId', '28_ProjectionThreadSessionInstanceId', '29_ProjectionThreadDetailOrderingIndexes', '30_ProjectionThreadShellArchiveIndexes', '31_AuthAuthorizationScopes', '32_AuthPairingProofKeyThumbprint', '33_ProjectionThreadsSettled', '34_ProjectionThreadsSnoozed', '35_ProjectionThreadTitleRegeneration', '36_ProjectionThreadsPinned', '37_ProjectionTurnsKeysetIndex', '38_ProjectionThreadsPinOrderKey', '39_ProjectionProjectsDefaultThreadEnvMode', '40_ProjectionProjectFaviconPath', '41_AuthSessionClientConnection', '42_ProjectionThreadLinkedPullRequest', '43_ProjectionThreadsUnsettledAt', '44_ClearAutomaticProjectModelDefaults', '45_ProjectionProjectsAutoPull', '46_RepairAutomaticSettlementTimestamps', '47_ProjectionProjectIcon', '48_ProjectionThreadBranchPullRequest', '49_ProjectionThreadsActiveOrderKey', '50_ProjectionThreadPullRequests', '51_ProjectionThreadMessageContext', '52_ProjectionThreadTitleState', '53_PullRequestFilesViewed', '54_ProjectionThreadsAutoSettleDisabledAt', '55_OrchestrationV2', '56_RemoveRedundantProjectionIndexes', '57_ScheduledTaskWebhooks', '58_WebhookRelayDeliveries', '59_McpAppModelContext', '60_ThreadSnapshotWindowIndexes', '61_PullRequestReviewGuides', '62_ThreadFailureLookupIndex', '63_DropUnusedV1Projections', '64_CanonicalizeThreadPullRequestLinks', '65_CodexUsageNativeTurnIndex', '66_RepairClientSettlementTimestamps', '67_WebhookDedupe', '68_ShellStopRequestIndex' ] } stdout | src/storageCleanup.test.ts > prunes deleted threads' refs after their worktree is removed [12:41:18.372] ERROR (#1): Error [AssertionError]: expected [ …(11) ] to deeply equal [ …(7) ] at /home/ubuntu/wt/issue-24083/apps/server/src/storageCleanup.test.ts:582:33 { actual: [ 'refs/t3/checkpoints/YWN0aXZl/turn/0', 'refs/t3/checkpoints/YXJjaGl2ZWQ/turn/0', 'refs/t3/checkpoints/ZGVsZXRlZC1iZWZvcmUtdXBncmFkZQ/turn/0', 'refs/t3/checkpoints/aW1wb3J0ZWQtZGVsZXRlZC10aHJlYWQ/turn/0', 'refs/t3/checkpoints/dW5rbm93bi1vd25lcg/turn/0', 'refs/t3/orchestration-v2/checkpoints/MDJjYjNmZWMxY2JkZWI2MWRhYjUzMTQwMTVmOWVkMTg/ordinal/0', 'refs/t3/orchestration-v2/checkpoints/MDJjYjNmZWMxY2JkZWI2MWRhYjUzMTQwMTVmOWVkMTg/ordinal/1', 'refs/t3/orchestration-v2/checkpoints/YmM2ZTViNDNmZjhmODY3ODczMGM3M2ZlZGNjNjQ2ZDE/ordinal/0', 'refs/t3/orchestration-v2/checkpoints/YmM2ZTViNDNmZjhmODY3ODczMGM3M2ZlZGNjNjQ2ZDE/ordinal/1', 'refs/t3/orchestration-v2/checkpoints/ZGIxY2UzMGQ2NDJhYjVkNWQ3OTFhOWExMzJjOGY0Njc/ordinal/0', 'refs/t3/orchestration-v2/checkpoints/ZGIxY2UzMGQ2NDJhYjVkNWQ3OTFhOWExMzJjOGY0Njc/ordinal/1' ], expected: [ 'refs/t3/checkpoints/YWN0aXZl/turn/0', 'refs/t3/checkpoints/YXJjaGl2ZWQ/turn/0', 'refs/t3/checkpoints/dW5rbm93bi1vd25lcg/turn/0', 'refs/t3/orchestration-v2/checkpoints/MDJjYjNmZWMxY2JkZWI2MWRhYjUzMTQwMTVmOWVkMTg/ordinal/0', 'refs/t3/orchestration-v2/checkpoints/MDJjYjNmZWMxY2JkZWI2MWRhYjUzMTQwMTVmOWVkMTg/ordinal/1', 'refs/t3/orchestration-v2/checkpoints/ZGIxY2UzMGQ2NDJhYjVkNWQ3OTFhOWExMzJjOGY0Njc/ordinal/0', 'refs/t3/orchestration-v2/checkpoints/ZGIxY2UzMGQ2NDJhYjVkNWQ3OTFhOWExMzJjOGY0Njc/ordinal/1' ], showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } ❯ src/storageCleanup.test.ts (123 tests | 1 failed | 122 skipped) 386ms × prunes deleted threads' refs after their worktree is removed 384ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯ FAIL src/storageCleanup.test.ts > prunes deleted threads' refs after their worktree is removed AssertionError: expected [ …(11) ] to deeply equal [ …(7) ] - Expected + Received [ "refs/t3/checkpoints/YWN0aXZl/turn/0", "refs/t3/checkpoints/YXJjaGl2ZWQ/turn/0", + "refs/t3/checkpoints/ZGVsZXRlZC1iZWZvcmUtdXBncmFkZQ/turn/0", + "refs/t3/checkpoints/aW1wb3J0ZWQtZGVsZXRlZC10aHJlYWQ/turn/0", "refs/t3/checkpoints/dW5rbm93bi1vd25lcg/turn/0", "refs/t3/orchestration-v2/checkpoints/MDJjYjNmZWMxY2JkZWI2MWRhYjUzMTQwMTVmOWVkMTg/ordinal/0", "refs/t3/orchestration-v2/checkpoints/MDJjYjNmZWMxY2JkZWI2MWRhYjUzMTQwMTVmOWVkMTg/ordinal/1", + "refs/t3/orchestration-v2/checkpoints/YmM2ZTViNDNmZjhmODY3ODczMGM3M2ZlZGNjNjQ2ZDE/ordinal/0", + "refs/t3/orchestration-v2/checkpoints/YmM2ZTViNDNmZjhmODY3ODczMGM3M2ZlZGNjNjQ2ZDE/ordinal/1", "refs/t3/orchestration-v2/checkpoints/ZGIxY2UzMGQ2NDJhYjVkNWQ3OTFhOWExMzJjOGY0Njc/ordinal/0", "refs/t3/orchestration-v2/checkpoints/ZGIxY2UzMGQ2NDJhYjVkNWQ3OTFhOWExMzJjOGY0Njc/ordinal/1", ] ❯ src/storageCleanup.test.ts:582:33 580| yield* command(repo, ["worktree", "remove", worktree]); 581| yield* service.runNow; 582| expect(yield* listRefs()).toEqual(retained.sort()); | ^ 583| yield* service.runNow; 584| expect(yield* listRefs()).toEqual(retained.sort()); ❯ ~effect/Effect/successCont ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1422:28 ❯ FiberImpl.succeedWith ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:711:30 ❯ ContImpl.mapCont [as ~effect/Effect/successCont] ../../node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1527:16 ❯ ~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 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯ Test Files 1 failed (1) Tests 1 failed | 122 skipped (123) Start at 12:41:14 Duration 4.20s (import 61%, transform 27%, tests 10%, setup 2%)