From ed9935325daab91760af4e1d1b3fcc2dc672a863 Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Thu, 14 May 2026 05:03:04 -0600 Subject: [PATCH] =?UTF-8?q?chore:=20retire=20`staging`=20branch,=20documen?= =?UTF-8?q?t=20develop=20=E2=86=92=20master=20flow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `staging` branch has been vestigial for some time: `auto-sync-master-with-develop.yml` already promotes develop to master on every `[RELEASE]`-tagged commit, so the develop โ†’ staging โ†’ master hop only added merge artifacts (see recent history: a725b00ad, cff4de8c5, 81bac419c, c46c77a55 โ€” all post-merge cleanups). The latest production incident (cloud.tangle.tools forwardRef crash) was triggered by exactly this kind of staging-merge rebuild surfacing a latent chunk-cycle bug. Changes: - `.github/workflows/{check-lint,test,check-build,codeql-analysis}.yml`: drop `staging` from the branch trigger lists. - `apps/{tangle-cloud,tangle-dapp,leaderboard}/netlify.toml`: update comments to reflect the new flow and the develop-as-staging deploy environment. The build ignore rule is unchanged โ€” non-master branches already build, so develop branch deploys have always worked. - `CLAUDE.md`: rewrite the Branch Strategy section to document the two-branch model, the `[RELEASE]` auto-sync convention, and the staging-deploy URL pattern. Out-of-band follow-up (will happen as separate ops PRs / API calls): - Delete the `staging` branch on origin once this lands. - Drop `staging` from GitHub branch protection rules. - (Optional) Add Netlify domain aliases for staging.*.tangle.tools so the staging URLs are stable across deploys. --- .github/workflows/check-build.yml | 4 ++-- .github/workflows/check-lint.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/test.yml | 4 ++-- CLAUDE.md | 9 ++++++--- apps/leaderboard/netlify.toml | 7 ++++++- apps/tangle-cloud/netlify.toml | 10 ++++++++-- apps/tangle-dapp/netlify.toml | 7 ++++++- 8 files changed, 32 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index 356c8bbf6a..831cb86fd7 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -2,9 +2,9 @@ name: 'Build ๐Ÿ—๏ธ' on: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] push: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] workflow_dispatch: diff --git a/.github/workflows/check-lint.yml b/.github/workflows/check-lint.yml index 05034f9b48..270f9ddba1 100644 --- a/.github/workflows/check-lint.yml +++ b/.github/workflows/check-lint.yml @@ -2,7 +2,7 @@ name: 'Clean ๐Ÿงน' on: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] workflow_dispatch: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index a305f3e084..ad722223b2 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,7 @@ name: 'Scan ๐Ÿ”Ž' on: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] schedule: # โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ minute (0 - 59) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7628a74e68..96b9d64b75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,10 +4,10 @@ on: workflow_dispatch: pull_request: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] push: - branches: [develop, staging, master, feature/**] + branches: [develop, master, feature/**] jobs: build_code: diff --git a/CLAUDE.md b/CLAUDE.md index 799b1ea746..b5073a89f3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -135,9 +135,12 @@ yarn generate:release # Review version bumps and changelog ### Branch Strategy -- Main development branch: `develop` -- Main branch for releases: `master` -- Release PRs should start with `[RELEASE]` in title +Two-branch model (the previous `staging` branch was retired May 2026): + +- **`develop`** โ€” main development branch. All feature, fix, and chore PRs target it. Every push to `develop` deploys to the staging Netlify environment (`develop--tangle-{cloud,dapp,leaderboard}.netlify.app`, aliased at `staging.{cloud,app,leaderboard}.tangle.tools` when configured). +- **`master`** โ€” production. Promotions happen automatically via the `auto-sync-master-with-develop.yml` workflow: a push to `develop` whose head commit message starts with `[RELEASE]` fast-forwards `master` to that commit and fires the production Netlify deploy. No manual cherry-pick, no separate release branch. +- **Release PR titles must start with `[RELEASE]`** so the auto-sync workflow promotes the merge commit to master. +- Hotfixes follow the same flow: PR into `develop` with a `[RELEASE]`-tagged final commit (e.g. via `gh pr merge --squash --subject "[RELEASE] fix: โ€ฆ"`). ### Prerequisites diff --git a/apps/leaderboard/netlify.toml b/apps/leaderboard/netlify.toml index 6bc75bb3c4..ba1de17e07 100644 --- a/apps/leaderboard/netlify.toml +++ b/apps/leaderboard/netlify.toml @@ -10,5 +10,10 @@ # covered (it's inside apps/leaderboard/), and any source/config/ # lockfile change also re-triggers. # - # Non-master branches always build (gives PR-preview deploys). + # Non-master branches always build (gives PR-preview + develop-branch + # deploys). The `develop` branch deploy is our staging environment โ€” + # surfaced at develop--tangle-leaderboard.netlify.app and, when DNS + # aliases are configured, at staging.leaderboard.tangle.tools. The + # legacy `staging` git branch has been retired (May 2026); promotions + # go develop โ†’ master via the `[RELEASE]`-tagged auto-sync workflow. ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/leaderboard/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1" diff --git a/apps/tangle-cloud/netlify.toml b/apps/tangle-cloud/netlify.toml index abbc4ab6d1..b2cdbefc57 100644 --- a/apps/tangle-cloud/netlify.toml +++ b/apps/tangle-cloud/netlify.toml @@ -10,7 +10,12 @@ # implicitly covered (it's inside apps/tangle-cloud/), and any source/ # config/lockfile change also re-triggers. # - # Non-master branches always build (gives PR-preview deploys). + # Non-master branches always build (gives PR-preview + develop-branch + # deploys). The `develop` branch deploy is our staging environment โ€” + # surfaced at develop--tangle-cloud.netlify.app and, when DNS aliases + # are configured, at staging.cloud.tangle.tools. The legacy `staging` + # git branch has been retired (May 2026); promotions go develop โ†’ master + # via the `[RELEASE]`-tagged auto-sync workflow. ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-cloud/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1" # โ”€โ”€โ”€ Per-context environment โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ @@ -36,7 +41,8 @@ VITE_BLUEPRINT_IFRAME_ENABLED = "true" [context.branch-deploy.environment] - # Same default for any non-master branch deploy (e.g. staging). + # Same default for any non-master branch deploy. The primary branch + # deploy is `develop`, which serves as our staging environment. VITE_BLUEPRINT_IFRAME_ENABLED = "true" # โ”€โ”€โ”€ Security headers โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ diff --git a/apps/tangle-dapp/netlify.toml b/apps/tangle-dapp/netlify.toml index 46201c0f6c..adfda4a806 100644 --- a/apps/tangle-dapp/netlify.toml +++ b/apps/tangle-dapp/netlify.toml @@ -10,7 +10,12 @@ # implicitly covered (it's inside apps/tangle-dapp/), and any source/ # config/lockfile change also re-triggers. # - # Non-master branches always build (gives PR-preview deploys). + # Non-master branches always build (gives PR-preview + develop-branch + # deploys). The `develop` branch deploy is our staging environment โ€” + # surfaced at develop--tangle-dapp.netlify.app and, when DNS aliases + # are configured, at staging.app.tangle.tools. The legacy `staging` git + # branch has been retired (May 2026); promotions go develop โ†’ master + # via the `[RELEASE]`-tagged auto-sync workflow. ignore = "[ \"$BRANCH\" != \"master\" ] && exit 1 || git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- apps/tangle-dapp/ libs/ package.json yarn.lock tsconfig.base.json nx.json && exit 0 || exit 1" # โ”€โ”€โ”€ Cache headers โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€