Repository navigation
Switch: correcting a flip within a minute keeps the same session - #33
Merged
Merged
Conversation
Flipping to the middle or the other company and back within a minute reopens the original session instead of starting a new one, and a sub-minute session ended by a flip is discarded like a sub-minute stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JarenKempton
marked this pull request as ready for review
November 18, 2026 16:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why care: Flipping the switch off by mistake and straight back splits one work session into two, even though the one-minute rule already drops accidental short sessions.
What changes
Proof
cd cloud && pnpm vitest run test/time-clock.test.ts -t "minute|detour"→ before: the flip-back and detour tests failed (expected 201 to be 200, new session created); after: pass. They drive signed device requests through the Worker against D1; no physical switch flipped.cd cloud && pnpm check && pnpm test && pnpm format:check→ 42/42 pass, types and formatting cleanMerge: needs an independent review first; deploys on merge, no migration
No ticket
🤖 Generated with Claude Code · Opus 5.5 (Claude Code)