Files
member-console/internal/testkit
cgalo5758 8fdecf0e0e Stop tiering products with no entitlement set in tests, and leave them out of the tier picker
First section of the change that makes a product with no entitlement set
unable to be a plan tier (#153). The change's proposal, design, tasks and
spec deltas come in with it.

Fixtures: seven tests that made a product with no set a ladder tier give
it one (productWithSet in internal/db, mkTierProduct in internal/server,
tierProduct in the merchant-disclosure sheet). The sheet is a capture
make test does not run; its edit was checked by reading and go vet. The
test kit's WithoutSet comment says that from migration 00035 on a tier's
set cannot be cleared.

The failure the plan-act goldens inject moves from a product with no set
to a product made draft after it is laddered, which core.confer refuses
at the same statement and step. Four goldens under
internal/server/testdata/plan_acts change only there: the product reads
Drafted instead of NoSet, and the driver text reads "is draft and not
conferrable". TestResumption_ARefusedConferralIsRolledBackAlone drafts
Plus the same way.

The tier picker: tierCandidates keeps a product that is published, has
an entitlement set and is not on the ladder, in the order given;
availableTierProducts calls it. The Add tier panel's empty state keeps
its first sentence and says "A tier needs a published product with an
entitlement set that is not on this ladder yet." A posted product the
list left out is refused with "Choose a product from the list."

make screens: operator-plan-ladder-detail's open and invalid captures
change at both widths. The demo's three products on no ladder have no
set, so the demo ladder has nothing to add and the open panel shows the
empty state. The other changed screens are the known data-only
differences and the host's time zone (#274).

Read-only counts on the test stack's app database before any reset:
no default ladder starts on a product with no set, no plan act waits for
one, and the two tiers with no set sat on a ladder the browser
walkthroughs had left behind.

Breaks (scripts/mutation-check, 11 of 11 CAUGHT):
- default-initiate-fails without its draft
- default-migrate-restore-fails without its draft
- remove-second-pool-fails without its draft
- reorder-an-organization-fails without its draft
- the draft removed from the refused conferral test
- the tier filter without the set
- the tier candidates in reverse order
- the empty state's old second sentence restored
- the tier add accepts a product the list left out
- the tier filter without the lifecycle
- the tier filter keeps a product on the ladder

The seven fixture edits and the WithoutSet comment carry no break: they
remove a state section 2's triggers forbid, and section 2's run is their
test.

make lint passes; openspec validate --strict passes; the suite on reset
databases passes, 4694 tests, 15 skipped.
2026-10-26 16:08:09 -05:00
..