Pricing: raise delivered-issue rate to $5.00 (rate_minor 500) #45

Closed
opened 2026-09-01 11:17:14 +02:00 by pbwraith · 0 comments
Owner

Decision

Owner set delivered-issue pricing to $5.00 (2026-09-01), up from the
current defaults in config.py:

DEFAULT_TIERS = {
    "gold":     {"auto_merge": True,  "rate_minor": 100},   # $1.00
    "standard": {"auto_merge": False, "rate_minor": 25},    # $0.25
    "free":     {"auto_merge": False, "rate_minor": 0},
}

Scope

Set rate_minor to 500 for both gold and standard. free stays 0.
SAAS_TIERS_JSON still overrides, so per-client deals remain possible without
a code change.

This is a defaults change only. Do not restructure the tier map, and do not
change auto_merge — that flag is the subject of the calibration issue and must
not move until there is a measured false-approve rate behind it.

Check while you are in there

rate_minor is charged per delivered issue, on merge. Confirm with a test
that a delivered issue debits exactly 500 minor units once, and that a replayed
delivery does not double-charge — the idempotency key is
repo + issue number + merge sha. If that invariant is already covered, say so
and add nothing.

Files this issue owns

gitea_saas/config.py, tests/test_billing_core.py (or wherever the tier-rate
assertion lives — do not create a second test module for it).

Acceptance

  1. Defaults are 500/500/0; a test asserts the values rather than the constant name.
  2. SAAS_TIERS_JSON override still wins.
  3. One delivery = one 500-unit debit; a replay = no second debit.
  4. Full suite green.
## Decision Owner set delivered-issue pricing to **$5.00** (2026-09-01), up from the current defaults in `config.py`: ```python DEFAULT_TIERS = { "gold": {"auto_merge": True, "rate_minor": 100}, # $1.00 "standard": {"auto_merge": False, "rate_minor": 25}, # $0.25 "free": {"auto_merge": False, "rate_minor": 0}, } ``` ## Scope Set `rate_minor` to **500** for both `gold` and `standard`. `free` stays 0. `SAAS_TIERS_JSON` still overrides, so per-client deals remain possible without a code change. This is a defaults change only. Do not restructure the tier map, and do not change `auto_merge` — that flag is the subject of the calibration issue and must not move until there is a measured false-approve rate behind it. ## Check while you are in there `rate_minor` is charged **per delivered issue, on merge**. Confirm with a test that a delivered issue debits exactly 500 minor units once, and that a replayed delivery does not double-charge — the idempotency key is `repo + issue number + merge sha`. If that invariant is already covered, say so and add nothing. ## Files this issue owns `gitea_saas/config.py`, `tests/test_billing_core.py` (or wherever the tier-rate assertion lives — do not create a second test module for it). ## Acceptance 1. Defaults are 500/500/0; a test asserts the values rather than the constant name. 2. `SAAS_TIERS_JSON` override still wins. 3. One delivery = one 500-unit debit; a replay = no second debit. 4. Full suite green.
pbwraith added the
p2
label 2026-09-01 11:17:18 +02:00
pbwraith added the
in-progress
label 2026-09-01 13:12:07 +02:00
pbwraith added
in-review
and removed
in-progress
labels 2026-09-01 13:15:14 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pbwraith/gitea-saas-core#45
No description provided.