Repository navigation
Hosted billing: email support when the billing cron fails, and write the support runbooks - #1562
Merged
Merged
Conversation
The 14-day withdrawal refund and the hand refund path rested on someone watching Cron Events, with Worker observability off. A failing pass now mails the error messages to the support address, leading with what is overdue, at most once a day per distinct line. The invocation still fails whatever the alert does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cancelling, closing, the 30-day and unused-period refunds, withdrawal by email or post, restoring a founding lock, and first-time notices each get exact steps and the deadline the Terms promise. The runbooks' SQL is what the tests run. The README and rationale no longer say the entitlement is admin-only. The built promises move above the fold in the pricing spec; what remains stays. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts: # docs/specs/pricing.md # hosted/README.md # hosted/server/notices.ts # hosted/server/tests/billing-routes.test.ts # hosted/server/tests/migrations.test.ts
…dgets Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying mouseterm with
|
| Latest commit: |
54c3a3f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fcf10982.mouseterm.pages.dev |
| Branch Preview URL: | https://billing-ops.mouseterm.pages.dev |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
dormouse-bot
approved these changes
Nov 3, 2026
| export const BillingAlert: Story = { | ||
| args: alertMessage( | ||
| [ | ||
| { text: "Withdrawal e7a40e59-bc8d-404c-b29c-5a32b0c40bef: submitted 2027-03-05, its refund is due by 2027-03-19", overdue: true }, |
Collaborator
There was a problem hiding this comment.
This overdue line doesn't match what settleWithdrawals emits (Withdrawal ${id}, noticed …, is unsettled: its refund is due by …), so the story shows support a wording that never arrives:
Suggested change
| { text: "Withdrawal e7a40e59-bc8d-404c-b29c-5a32b0c40bef: submitted 2027-03-05, its refund is due by 2027-03-19", overdue: true }, | |
| { text: "Withdrawal e7a40e59-bc8d-404c-b29c-5a32b0c40bef, noticed 2027-03-05, is unsettled: its refund is due by 2027-03-19", overdue: true }, |
A billing correction is now a marked refund, so the runbook says that instead of staying below the full amount. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 4, 2026
19 of 27 tasks
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.
Part of the billing release gate, #1074. Billing still ships closed. Based on #1561, so that the alert's email joins
Hosted/Emails; merge #1561 first and this retargets tomain.[email protected], once a day per distinct error, with overdue withdrawals, closures, and acknowledgements first. Messages only, with keys, connection URLs, and card-shaped numbers masked. A failed alert is logged and retried, and the invocation still fails. Migration 028 keeps only fingerprints. The alert's text lives inbilling-alert-message.ts, so Storybook can show it. Seedocs/specs/hosted.md-> "Billing alert".hosted/README.md: verifying a customer, cancelling for someone who cannot sign in, closing by email, the 30-day refund, withdrawal by email or post, unused-period refunds, restoring a founding lock, and the first 30-day notice. The withdrawal path records by SQL and lets the cron end, refund, and acknowledge it, which also brings it under the alert. Tests run the README's own SQL. The owner line is still to be named before launch.pnpm test:hosted(367) passes, and the alert was seen arriving in the local inbox at the 10-minute cron. Mutation checks are recorded on the alert and overdue lines.Known limits, in the README: the alert cannot report a cron that has stopped or a Postmark refusal, so the runbook asks for a weekly look at Cron Events; nothing shows notices at sign-in for an account without an email, so a notice to one starts no period; the founding-restore
stripe subscriptions createcommand has not been run; and Postmark delivery from support to itself is unproven until the README's alert exercise runs on production.🤖 Generated with Claude Code