Repository navigation
Conversation
… re-snoozes it on Resume at reset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Waking or pinning a thread now clears its stale recovery snooze flag, preventing a later Resume at reset action from hiding it again. The change is limited to explicit thread actions and preserves existing auto-resume settings. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Review requested
Logged so this PR shows when a maintainer was asked to review it. |
|
The automated pipeline stopped on this pull request and will not merge it: the fix is written and reviewed, but proving it needs something no worker has:
It stays open for a person to finish or close. |
Problem
A thread stops on a usage limit and you press Snooze until reset. Later you wake it from the sidebar, the thread menu, or the mobile thread list, or you Pin it. Then you press Resume at reset on the banner. The thread disappears back into Snoozed, though all you asked for was auto-resume. After a Pin, the thread ends up pinned and snoozed at the same time.
The cause:
thread.unsnoozeandthread.pinclearsnoozedUntilbut leavelimitRecovery.snoozeset totrue. "Resume at reset" sends{ runId, resetAt, autoResume: true }with nosnoozefield. Thethread.metadata.updatedecider fills the missing field from the stale flag, so it snoozes the thread toresetAtagain.Change
thread.unsnoozeandthread.pinnow clearlimitRecovery.snooze, the same waythread.snoozealready does (limitRecovery: thread.limitRecovery ? { ...thread.limitRecovery, snooze: false } : null). Once something other than limit recovery wakes the thread, recovery no longer owns a snooze. This matches therecoveryOwnsSnoozecheck the web and mobile clients already use.thread.settleis left alone, because #28360 changes that case.Scope and approval
This is a very small, focused fix for an obvious bug, so there is no prior issue. You ask for auto-resume and the server hides the thread instead, and Pin produces a pinned-and-snoozed state that the pin decider otherwise rules out. The fix is two lines, copied from the sibling
thread.snoozecase, plus two rows in an existing test table.Overlap search: #28360 (open) touches only
thread.settle. #22775 (open) covers empty wake runs and projection queries. #28359 (open) covers auto-settle in ThreadSettlementService and ProjectionStore. None of them change thethread.unsnoozeorthread.pindeciders. GitHub searches for "unsnooze limitRecovery" and "snooze limit recovery wake pin" found no other matches (only the original feature, #12687).Verification
wake-then-resumeandpin-then-resumerows toruntimeLayer.test.ts› "usage-limit recovery" › "guards a scheduled usage-limit continuation against %s". Each row snoozes until reset, wakes or pins, presses Resume at reset, and asserts the thread stays awake.main: both rows fail withAssertionError: expected DateTime.Utc(1970-01-01T00:01:00.000Z) to equal null, meaningsnoozedUntilcomes back asresetAt.vp test runonruntimeLayer.test.ts,UsageLimitRecoveryWorker.test.ts,ThreadSettlementService.test.ts, andProjectionStore.test.tspassed 193 of 193 tests in 4 files. This includes the existingindependent-patchesrow, which shows thatsnoozeis still kept while recovery really owns the snooze.vp run check:changed: format, lint, knip, graphql, typecheck (3 packages), and tests all pass.Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code