An org type's default ladder can start on a product that confers nothing, and then restoring the default fails #153
Closed
opened 2026-09-28 08:23:54 +00:00 by cgalo5758
·
2 comments
Labels
Clear labels
accessibility
area/billing
area/catalog
area/discourse
area/domains
area/entitlements
area/fedwiki
area/identity
area/integrations
area/licensing
area/member-ui
area/meta
area/operator-ui
area/ops
area/testing
duplicate
good-first-issue
invalid
privacy
security
upstream
wontfix
A barrier for people using assistive technology or a keyboard alone.
The Stripe mirror, checkout, subscriptions, invoices, fulfillment.
Products, prices, plan ladders, purchasability.
The Discourse integration.
The domains registry, claims, placements, the certificate ask.
Entitlement sets, rules, grants, pools, provisioning.
The Federated Wiki integration and farm sync.
Sign-in, sessions, persons, organizations, workspaces, roles.
The provider registry, outbox and webhooks in general.
Licenses, the contributor agreement, SPDX headers.
Member pages.
The repository itself, its contributing guide, CI, the tracker and the workflow.
Operator pages, forms, lists, the design system.
Deployment, configuration, migrations, workflows, instance settings.
The test stack, screens, lint, walkthroughs.
Closed because another issue already covers it.
Small, self-contained, and explained enough to be a first contribution.
Closed because it is not a ticket for this repository.
Touches what a person's data reveals.
Touches authentication, authorization, secrets or data exposure.
Waits on another repository or project before it can move.
Closed because it will not be done, with the reason in the last comment.
kind
bug
The software does something other than what it promises; closed when it again does what it promises.
kind
debt
Code, tests or tooling to clean up with nothing visible changing; closed when they are cleaner.
kind
design
A question to settle before work can be defined; closed when the decision is written down.
kind
docs
Documentation that is wrong or missing; closed when it says the right thing.
kind
enhancement
Something the software does not do yet; closed when it does.
priority
critical
Blocks the active milestone or harms members now.
priority
high
Next in line inside the active milestone.
priority
low
Inside the active milestone, when nothing else is left.
priority
medium
Inside the active milestone, after the high ones.
Milestone
No items
No Milestone
Public launch
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wiki-cafe/member-console#153
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The Default Plan control on the org types page refuses a ladder with no rank-0 tier: the preview renders an error instead. It accepts a ladder whose rank-0 product has no entitlement set. Once such a ladder is an org type's default, restoring the default fails for every organization of that type.
What happens
Restoring the default confers the default ladder's rank-0 product, and
core.conferrefuses a product with no entitlement set. An operator's revoke of a grant in such an organization fails with:The operator's confirm dialog then ends without a success notice. The same restore (
ReapplyDefaultsIfVacant) also runs after a subscription ends, after a grant expires and after an org-type migration, so those paths meet the same refusal. Only the revoke path was observed failing; the others were not exercised.How to reproduce
The browser walkthroughs share the app database across runs:
On a freshly reset database, grant-revoke runs before the other two, so the suite passes.
Where it could be stopped
Related: #98 (a product never shows what it delivers).
#187 changed how this shows up. A default change to a ladder whose rank-0 product confers nothing now commits, and each organization's move then fails at the step that confers the default, five times. The org type's card lists every organization as not moved, with "The default plan could not be conferred.", and Retry fails the same way until the product gets an entitlement set. The default change's first transaction is where this could be refused, next to its refusal of a ladder with no rank-0 tier: it already reads the candidate's rank-0 product there.
An organization type's default plan can no longer start on a product that confers nothing. (A plan ladder is an ordered list of tiers, each tier a product. An organization type names one ladder as its default, and that ladder's bottom tier is what a new organization starts on and what an organization left with no plan is put back on. A product's entitlement set is what the product delivers.)
The database now refuses the two writes that produced that state: making a product with no entitlement set a tier of any ladder, and clearing the entitlement set of a product that is a tier. Every default ladder starts on a tier, so no change to a ladder, a product or a default can leave one starting on a product with no set. This holds on ladders that no organization type uses as well, because a tier with no set can never be delivered: conferring it is refused for grants and for the default, and a subscription to it is skipped with a warning in the server log.
On a ladder's page, Add tier no longer lists products with no entitlement set, refuses one submitted from a page shown before its set was cleared, and refuses with "Only products with an entitlement set can be tiers." a product whose set is cleared while the add runs. On a product's page, a product that is a tier no longer offers "None" for its entitlement set, and the field reads "This product is a tier of Hosting, and a tier needs an entitlement set."
The same cause broke more than the revoke reported above. When the broken default was the personal type's, a new person's first sign-in failed with the "Sign-in failed" page, because sign-up confers that default and the whole sign-up is undone when that fails. A subscription's end was undone too, so a cancelled subscription's plan kept delivering, and every replay of the cancellation failed the same way. A grant's expiry, a tier removal that moves holders onto the default, and each organization's move after a default change (the comment above) or a reorder failed on it as well. None of these can now fail on this cause.
Not changed here: a default ladder whose bottom tier is a draft or retired product breaks the same paths, and nothing in the console changes a product's lifecycle yet; #155 has a note on it. A set with no rules is still allowed, and the previews still warn about it. A database that already holds such a ladder keeps it until it is fixed by hand: give the product an entitlement set on its page, and Retry on the organization type's card then moves the organizations a default change left behind.
Commits:
8fdecf0e,710591aa,701ab7e5,bd4041a1,fc68a6b7.