Repository navigation
v1.7.0 — retire product offering
Retire product offering (10 files, +329)
Until now there was no way to retire a product offering — setting valid_to to a past date hid it from "active catalog" queries but never changed lifecycle_status, so the cockpit still showed a misleading active badge. Two paths now exist, both policy-gated server-side.
Explicit retire (new command + cockpit button)
bss admin catalog retire-offering --id PLAN_X
POST /admin/catalog/offering/{id}/retire— new endpointCatalogClient.admin_retire_offering()— client method- Cockpit detail page — "Retire…" danger panel (two-step confirm) in the Validity window sidebar, hidden when already retired
- Sets
lifecycle_status="retired"+is_sellable=False, stampsvalid_to=now()when the current window is still open - Idempotency guard: re-retiring an already-retired offering raises
POLICY_VIOLATION(catalog.offering.already_retired)
Auto-transition (your original workflow, now fixed)
Setting valid_to to a past date via window-offering (CLI or cockpit "Set window" form) now also flips lifecycle_status → "retired" + is_sellable → False in the same UPDATE. Future valid_to does NOT auto-retire; clearing valid_to on a retired offering does NOT un-retire.
What is NOT affected
Existing subscriptions are untouched — they charge their price snapshot (v0.7 doctrine). New orders cannot select a retired offering.
Edge cases covered
| Case | Behaviour |
|---|---|
| Retiring already-retired | PolicyViolation |
| Retiring nonexistent | PolicyViolation |
| Future valid_to | No auto-retire |
| Clearing valid_to on retired | Stays retired |
| Existing subscriptions | Unaffected |
🤖 Generated with Claude Code