Skip to content
Toolkit

Job 011: plan-ladder

Status: DONE Owner: @work, the routine

Phase: 00–04 met; 05's catalogue half met, its seed gated on Blocker 1 · Status: DONE (close-out) · Updated: 2026-08-30

Scoreboard: npm run check:ladder — 5 of 7 rungs closed (4 axis, 1 transition, 1 resolution, 1 seed), 1 held with no phase. storage is 010 phase 04's, described rather than planned; expiry is this track's first, and the first rung it closed on something that RUNS; seats and custom_slugs are its two axes, both count-over-scope.

Dependencies: none open. 010 is DONE (close-out) and leaves the quota registry with its first magnitude axis (storage_bytes_limit, ADR-0130) and the shape a non-count axis takes. 004 is DONE and left the mechanism this track puts rungs on: fifteen axes, six capabilities, check:entitlements C1–C7, and an admin plan form that takes effect without a deploy. Charter: ./README.md. Routine: ./ROUTINE.md (batch loop, claim refs claim/011-*, budgets — inherited from 010 unchanged, plus a rung is closed only when something reads it). Source: product gap assessment .archives/removal-safe/docs/assessments/PRODUCT-GAP-ASSESSMENT-082926.md §Plans.

Objective

The plans are a ladder somebody can climb, and every rung of it is enforced: named tiers with their axes set and their prices the owner's to fill, the missing quota axes in the registry with the paths that read them, and movement between rungs — up by purchase, down by expiry — a path that runs. The charter's phase table carries the bars; they are not restated here.

