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/claude-13 stdout | apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > paces usage probes, retains recent readings through 429s, and expires them during backoff [10:54:36.871] ERROR (#195): Error [AssertionError]: expected { …(3) } to deeply equal { …(2) } at /home/ubuntu/wt/claude-13/apps/server/src/usage/cliproxyApi.test.ts:370:69 { actual: { checkedAt: '1970-01-01T00:00:59.999Z', windows: [], unavailable: { reason: 'probeFailed', message: "The hub could not read this account's usage." } }, expected: { checkedAt: '1970-01-01T00:00:00.000Z', windows: [ [Object] ] }, showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } stdout | apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > isolates cached readings by hub, file, provider, email, and workspace [10:54:36.903] ERROR (#224): Error [AssertionError]: expected [ { id: 'first.json', …(5) } ] to deeply equal [ { id: 'first.json', …(5) } ] at /home/ubuntu/wt/claude-13/apps/server/src/usage/cliproxyApi.test.ts:442:47 { actual: [ { id: 'first.json', driver: 'codex', email: 'first@example.com', workspaceId: 'account-a', plan: undefined, usageLimits: [Object] } ], expected: [ { id: 'first.json', driver: 'codex', email: 'first@example.com', workspaceId: 'account-a', plan: undefined, usageLimits: [Object] } ], showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } stdout | apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > shares concurrent reads without blocking other identities or retaining a pre-reset reading [10:54:36.913] ERROR (#343): Error [AssertionError]: expected 30 to be 20 // Object.is equality at /home/ubuntu/wt/claude-13/apps/server/src/usage/cliproxyApi.test.ts:478:60 { actual: 30, expected: 20, showDiff: true, operator: 'strictEqual', [cause]: undefined } stdout | apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > retains pacing after a rejected reset but invalidates only the attempted account after success or uncertain failure [10:54:36.923] ERROR (#393): Error [AssertionError]: expected [ { id: 'first.json', …(4) }, …(1) ] to deeply equal [ { id: 'first.json', …(5) }, …(1) ] at /home/ubuntu/wt/claude-13/apps/server/src/usage/cliproxyApi.test.ts:517:49 { actual: [ { id: 'first.json', driver: 'codex', email: 'first@example.com', workspaceId: 'account-a', usageLimits: [Object] }, { id: 'second.json', driver: 'codex', email: 'second@example.com', workspaceId: 'account-b', usageLimits: [Object] } ], expected: [ { id: 'first.json', driver: 'codex', email: 'first@example.com', workspaceId: 'account-a', plan: undefined, usageLimits: [Object] }, { id: 'second.json', driver: 'codex', email: 'second@example.com', workspaceId: 'account-b', plan: undefined, usageLimits: [Object] } ], showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } stdout | apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > invalidates an account when reset is interrupted after the credit is spent [10:54:36.939] ERROR (#448): Error [AssertionError]: expected [ 'a', 'a', 'b', 'b' ] to deeply equal [ 'a', 'b', 'b' ] at /home/ubuntu/wt/claude-13/apps/server/src/usage/cliproxyApi.test.ts:566:9 { actual: [ 'a', 'a', 'b', 'b' ], expected: [ 'a', 'b', 'b' ], showDiff: true, operator: 'deepStrictEqual', [cause]: undefined } ❯ apps/server/src/usage/cliproxyApi.test.ts (23 tests | 5 failed) 172ms ❯ CLIProxyAPI built-in management API (18) × paces usage probes, retains recent readings through 429s, and expires them during backoff 21ms × isolates cached readings by hub, file, provider, email, and workspace 24ms × shares concurrent reads without blocking other identities or retaining a pre-reset reading 10ms × retains pacing after a rejected reset but invalidates only the attempted account after success or uncertain failure 11ms × invalidates an account when reset is interrupted after the credit is spent 13ms ⎯⎯⎯⎯⎯⎯⎯ Failed Tests 5 ⎯⎯⎯⎯⎯⎯⎯ FAIL apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > paces usage probes, retains recent readings through 429s, and expires them during backoff AssertionError: expected { …(3) } to deeply equal { …(2) } - Expected + Received { - "checkedAt": "1970-01-01T00:00:00.000Z", - "windows": [ - { - "id": "five_hour", - "kind": "session", - "label": "Session", - "usedPercent": 10, - "windowDurationMins": 300, + "checkedAt": "1970-01-01T00:00:59.999Z", + "unavailable": { + "message": "The hub could not read this account's usage.", + "reason": "probeFailed", }, - ], + "windows": [], } ❯ apps/server/src/usage/cliproxyApi.test.ts:370:69 368| const previousProbes = probes; 369| yield* TestClock.adjust(minutes * 60_000 - 1); 370| expect((yield* api.readAccounts(config))[0]?.usageLimits).to… | ^ 371| expect(probes).toBe(previousProbes); 372| yield* TestClock.adjust(1); ❯ 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 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:589:27 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1159:17 ❯ Array. node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5160:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/5]⎯ FAIL apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > isolates cached readings by hub, file, provider, email, and workspace AssertionError: expected [ { id: 'first.json', …(5) } ] to deeply equal [ { id: 'first.json', …(5) } ] - Expected + Received @@ -12,11 +12,11 @@ "windows": [ { "id": "primary", "kind": "session", "label": "Session", - "usedPercent": 10, + "usedPercent": 70, "windowDurationMins": 300, }, ], }, "workspaceId": "account-a", ❯ apps/server/src/usage/cliproxyApi.test.ts:442:47 440| } 441| listed[0] = original; 442| expect(yield* api.readAccounts(config)).toEqual(baseline); | ^ 443| expect(probes).toBe(6); 444| }), ❯ 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 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:589:27 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1159:17 ❯ Array. node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5160:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/5]⎯ FAIL apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > shares concurrent reads without blocking other identities or retaining a pre-reset reading AssertionError: expected 30 to be 20 // Object.is equality - Expected + Received - 20 + 30 ❯ apps/server/src/usage/cliproxyApi.test.ts:478:60 476| }); 477| const [other] = yield* api.readAccounts({ ...config, url: "htt… 478| expect(other?.usageLimits.windows[0]?.usedPercent).toBe(20); | ^ 479| const redeem = yield* Effect.forkChild(api.consume(config, "fi… 480| yield* Deferred.await(spent); ❯ 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 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:589:27 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1159:17 ❯ Array. node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5160:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/5]⎯ FAIL apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > retains pacing after a rejected reset but invalidates only the attempted account after success or uncertain failure AssertionError: expected [ { id: 'first.json', …(4) }, …(1) ] to deeply equal [ { id: 'first.json', …(5) }, …(1) ] - Expected + Received [ { "driver": "codex", "email": "first@example.com", "id": "first.json", - "plan": undefined, "usageLimits": { - "checkedAt": "1970-01-01T00:00:00.000Z", - "resetCredits": { - "availableCount": 0, + "checkedAt": "1970-01-01T00:01:00.000Z", + "unavailable": { + "message": "The hub could not read this account's usage.", + "reason": "probeFailed", }, - "windows": [ - { - "id": "primary", - "kind": "session", - "label": "Session", - "usedPercent": 12, - "windowDurationMins": 300, - }, - ], + "windows": [], }, "workspaceId": "account-a", }, { "driver": "codex", "email": "second@example.com", "id": "second.json", - "plan": undefined, "usageLimits": { - "checkedAt": "1970-01-01T00:00:00.000Z", - "resetCredits": { - "availableCount": 0, - }, - "windows": [ - { - "id": "primary", - "kind": "session", - "label": "Session", - "usedPercent": 12, - "windowDurationMins": 300, + "checkedAt": "1970-01-01T00:01:00.000Z", + "unavailable": { + "message": "The hub could not read this account's usage.", + "reason": "probeFailed", }, - ], + "windows": [], }, "workspaceId": "account-b", }, ] ❯ apps/server/src/usage/cliproxyApi.test.ts:517:49 515| limited = true; 516| yield* TestClock.adjust("1 minute"); 517| expect(yield* api.readAccounts(config)).toEqual(initial); | ^ 518| expect(usageProbes()).toBe(4); 519| expect((yield* Effect.flip(api.consume(config, "first.json", "… ❯ 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 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:589:27 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1159:17 ❯ Array. node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5160:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/5]⎯ FAIL apps/server/src/usage/cliproxyApi.test.ts > CLIProxyAPI built-in management API > invalidates an account when reset is interrupted after the credit is spent AssertionError: expected [ 'a', 'a', 'b', 'b' ] to deeply equal [ 'a', 'b', 'b' ] - Expected + Received [ "a", + "a", "b", "b", ] ❯ apps/server/src/usage/cliproxyApi.test.ts:566:9 564| .map((request) => request.body?.auth_index) 565| .sort(), 566| ).toEqual(["a", "b", "b"]); | ^ 567| }), 568| ); ❯ 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 ❯ FiberImpl.evaluate node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:589:27 ❯ node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:1159:17 ❯ Array. node_modules/.pnpm/effect@4.0.5/node_modules/effect/src/internal/effect.ts:5160:17 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/5]⎯ Test Files 1 failed (1) Tests 5 failed | 18 passed (23) Start at 10:54:33 Duration 3.63s (transform 65%, import 27%, tests 5%, setup 3%) Transform transforming modules took 2.26s · 65% 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