Lets BreakPilot staff open a product that is still disabled in the
catalogue (Werkmeister) for one tenant for a limited time, e.g. a seeded
staging tenant for portal#86, without a stage/prod divergence:
- Migration 0018: tenant_products.preview and preview_expires_at, kept
apart from a booking's expires_at.
- Entitlement check: a disabled product is allowed only under an active
preview (answer carries "preview": true); expiry is enforced at check
time (reason preview_expired). A leftover plain row of a product off
sale stays unknown_product.
- A real booking (ERP, trial, catalogue upsert) clears the preview and
its expiry, so it never cuts off a paid entitlement; a preview over a
booking is refused (409).
- Usage under a preview is accepted, tagged properties.preview=true and
kept out of the ERP outbox; claims list a preview product only while
it is active.
- Staff only, audited: POST /v1/admin/tenants/{id}/preview-grants
{product, expires_at ≤ 180 d}, DELETE …/preview-grants/{product}; a
named staff member (X-Staff-Subject) is required.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
85 KiB
85 KiB