Skip to content

pit: $2 a name, $5 an ending — no trailing cents - #144

Merged
ralyodio merged 1 commit into
mainfrom
fix/child-price-cap
Jul 31, 2026
Merged

pit: $2 a name, $5 an ending — no trailing cents#144
ralyodio merged 1 commit into
mainfrom
fix/child-price-cap

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

PRD 0005 §10.1 wrote these as $1.99 and $4.99. The extra cent buys nothing but a price tag shaped like a supermarket shelf, and every number here is one a person has to reason about — a default, a ceiling, a per-line override.

foo.bar   $2
.bar      $5

Which price is which

Worth stating, because it's easy to get backwards: moshpit_tlds.price_usd sits on the ending's row but is the child price — what someone pays to mint foo.bar.

export async function quoteName({ tld, label, buyerId }) {   // quoting label.tld
  if (owner.user_id === buyerId) return { error: `you own .${tld} — mint names under it for free` };
  return { ok: true, priceUsd: owner.price_usd };
}

Owning .bar means minting names under it for free; setting a price is how other people buy them. So $2 is the number that field carries.

$5 is defined and charged by nothing

registerTld inserts a row — claiming an ending is still free. The checkout that would read ENDING_PRICE_USD needs terms and renewals first (Phase 1 of the PRD rollout).

It lives beside the child price anyway so the two are settled together, rather than being invented when someone builds that and reconciled afterwards. No UI claims endings cost money.

Still no enforcement

setTldPrice doesn't impose the ceiling — a per-line $5USD is honoured. The cap is what the form defaults to and what the input hints at, not a rule the library imposes on an operator's own namespace. (Enforcing it also breaks six existing sales tests that predate any cap.)

Tests

A test now fails on any price that isn't whole dollars, so a regression to .99 can't ship quietly. 263/263 pwa suite.

🤖 Generated with Claude Code

PRD 0005 §10.1 wrote these as $1.99 and $4.99. The extra cent buys nothing but
a price tag shaped like a supermarket shelf, and every number here is one a
person has to reason about: a default, a ceiling, a per-line override. Round.

Which price is which mattered and was easy to get wrong. `moshpit_tlds
.price_usd` sits on the ending's row but is the *child* price — what someone
pays to mint `foo.bar`. Owning `.bar` means minting names under it for free;
setting a price is how other people buy them. So $2 is the number that field
carries, and the ending price is a separate thing.

ENDING_PRICE_USD is defined and charged by nothing. `registerTld` inserts a row
and claiming an ending is still free — the checkout that will read this needs
terms and renewals first. It lives beside the child price anyway so the two are
settled together, rather than being invented at the point someone builds that
and reconciled afterwards.

Still no enforcement on setTldPrice: a per-line `$5USD` is honoured. The ceiling
is what the form defaults to and what the input hints at, not a rule the library
imposes on an operator's own namespace.

A test now fails on any price that is not whole dollars, so a regression to .99
cannot ship quietly.

263 across the pwa suite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit fd300d0 into main Jul 31, 2026
3 checks passed
@ralyodio
ralyodio deleted the fix/child-price-cap branch July 31, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant