Skip to content

Commit 30c1df5

Browse files
only21milclaude
andcommitted
test(server): assert the recovery snooze is active before the early resume
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a65b7c6 commit 30c1df5

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎apps/server/src/orchestration-v2/Orchestrator.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ function limitRecoveryOwnsSnooze(thread: LimitRecoverySnooze): boolean {
821821
);
822822
}
823823

824-
// The recovery's own snooze ends when the thread resumes early; one the user set stays.
824+
// The recovery's own snooze ends when the thread resumes early; a snooze the user set stays.
825825
export function snoozeHoldsLimitRecovery(thread: LimitRecoverySnooze, nowMs: number): boolean {
826826
return (
827827
thread.snoozedUntil != null &&

‎apps/server/src/orchestration-v2/runtimeLayer.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7635,6 +7635,11 @@ it.layer(layerTest)("usage-limit recovery", (it) => {
76357635
},
76367636
],
76377637
});
7638+
if (!retryReportsReset) {
7639+
const snoozedUntil = (yield* orchestrator.getThreadProjection(threadId)).thread
7640+
.snoozedUntil;
7641+
assert.equal(DateTime.toEpochMillis(snoozedUntil!), Date.parse(resetAt));
7642+
}
76387643
yield* sweep(reading(checkedNow, 0));
76397644
const resumed = yield* orchestrator.getThreadProjection(threadId);
76407645
assert.lengthOf(resumed.runs, 2);

0 commit comments

Comments
 (0)