Nothing stops a plan ladder from ending up with gaps in its order #61

Open
opened 2026-09-21 07:18:18 +00:00 by cgalo5758 · 0 comments
Owner

What a contributor runs into

The tiers of a ladder are meant to occupy consecutive ranks starting at zero, and that holds only because the operator interface is careful. A writer outside it can leave a gap, and the page that reported gaps has since been retired, so nothing detects one either.

Why it costs

Rank order is what decides whether a change of plan is a move up or down, so a gap is invisible until a plan change resolves to the wrong direction.

Where

internal/db/migrations, the tiers table; the reorder path in internal/server.

Done when

Contiguity is enforced in the database or reported by a check that runs on its own schedule. The reorder parks rows before reassigning them, which fights a constraint that cannot be deferred, so a deferrable constraint or a trigger is the candidate rather than a plain unique index.

Migrated from status/issues.md at b7a0e15

## What a contributor runs into The tiers of a ladder are meant to occupy consecutive ranks starting at zero, and that holds only because the operator interface is careful. A writer outside it can leave a gap, and the page that reported gaps has since been retired, so nothing detects one either. ## Why it costs Rank order is what decides whether a change of plan is a move up or down, so a gap is invisible until a plan change resolves to the wrong direction. ## Where [`internal/db/migrations`](https://git.coopcloud.tech/wiki-cafe/member-console/src/commit/b7a0e15/internal/db/migrations), the tiers table; the reorder path in [`internal/server`](https://git.coopcloud.tech/wiki-cafe/member-console/src/commit/b7a0e15/internal/server). ## Done when Contiguity is enforced in the database or reported by a check that runs on its own schedule. The reorder parks rows before reassigning them, which fights a constraint that cannot be deferred, so a deferrable constraint or a trigger is the candidate rather than a plain unique index. Migrated from status/issues.md at b7a0e15
cgalo5758 added the
kind
debt
area/entitlementsarea/catalog
labels 2026-09-21 07:18:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#61