Summary

The Great Circle is an indie game with a Windows desktop launcher. Supporters and testers earn unlocks through Discord roles, and those unlocks are launcher-verified, with no secrets on the player's PC. The current launcher, through v1.2.0 (Nov 15, 2026), proves the player's Steam identity, checks Steam ownership, links Discord through OAuth, and receives a short-lived Ed25519-signed entitlement. It also ships auto-update and Patreon-tier test-branch codes. The launcher verifies that token. The game-side check is in progress. The opt-in bug-report pipeline and developer gating shipped in v1.2.0.

The problem

  • Unlocks live in Discord roles, but the game runs through Steam. The two accounts need a reliable link.
  • Anything in the client can be extracted, so it may hold only a public key.
  • The game can't depend on a server at launch.
  • One unlock shouldn't spread across many Steam accounts.
  • Logs and crash dumps help with bugs but contain usernames, Steam IDs, and paths.

Architecture

The launcher sends the player's Steam auth ticket to an account service, which validates it with Steam and returns a 24-hour session. After Discord sign-in in the browser, the service records the player's roles and returns an Ed25519-signed entitlement valid for 7 days. The launcher saves it after a launcher-verified check of the signature, the expiry and the Steam ID. The game-side check is in progress. An opt-in, scrubbed bug-report path shipped in v1.2.0: an intake that rate-limits reports, stores them privately for 90 days, and sends a short notice to a private staff channel.

How the flow works

  1. Steam identity. The launcher sends an identity-scoped Steam auth ticket to the account service. The service checks the input format and an allow-list of the game's app IDs, then validates the ticket with Steam. It issues a random session token, stores only its SHA-256 hash, and expires it after 24 hours.
  2. Discord link. The system browser opens Discord OAuth. A one-time state value (10-minute lifetime, consumed atomically) blocks CSRF and replay. OAuth tokens are encrypted at rest with AES-256-GCM, using a random IV per value.
  3. Entitlements. Roles are re-fetched when they're older than 10 minutes. If Discord is down, cached roles are served for up to 24 hours. A config module maps roles to entitlements (supporter tiers, developer, test-branch access), and the highest tier wins.
  4. Signing. The token is base64url(payload).base64url(signature). The payload holds a version, the Steam ID, the entitlements, the issue time and a 7-day expiry. The Ed25519 private key exists only as a server secret.
  5. Launcher verification. The launcher verifies the token against an embedded public key and saves it per user: valid signature, unexpired, and a Steam ID that matches the running user. The game-side check is in progress. The game does not verify the token today.
  6. Developer gating shipped in v1.2.0. It requires the developer entitlement on a token fetched live within the last 15 minutes. A cached token does not unlock the tools.
  7. Test-branch details ship in the current launcher, through v1.2.0. They come from an authenticated, no-store endpoint. They never appear in the token, on disk or in logs, and tests assert that.

One Discord account links to one Steam account, so re-linking moves the unlock and blocks code sharing.

Opt-in bug-report pipeline

Shipped in launcher v1.2.0 (Nov 15, 2026). The pipeline works as follows.

  • Opt-in. The player sees a preview of the files and their size. Nothing leaves the PC until they click Send.
  • Allow-list. The launcher collects the newest game log, the newest crash files, an optional screenshot (max 8 MB) and optional system info. It never collects config files, tokens or the clipboard.
  • Scrubbed on the PC. The Windows username becomes <user> in every path form, and Steam IDs become [steam]. The zip is capped at 25 MB.
  • Validation. The intake accepts multipart POST only and checks the size before parsing. It validates the category, the description length, and the file magic bytes. Webhook URLs are stripped from the text.
  • Rate limits. Each install gets 5 reports per UTC day and each IP gets 20, with HTTP 429 and Retry-After past that. Only a hash of a random install ID is sent. IPs are hashed with a daily-rotating salt, and raw IPs are never stored or logged. Counters sit in KV with a TTL.
  • Private storage, 90-day retention. A lifecycle rule deletes reports after 90 days, and a daily purge backs it up. Partial writes roll back.
  • Neutralised notice. A private staff channel gets the report ID, category, build and the first 200 characters of the description, with all mentions disabled. If the notice fails, the report is kept.

Threat model summary

