Repository navigation
Conversation
emma-sg
force-pushed
the
storage-addons
branch
from
October 13, 2026 23:47
6e10d2f to
128030b
Compare
emma-sg
force-pushed
the
storage-addons
branch
from
October 27, 2026 21:15
70e9fd4 to
1e94ba0
Compare
emma-sg
force-pushed
the
storage-addons
branch
from
November 2, 2026 19:19
0837a61 to
2790f2f
Compare
an org's available storage is its plan quota plus any add-on it has purchased, so the add-on is included wherever the plan quota is compared to usage.
the external subscription app owns a subscription's add-on size, billing cycle, and any change scheduled for the next renewal. the billing interval, the pending add-on size, and the pending plan are stored on the subscription. values the app has nothing for are left out of the JSON it sends, so a missing value clears what is stored rather than leaving it as it was.
the add-on is owned by the external subscription app, so changes are forwarded to it. a reduction below current usage is rejected here first, which means the org has to free space before a change can land. when the size changes it is copied into the org's extra storage quota. the app sends the size on every update, so an unchanged value writes nothing.
the external subscription app checks a reduction made in the Stripe portal against the org's real quota, which can differ from the plan's default, and against actual usage, so both are exposed behind the shared secret the app already uses.
when a reduction made in the Stripe portal would leave the org over its storage limit, the subscription app cancels it, and nothing in Browsertrix warned the person who made the change, so the org admins get an email with what the org is using, what the plan allows, and the smallest add-on that would fit. the app retries failed events, so the last cancelled size is remembered and an email is sent only once for it.
the org owner can add, change, or cancel the add-on from billing settings. an increase is charged right away, while a reduction or cancellation takes effect at the next renewal, and a pending change is shown next to the current size so it can be kept or undone. clean multiples of 1,000 GB render as TB, so the quota line's add-on note does not read "1,000 GB" beside "1 TB".
a pod that is hard-killed mid-job can re-run after the org document has been deleted, and the missing org would fail the job. a delete-org job's earlier attempt already did the work, so it finishes with success and its k8s resources get cleaned up. every other job type needs the org, so a missing one stays fatal.
claims carry a timestamp, so a pod killed mid-migration leaves a lease that expires and can be re-claimed rather than blocking the final wait loop forever. a claim older than the lease is treated as orphaned and the crawl is re-processed, which is idempotent. the wait loop only blocks on un-migrated crawls whose claim is still fresh.
`monthly_remaining_time` is clamped to zero. a quota that dropped below the month's recorded usage could otherwise go negative, which subtracted from `monthlyExecSeconds` and charged the whole overage difference to the plan/gifted/extra pools.
migrated from `appState.settings`
emma-sg
force-pushed
the
storage-addons
branch
from
November 6, 2026 02:39
2790f2f to
4378e51
Compare
This branch has not been deployed
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.
No description provided.