Skip to main content
← Back to list
01Issue
FeatureOpenSwamp ClubPublic
AssigneesNone

Relationships

#3103 seed:collective cannot produce a superseded personal trial or a returned trial, so the UAT cannot cover them

Opened by skunk-ape · 10/6/2026

Problem

PR 1278 (f26384f9) made a team's plan or trial supersede a member's personal trial, and gave existing accounts a returned trial on their first sign-in or CLI use. The user acceptance tests in swamp-uat drive swamp-club through scripts/seed-collective.ts and the CLI, and neither state is reachable that way:

  • The seed writes members and the subscription straight into Mongo. No join path runs (invite accept, SSO join, team creation) and the Stripe webhook's onAccessGranted never fires, so no seeded member ever has trialSupersededAt/By/Reason set. The CLI has no collective-create or invite-accept command to drive a join either.
  • Every seeded operative, including swampadmin, signs up through auth.api.signUpEmail, which runs the user-create hook and opens a signed_up trial. There is no way to seed an account whose personal collective has no trial, which is the precondition for a returned trial.

swamp-uat #551 tracks the coverage; both scenarios are deferred on this.

Proposed solution

Two options on seed:collective:

  1. A way to add a member through the real join path, or to run the paying-team supersession for the members already seeded (the same superseding step the webhook and admin comp call). For example --member-joins <username> or --supersede-members, applied after --plan/--status so a paying team supersedes, and after --trial-elapsed-days so a team trial does.
  2. A flag that creates an operative with no signup trial, for example --owner-without-trial or --no-signup-trial, so the first swamp auth login opens a returned trial that swamp auth whoami can observe.

Both should print what they did in the seed-collective-result: line (for example the member's trialSupersededAt and reason), so the UAT can assert against the server's own timestamps.

Alternatives

Driving invite acceptance through the Club Playwright stack and then reading whoami through the CLI against the same stack. That couples the CLI suite to the browser suite and a second Docker stack, which the UAT layout avoids.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/6/2026, 8:17:02 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.