Repository navigation
Hosted: drop the clock-skew allowance from account closure's hold - #1925
Merged
Merged
Conversation
A closure attempt cancels within seconds of its start, and the hold's `cancelingBy` sits 15 minutes past that start, so the extra five minutes added nothing and left the code looser than the closure rule it follows. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying mouseterm with
|
| Latest commit: |
64b5fb2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e8aabb96.mouseterm.pages.dev |
| Branch Preview URL: | https://audit-closure-skew.mouseterm.pages.dev |
dormouse-bot
approved these changes
Nov 30, 2026
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.
Account closure records the subscriptions an attempt is canceling, with a deadline (
cancelingBy) set 15 minutes past the attempt's start. A later attempt drops any recorded subscription that ended after that deadline, since it lapsed for some other reason. The code added another five minutes for clock skew between Stripe and the Worker before dropping one.An attempt cancels within seconds of its start, so the 15-minute hold already absorbs any plausible skew. This removes the extra allowance, making the code match the closure rule in
docs/specs/security-hosted.mdexactly, and updates the rationale entry that cited it.server/tests/billing-routes.test.tspasses (66/66).🤖 Generated with Claude Code