Skip to content

Synthetic accounts

System-owned accounts seeded at boot: the login probe that monitors production, and the review account that Google Play and App Store reviewers sign in with. Both are account_type = synthetic with role base, so they share one set of exclusions.

Mental model

Secret Manager ──ExternalSecret──▶ *_PASSWORD env ──▶ backend pod
                                                        │ boot
                                                        ▼
                  migrate.RunManual ──▶ SeedSyntheticAccounts (idempotent)
                                          ├─ probe: one account
                                          └─ review: account + companions + sample content

SeedSyntheticAccounts (backend/internal/migrate/synthetic_accounts.go) walks a small table of account specs through one shared upsert path. Sample content for the review spec is a per-spec hook in synthetic_accounts_content.go. Both accounts sign in with email and password through the normal login endpoint; no emailed code is involved, and both mount the member (tomoda) shell.

Accounts and secrets

Account Env vars (email, password, name) Default email Secret Manager key Used by
Probe SYNTHETIC_PROBE_EMAIL, SYNTHETIC_PROBE_PASSWORD, SYNTHETIC_PROBE_NAME synthetic+probe@tomoda.life tomoda-synthetic-probe-password Synthetic Worker and post-deploy smoke test (prod)
Review REVIEW_ACCOUNT_EMAIL, REVIEW_ACCOUNT_PASSWORD review@tomoda.life tomoda-review-account-password (one secret for dev and prod) App-store reviewers

An empty password env skips that account. Passwords are never logged.

Reruns and admin actions

State on boot Result
No account Created with an adult date of birth
Password differs from the secret Hash replaced and token_version bumped, which signs out existing sessions
Deactivated Reactivated
Suspended Left suspended (logged); the password still follows the secret
Deleted Left deleted (logged); restore the row or pick a new email
Email belongs to a non-synthetic account Nothing is touched (logged as an error)

The review account can use in-app account deletion like any member, as the stores require. The deactivated-account purge skips synthetic accounts.

Review account content

Item Detail
Profile Handle, profile row, Terms accepted and Privacy acknowledged at the versions in force
Companions Two synthetic accounts with random passwords nobody holds, so they cannot sign in
Friendships Review account with both companions, and the companions with each other
Plan One friends-only plan with three place cards and one collaborator
Event One friends-only upcoming event with its chat, both companions approved
Chat One direct chat with the first companion: five messages, one of them a GIF message

Content ids derive from the review account's id, so reruns find the same rows. The plan, its place cards and the event move forward whenever they come within three days of now. Events and plans are friends-only, so they never surface in members' feeds.

Exclusions

Keyed on account_type = synthetic:

Surface Behavior
People search and friend suggestions Members never see synthetic accounts. A synthetic account searching sees only synthetic accounts (the review companions and the probe), never real members. Its friend search finds its friends.
Near-you candidates Excluded
Activity firehose and the affinity rollup POST /activity/events accepts and drops events from synthetic accounts, so no signal reaches ranking or training
System stats, signup and method counts, daily series, daily active sessions Excluded in backstagedb queries
Population and active gauges, by-country gauges Excluded in userdb queries
Policy-change notice emails Excluded
Deactivated-account purge Excluded

The admin user list still shows these accounts so they can be suspended.

Rotate

  1. Add a new version to the account's secret in Secret Manager.
  2. Wait for the ExternalSecret refresh (up to an hour) or force it, then restart tomoda-api in the target namespace. Boot reseeds the hash.
  3. Re-run the probe consumers (the synthetic Worker applies from the secret) and update the store sign-in details if they carry the value.

Store forms: Play Store and App Store.