trial_ends_at = NOW() + 14 days for customer-kind tenants (default).
status = 'demo', trial_ends_at = NULL for demo-kind tenants.
Both Memory and Postgres stores updated; eachStore harness asserts the
window for customer kind and the absence for demo.
Why
Unblocks the M12.1 portal trial banner — it needs a real countdown date.
Currently every signup landed in status='trial' with NULL trial_ends_at, so
the banner couldn't compute time-left.
Risk
Existing trial tenants in dev DBs are unaffected (they keep their NULL
trial_ends_at unless re-created). M12.2's lifecycle cron is the right
place to backfill if it ever matters; for dev it doesn't.
Refs: M4.1 follow-up + M12.1 prep
## What
`CreateTenant` now sets:
- `trial_ends_at = NOW() + 14 days` for customer-kind tenants (default).
- `status = 'demo'`, `trial_ends_at = NULL` for demo-kind tenants.
Both Memory and Postgres stores updated; eachStore harness asserts the
window for customer kind and the absence for demo.
## Why
Unblocks the M12.1 portal trial banner — it needs a real countdown date.
Currently every signup landed in status='trial' with NULL trial_ends_at, so
the banner couldn't compute time-left.
## Risk
Existing trial tenants in dev DBs are unaffected (they keep their NULL
trial_ends_at unless re-created). M12.2's lifecycle cron is the right
place to backfill if it ever matters; for dev it doesn't.
Refs: M4.1 follow-up + M12.1 prep
CreateTenant now defaults trial_ends_at to NOW() + 14 days when the
new tenant lands in status='trial'. Demo-kind tenants get
status='demo' (per PLATFORM_ARCHITECTURE.md §5d) and trial_ends_at
stays NULL — those flow through the M13.2 demo-provisioning path.
Both store implementations (Memory + Postgres) updated; tests assert
the 14-day window for customers and the absent end for demo kind.
Unblocks M12.1 (portal trial banner can render a real countdown).
Refs: M4.1 + M12.1
CODEOWNERS rules
requested review from Benjamin_Boenisch 2026-05-19 16:18:26 +00:00
sharang
merged commit 8fa1a1bffd into main2026-05-19 16:27:09 +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.
What
CreateTenantnow sets:trial_ends_at = NOW() + 14 daysfor customer-kind tenants (default).status = 'demo',trial_ends_at = NULLfor demo-kind tenants.Both Memory and Postgres stores updated; eachStore harness asserts the
window for customer kind and the absence for demo.
Why
Unblocks the M12.1 portal trial banner — it needs a real countdown date.
Currently every signup landed in status='trial' with NULL trial_ends_at, so
the banner couldn't compute time-left.
Risk
Existing trial tenants in dev DBs are unaffected (they keep their NULL
trial_ends_at unless re-created). M12.2's lifecycle cron is the right
place to backfill if it ever matters; for dev it doesn't.
Refs: M4.1 follow-up + M12.1 prep