Phase 14, part 4: what happens when it lapses

An hourly platform job: a trial over without a subscription goes to Free;
past due, the owner is told and every page has a banner; at 14 days
read-only; at 53 days everyone is warned; at 60 days the team is deleted
with 30 days to undo. Each email once. Undoing a deletion for not paying
gives a week more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 13:27:03 -07:00
co-authored by Claude Opus 5.5
parent acdb44fcc9
commit aa0408fb14
8 changed files with 257 additions and 1 deletions
+3
View File
@@ -479,6 +479,9 @@ func (s *Server) RunTeams(ctx context.Context) {
tick := time.NewTicker(time.Hour)
defer tick.Stop()
for {
if _, err := s.jobs().Do(ctx, "platform:billing", func(ctx context.Context) { s.billingTurn(ctx, time.Now()) }); err != nil {
s.Log.Warn("billing: taking the lock", "err", err)
}
if _, err := s.jobs().Do(ctx, "platform:purge", func(ctx context.Context) { s.purgeTeams(ctx, time.Now()) }); err != nil {
s.Log.Warn("teams: taking the lock", "err", err)
}