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
Owner

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.confer refuses a product with no entitlement set. An operator's revoke of a grant in such an organization fails with:

failed to revoke grant … restore default for pool …: reapply-defaults: confer default grant: confer grant: ERROR: confer: product … has no entitlement set and confers nothing

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:

  1. The plan-ladders walkthrough creates a ladder whose two tiers have no entitlement set.
  2. The org-types walkthrough then makes it the personal org type's default.
  3. On the next run, the grant-revoke walkthrough's revoke fails as above.

On a freshly reset database, grant-revoke runs before the other two, so the suite passes.

Where it could be stopped

  • In the default-change preview, alongside the existing refusal of a ladder with no rank-0 tier.
  • Or where a ladder's tiers are chosen, since a rung that confers nothing can never be delivered by any source.

Related: #98 (a product never shows what it delivers).

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.confer` refuses a product with no entitlement set. An operator's revoke of a grant in such an organization fails with: ``` failed to revoke grant … restore default for pool …: reapply-defaults: confer default grant: confer grant: ERROR: confer: product … has no entitlement set and confers nothing ``` 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: 1. The plan-ladders walkthrough creates a ladder whose two tiers have no entitlement set. 2. The org-types walkthrough then makes it the personal org type's default. 3. On the next run, the grant-revoke walkthrough's revoke fails as above. On a freshly reset database, grant-revoke runs before the other two, so the suite passes. ## Where it could be stopped - In the default-change preview, alongside the existing refusal of a ladder with no rank-0 tier. - Or where a ladder's tiers are chosen, since a rung that confers nothing can never be delivered by any source. Related: #98 (a product never shows what it delivers).
cgalo5758 added the
kind
bug
area/entitlementsarea/catalogarea/operator-ui
labels 2026-09-28 08:23:54 +00:00
Author
Owner

#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.

#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.
cgalo5758 added this to the Public launch milestone 2026-10-20 23:14:02 +00:00
Author
Owner

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.

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.
cgalo5758 referenced this issue from a commit 2026-10-27 00:03:58 +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#153