Bug: a product trial started from the catalogue ran its own 14 days from that moment, whatever the workspace's trial was. A workspace whose trial staff had set to 29.10 lost Prüfwerk on 15.10. Prüfwerk then refused its managed-Git automation with entitlement_expired: new repositories weren't onboarded and pushes weren't handled. The workspace trial itself and the admin page looked fine apart from the 15.10 expiry on the entitlement.
Fix
POST /v1/catalog/trial-request: in a workspace on trial, the product trial ends when the workspace's trial ends. In a paying workspace it keeps the product's own trial days.
Migration 0019 repairs existing rows on deploy. It touches product trials (config.source = trial, no preview) of workspaces still on trial whose end lies before the workspace trial end: each gets the workspace trial's end, is enabled again, and gets an entitlement.trial_aligned audit entry (actor "migration 0019", system). Booked products, preview grants, trials that end later and paying workspaces are left alone. The down migration does nothing.
Tests:TestProductTrialEnd (cases), TestProductTrialEndsWithTheWorkspaceTrial (the endpoint), and TestMigrate_0019AlignsTrialEntitlements (Postgres: one row aligned and audited, three left alone). Run locally with the existing round-trip test.
Effect on prod after promotion: the affected workspace's Prüfwerk entitlement runs to its trial end again. Within 30 minutes Prüfwerk's managed-Git sync creates the repositories it missed.
**Bug:** a product trial started from the catalogue ran its own 14 days from that moment, whatever the workspace's trial was. A workspace whose trial staff had set to 29.10 lost Prüfwerk on 15.10. Prüfwerk then refused its managed-Git automation with `entitlement_expired`: new repositories weren't onboarded and pushes weren't handled. The workspace trial itself and the admin page looked fine apart from the 15.10 expiry on the entitlement.
**Fix**
- `POST /v1/catalog/trial-request`: in a workspace on trial, the product trial ends when the workspace's trial ends. In a paying workspace it keeps the product's own trial days.
- **Migration 0019** repairs existing rows on deploy. It touches product trials (`config.source = trial`, no preview) of workspaces still on trial whose end lies before the workspace trial end: each gets the workspace trial's end, is enabled again, and gets an `entitlement.trial_aligned` audit entry (actor "migration 0019", system). Booked products, preview grants, trials that end later and paying workspaces are left alone. The down migration does nothing.
**Tests:** `TestProductTrialEnd` (cases), `TestProductTrialEndsWithTheWorkspaceTrial` (the endpoint), and `TestMigrate_0019AlignsTrialEntitlements` (Postgres: one row aligned and audited, three left alone). Run locally with the existing round-trip test.
**Effect on prod after promotion:** the affected workspace's Prüfwerk entitlement runs to its trial end again. Within 30 minutes Prüfwerk's managed-Git sync creates the repositories it missed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
A product trial started from the catalogue ran its own 14 days from that
moment. In a workspace whose trial staff had set to a later day, the product
stopped before the trial did: Prüfwerk refused the managed-Git automation of
a workspace on trial until 29.10 with entitlement_expired on 15.10.
- trial-request: in a workspace on trial, the product trial ends when the
workspace trial ends; otherwise (a paying workspace) it keeps its own days.
- Migration 0019 aligns the existing product trials of workspaces still on
trial that end before their trial (re-enabled), with an audit entry each
(entitlement.trial_aligned). Booked products, preview grants and trials
that end later are left alone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang
merged commit 3f4dfa0cdc into main2026-10-15 16:28:02 +00:00
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.
Bug: a product trial started from the catalogue ran its own 14 days from that moment, whatever the workspace's trial was. A workspace whose trial staff had set to 29.10 lost Prüfwerk on 15.10. Prüfwerk then refused its managed-Git automation with
entitlement_expired: new repositories weren't onboarded and pushes weren't handled. The workspace trial itself and the admin page looked fine apart from the 15.10 expiry on the entitlement.Fix
POST /v1/catalog/trial-request: in a workspace on trial, the product trial ends when the workspace's trial ends. In a paying workspace it keeps the product's own trial days.config.source = trial, no preview) of workspaces still on trial whose end lies before the workspace trial end: each gets the workspace trial's end, is enabled again, and gets anentitlement.trial_alignedaudit entry (actor "migration 0019", system). Booked products, preview grants, trials that end later and paying workspaces are left alone. The down migration does nothing.Tests:
TestProductTrialEnd(cases),TestProductTrialEndsWithTheWorkspaceTrial(the endpoint), andTestMigrate_0019AlignsTrialEntitlements(Postgres: one row aligned and audited, three left alone). Run locally with the existing round-trip test.Effect on prod after promotion: the affected workspace's Prüfwerk entitlement runs to its trial end again. Within 30 minutes Prüfwerk's managed-Git sync creates the repositories it missed.
🤖 Generated with Claude Code