ThreatMitigationResidual risk (honest)
ThreatForged or edited unlockMitigationThe launcher verifies the Ed25519 signature. Only the public key ships. The game-side check is in progressResidual risk (honest)Someone who patches the launcher can skip its check. The game does not verify the token yet
ThreatToken copied to another PCMitigationToken is bound to the Steam ID and expires in 7 daysResidual risk (honest)Works for up to 7 days on the same Steam account
ThreatCode sharing across accountsMitigationOne Discord account ↔ one Steam account. Re-linking moves the unlockResidual risk (honest)A determined group could rotate a link by hand
ThreatServer database leakMitigationSessions stored hashed. OAuth tokens encrypted with AES-256-GCMResidual risk (honest)Link records (Steam to Discord) would be exposed
ThreatStale roles after a supporter leavesMitigationRoles refreshed every 10 minutes. Tokens last 7 daysResidual risk (honest)Access can outlive a role change by up to 7 days
ThreatBug-report spam (shipped in v1.2.0)MitigationPer-install and per-IP daily limits, size caps, magic-byte checksResidual risk (honest)Many installs or IPs together can still send volume
ThreatPersonal data in reports (shipped in v1.2.0)MitigationOpt-in, allow-list, scrubbing on the PC, no raw IPs, 90-day deletionResidual risk (honest)Scrubbing is tested on fixtures, not yet on a broad set of real game logs
ThreatMalicious content in the launcher UIMitigationSandboxed renderer, context isolation, allow-listed bridgeResidual risk (honest)Depends on keeping Electron current

How it's tested

Launcher CI is green on Ubuntu and Windows. The account service is tested locally. The bug-report and developer-gating suites cover code that shipped in launcher v1.2.0. The 37 account-service tests below are not part of the 105 total.

SuiteWhat it coversCountLast run
SuiteLauncher unit testsWhat it coversReport collection, scrubbing, developer gatingCount32Last runOct 26, Linux: all pass*
SuiteSelf-test scriptWhat it coversLauncher integration self-checksCount53 checksLast runOct 26, Linux: all pass
SuiteBug-report Worker (vitest, in-memory mocks)What it coversValidation, storage, rate limits, notice, retentionCount20Last runOct 26, Linux: all pass
SuiteTotal automatedCount105
SuiteElectron smoke testWhat it coversBoots the real app and checks the sandboxed bridge and pageCount1Last runPass on Linux (virtual display)
SuiteAccount service tests (mocked Discord and database)What it coversTiers, role refresh, no secrets in tokens or logsCount37Last runOct 26, local: all pass
SuiteSteam smoke testWhat it coversReal Steam client sign-inCountManualLast runWindows only, run by hand

*One test asserts a POSIX file permission and fails on Windows. That's a bug in the test, not the product, and it's being fixed. I also checked the full flow end to end on a test machine with Steam and Discord.

Lessons learned

  • Signed tokens beat shared secrets. With only a public key in the client, there's nothing worth stealing, and the token is launcher-verified. The game-side check is in progress.
  • Make freshness explicit. Separate lifetimes for sessions, roles, tokens and developer access made each trade-off visible and testable. Developer gating shipped in v1.2.0.
  • Test what must never happen. The most valuable tests assert that passwords never reach tokens or logs.
  • Fail open where it's harmless. In the bug-report pipeline that shipped in v1.2.0, a bad developer tag or a failed notice never loses a report.
  • Cross-platform tests catch test bugs. Launcher CI is green on Ubuntu and Windows.

What's next

  • Uploading a player's game summary, the consent screen for that upload, and deleting uploaded data are not in v1.2.0.
  • Finish the game-side offline check of signature, expiry, and Steam ID.
  • Add an Electron end-to-end smoke test.
  • Fix the POSIX-only test on Windows.
  • Exercise log scrubbing against more real-world game logs.
  • Code-sign the installer to remove the SmartScreen warning.

How this was built

I designed, directed, reviewed and tested this system. AI coding agents wrote most of the code from my specs, in pull requests I reviewed and merged. I set the requirements, chose the architecture and trade-offs, ran the tests, and verified the end-to-end flow on Windows with Steam and Discord. Anything unfinished is listed above.

  • The account service is a private repository and is described here only.