Completed

  • Chartered — README, ROUTINE (010's protocol, claim namespace claim/011-*, plus the reads-it rule), this file; ROADMAP's 011 row flipped ACTIVE and 010 closed DONE in the run before. Findings re-verified against e9a320c rather than inherited, and the assessment is stale in one place because 010 shipped in between: three axes are missing, not four — storage_bytes_limit landed with 010 phase 04. What holds: the seed has one plan with empty prices; CheckoutHandler.Create refuses a non-positive price, so no purchasable tier exists; teams_limit counts workspaces owned and is not seats; AddMember checks no quota at all; and users.plan_id defaults to 0 while the seeded plan is 1.

    One finding is stronger than the assessment's, and it was found by running a statement rather than reading one: the downgrade path is not missing, it is present and cannot run. expire_subscriptions assigns and compares the string 'free' against an INT column, and PostgreSQL 16 refuses the statement at parse time with zero matching rows — so the hourly task has errored on every run it has ever made and no subscription has ever expired (evidence .station/jobs/011-plan-ladder/evidence/expire-subscriptions-postgres-2026-08-30.md). It is phase 01.

  • Phase 00 — the ladder ledger and its gate, minted before any axis or tier lands. scripts/ladder-ledger.json holds seven rungs, storage alone closed, and npm run check:ladder (rules R1–R6) is in verify, reporting 1 of 7. A closed row names the path that READS or RUNS it and its test; an open row names neither, and its store half — a registry entry, a task registration, the checkout's own refusal of a non-positive price — is held to the same anchors, so deleting one fails the build. Two rules are this track's own: R5a, no row carries a number anywhere at any depth, because tier names, per-tier axis values and prices are Blocker 1 and a figure written here would be this track answering it in the quietest place there is; and R5b, a rung with phase: null cannot be closed, which is what holding subdomains looks like when the session that remembers why is gone. Watched failing seven ways, the seventh from the side a real regression travels — the storage refusal made to return nil with the ledger untouched (evidence .station/jobs/011-plan-ladder/evidence/phase-00-gate-watched-failing-2026-08-30.md)

  • Phase 01 — the bottom rung runs. The free plan is the row that says it is: plans.is_default (migration 000043, partial unique index on the TRUE side), read once through PlanRepository.DefaultPlanID and handed, with the clock (ADR-0113), to a statement that spells no plan's name. The task moved to RegisterSubscriptionTasks and refuses rather than guessing when no row is marked. plan_id 0 is answered from the same fact: the three create paths insert the default plan, and an id matching no row resolves to it instead of to no plan at all — which granted unlimited quotas and denied every capability. Watched failing on the migrated schema, then an account watched moving, then the test watched failing with the literal restored (ADR-0134, evidence .station/jobs/011-plan-ladder/evidence/phase-01-expiry-runs-postgres-2026-08-30.md)

  • Phase 02 — the seat axis. seats_limit joins the quota registry and is refused on by WorkspaceHandler.AddMember, the one path that adds a member and which checked no quota at all. It needed a third registration shape — count-over-scope, beside count-over-user and magnitude-over-scope — because a seat counter handed a user id compiles and counts that account's memberships everywhere, a limit nobody sold. The refusal sits below the duplicate check, so an add that changes nothing is not charged a seat. Unseeded, so nothing moves until a plan carries a number. Watched failing twice — the check removed from the handler, and the counter handed the actor (ADR-0135, evidence .station/jobs/011-plan-ladder/evidence/phase-02-seat-axis-watched-failing-2026-08-30.md)

  • Phase 03 — the name axis. custom_slugs_limit is refused on inside refuseTakenSlug, the one place a name is taken (ADR-0115), on creates only — a rename moves a name the workspace already holds. What counts as custom was answered from a census rather than a preference: nothing in this product mints an address, so every name is its author's and the axis bounds names HELD, a released one not among them. It reuses phase 02's scope-count shape unchanged, and 009's claim-path anchors survived the signature growing one parameter. Watched failing twice — the refusal removed, and a rename charged (ADR-0136, evidence .station/jobs/011-plan-ladder/evidence/phase-03-name-axis-watched-failing-2026-08-30.md)

  • Phase 04 — whose plan applies. One site, before anyone decides what the answer is: planSettingsFor is the only place a quota reads a plan and it resolves the holder through holderOf first, with all three axis shapes moved onto it in the same commit — check passing no workspace, checkScope and checkPending passing theirs. actorHoldsThePlan returns what all eighteen axes returned severally before it, so nothing any axis decides moves; Blocker 4 stays the owner's and lands in that one function. It needed a gate rule of a new shape — R7, single-site — because a resolution is undone by an EXTRA call, which no anchor rule can see. Watched failing three ways (ADR-0137, evidence .station/jobs/011-plan-ladder/evidence/phase-04-plan-scope-watched-failing-2026-08-30.md)

  • Phase 05, first slice — an unpriced rung is not a free rung. The catalogue answered Free to a stored zero AND to no price at all, which are different facts arriving distinguishable (monthly_price is nullable and the client type says so). Since the seed lands prices empty — Blocker 1 — every seeded tier is the second case until the owner prices it, so the seed's first visible effect would have been a ladder of free rungs. Three states now: a price, Free on a stored zero, and not sold at this billing frequency, which gets no action because CreateCheckout refuses price <= 0 anyway. ADR-0077's finding one column over. The tiers ledger row names this branch in its store half beside the checkout's refusal — the two things the seed must not change — and stays open, since a seed with no reader is not a rung. Watched failing on the branch it replaces (ADR-0138)

  • Closed — reports/CLOSE.md, 011 DONE on ROADMAP. Every buildable phase met; the ledger stands at 5 of 7, and both open rungs are owner decisions rather than unfinished work — tiers on Blocker 1 (the tier names, not only the prices) and subdomains on Blocker 3, held with no phase because 009 phase 06 was never built. 009's shape one track over. 011 was the last track in ROADMAP's last stretch; subsequent runs drain ROADMAP's Standing repairs, one per PR.

Active

Nothing claimed.

Open items

None in flight. Residue handed back to the owner is listed here, once:

  • A subdomain quota axis has no reader, because 009 phase 06 was never built (009's Blocker 2). It stays an open ledger row with no phase rather than shipping unenforced — Blocker 3, named so it is not rediscovered.
  • New accounts are on plan_id 0, which no row has. Settled by phase 01 (ADR-0134). The rows already carrying 0 are deliberately not rewritten: a backfill would silently retarget every feature flag whose audience is 0. They resolve to the default plan at read time instead.
  • Should the product mint an address when the author supplies none? Phase 03's census found it never does, which is why custom_slugs_limit bounds names held rather than a vanity subset. Minting would make the industry distinction real and is a product decision with a surface behind it — not a blocker: the axis stays correct either way (ADR-0136).
  • CapabilityService reads the actor's plan too, and Blocker 4's question applies to a boolean exactly as it does to a number. It is one axis-family over from phase 04's bar (quotas), so it stays a row here rather than being swept in: when the owner answers, capabilities adopt the same resolution (ADR-0137).
  • Deleting a stale capability key from users.plan_settings and a password that cannot be cleared through the file forms — the rest of 004's residue, neither of them this track's, both described once in 004's SESSION open items.

Blockers

All four are owner decisions with options and a recommendation in the charter; none blocks phases 00–04, and the first is needed by phase 05 only for its numbers, never for its shape.

  1. What are the tiers, and what does each cost? Recommendation: seed the shape and the axes with prices empty and the rows not purchasable; the owner fills prices through the admin form, no deploy. Now blocking phase 05's seed — and for the tier NAMES, not only the prices: the overview's six tiers are named in a document this tree does not carry. The minimum that unblocks it is the names, in order; empty prices and unset axes are both safe (ADR-0138, and an unset quota unlimits).
  2. What happens to a workspace already over the new quota on a downgrade? Recommendation: allow it — the existing current >= max refuses the next write and touches nothing already stored. Nothing is destroyed by a plan change, which is 009's rule about clocks one subject over.
  3. Does a subdomain quota mean anything before subdomains exist? Recommendation: no — hold the axis, name it in the ledger as an open row with no phase, and let 009's Blocker 2 release it.
  4. Whose plan applies in a shared workspace? Recommendation: the workspace owner's. workspace_id has been the access boundary since 000026, and a member should not import their own allowance into somebody else's workspace.

A fifth question the charter answers rather than asks: a rung is closed only when something reads it — a stored number, a seeded row and an admin control are each necessary and none is sufficient.

Decisions

  • The ledger before the ladder — 007's enforcement ledger, 009's lifecycle ledger and 010's hosting ledger, one subject over: a rung is open until a named path reads or runs it, and the row flips only in the commit that adds that path.
  • The mechanics are the session's, the numbers are the owner's. The boundary is a seeded row's status and its empty prices, so nothing half-priced can be purchased and no figure a customer is charged from was invented here.
  • Subdomains are held rather than shipped unenforced, which is the first time this repo's "wired to nothing" rule has cost a charter a phase rather than a review note.

Files changed

  • scripts/ladder-ledger.json, scripts/check-ladder-parity.mjs, package.json (check:ladder, and it joins verify).

Verification

npm run verify exit 0 with check:ladder in the chain; the gate watched failing seven ways (evidence .station/jobs/011-plan-ladder/evidence/phase-00-gate-watched-failing-2026-08-30.md).

Next actions

Nothing, in this track. It is closed.

The one piece of work it did not do is waiting on the owner rather than on a session: the tier seed, blocked on Blocker 1 for its names as well as its prices. The charter's recommendation seeds the shape with prices empty, which phase 05's first slice made safe to display; what no session may do is invent the rungs. The overview's six tiers are named in a document this repo does not carry — the assessment cites the tier table without reproducing it and says in as many words that the seed "needs product input the repo cannot infer" (§Plans). What the owner owes, minimally: the tier names, in order. Prices may stay empty (004's admin form fills them without a deploy) and per-tier axis values may stay unset (an unset quota unlimits). With the names, the seed is one session's work and the tiers rung closes on the catalogue reader already merged.

Subsequent runs take ROADMAP's Standing repairs, one per PR.

Source: .station/jobs/011-plan-ladder/SESSION.md

Library