Repository navigation
Add a staging deployment that cannot touch production's state - #406
Merged
Merged
Conversation
Staging runs on its own host with its own Postgres, Temporal namespace, Clerk instance, GitHub App and Stripe test endpoint. It shares production's code.storage organization, so every repository it touches carries a prefix. - TIN_LITE_CODE_STORAGE_REPO_PREFIX is applied wherever Tin names a repository upstream (lookup, create, delete, sandbox remotes, scoped tokens); stored references keep the unprefixed ID. - TIN_LITE_ENVIRONMENT=staging refuses to boot without a prefix, outside Stripe test mode, or on production's database host or Temporal namespace. - deploy.sh takes TIN_LITE_DEPLOY_TARGET (prod by default, unchanged). Staging keeps its release env on the host and migrates before switching releases. - deploy-staging deploys main and on-demand refs through workload identity scoped to the staging environment and host. - install_staging_postgres.sh sets up stock Postgres like production's; a test stands in for production's pg_strict (no DELETE or UPDATE without WHERE). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ime to boot Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A staging deployment at
https://app.staging.tin.computer, so a change can run end to end the way production runs it before it reachesapp.tin.computer. Seedocs/staging.md.TIN_LITE_CODE_STORAGE_REPO_PREFIX(staging:staging-) applies wherever Tin names a repository upstream: lookup, create, delete, sandbox git remotes and scoped tokens. Stored references keep the unprefixed ID. Staging shares production's organization but writesstaging-registry/workflows,staging-wiki/systemandstaging-projects/<id>.TIN_LITE_ENVIRONMENT=stagingrefuses to start without a prefix, outside Stripe test mode, or on production's database host or Temporal namespace (compared case-insensitively againstTIN_LITE_PRODUCTION_*, set on staging only).infra/deploy.shtakesTIN_LITE_DEPLOY_TARGET(prodby default, behaviour unchanged). Staging keeps its release env on the host (/etc/tin-lite/release.env), so nothing is uploaded from a workstation, and runstin-lite migratefrom the new release before switching.main, and any ref on request, through workload identity. Google trusts only this repo'sstagingenvironment, and the deployer can log in to the staging host only.infra/install_staging_postgres.shinstalls 18.6 on the staging host with production's relevant settings.tests/test_sql_requires_where.pystands in for production'spg_strict(noDELETE/UPDATEwithoutWHERE); the current SQL passes.Verified
TIN_LITE_DEPLOY_TARGET=staging infra/deploy.sh. All 63 migrations applied to the fresh database, the catalog synced, and/healthzreturns 200.staging-registry/workflowsandstaging-wiki/system.test_staging_isolation,test_sql_requires_where,test_secret_fences, code-storage and settings tests.Not verified yet
workflow_dispatchneeds the file onmain, so its first run is the merge of this PR.app.staging.tin.computerDNS record, which isn't live yet.Risk
Production's deploy path is unchanged unless
TIN_LITE_DEPLOY_TARGETis set. Staging's code.storage key is organization-wide, a known trade-off documented indocs/staging.md.🤖 Generated with Claude Code