Versioned bridge branches carry targeted fixes from origin/main into staging for pre-UAT / staging deployment—without merging feature work through main first.
First use: v1.0.2 on [[Projects/anabatic-claim/anabatic-claim|Claim]] backend (backend-claim-dev) — approver list scope fix (exclude finance steps from approver/list).
APP_VERSION)Bridge branch name = APP_VERSION in config/staging.env (same string, including the v prefix, e.g. v1.0.2).
APP_VERSION from config/staging.env before git checkout -b ….config/staging.env and config/development.env both set APP_VERSION='v1.0.2' — they must stay identical across dev and staging config.APP_VERSION; do not leave env version behind after a bridge is promoted.ready-prod — bump env and create next bridgeWhen the current bridge has been pushed / merged to ready-prod, do all of the following in one pass (do not bump env without creating the matching branch):
v1.0.2 → v1.0.3).APP_VERSION to that value in both files (keep them identical):| File | Repo example |
|---|---|
config/staging.env | backend-claim-dev |
config/development.env | same repo |
origin/main using that exact name.git fetch origin main
git checkout -b v1.0.3 origin/main # branch name = new APP_VERSION
# Edit config/staging.env and config/development.env → APP_VERSION='v1.0.3'
git add config/staging.env config/development.env
git commit -m "chore: bump APP_VERSION to v1.0.3 and open staging bridge"
git push -u origin v1.0.3
The next fixes ship on v1.0.3; merge that branch → staging when ready (see §3 below). Do not commit the version bump only on staging or main without creating origin/v1.0.3.
| Branch / remote | Role |
|---|---|
main / origin/main | Production line — read-only for this workflow (source snapshot only). |
vX.Y.Z (e.g. v1.0.2) | Bridge — name matches APP_VERSION; created from origin/main, pushed to origin/vX.Y.Z. |
staging / origin/staging | Integration target — merge bridge here when clean; deploy staging from this branch. |
ready-prod | Promotion line — when the active bridge is merged/pushed here, bump APP_VERSION + create the next bridge branch (same step; see above). |
Environment progression (see [[Areas/Anabatic/Tech stack|Tech stack]]): dev → staging → UAT → production.
A — Previous bridge already on ready-prod
Use the After bridge lands on ready-prod section above (bump + git checkout -b + commit env on the new branch + push). Skip to §2 on that branch.
B — Bridge for this version already exists (e.g. v1.0.2 in env and on remote)
APP_VERSION in config/staging.env matches config/development.env.git fetch origin
git checkout v1.0.2 # must match APP_VERSION
git pull origin v1.0.2
C — First bridge for a repo / greenfield
Set APP_VERSION in both env files, then create the branch from origin/main with the same name and commit the env files on that branch (same commands as section After bridge lands on ready-prod).
v1.0.2 only.docs/ submodule pointer if the repo uses one).git add <paths>
git commit -m "fix(scope): short description"
git push -u origin v1.0.2
git fetch origin staging
git checkout staging
git pull origin staging
git merge v1.0.2 -m "Merge branch 'v1.0.2' into staging"
staging.git push origin staging
approver/list?tab=history vs finance-approver/list).Do not touch production git surfaces unless explicitly requested—and then only after a deliberate warning.
| Never (default) | Why |
|---|---|
Push to main or origin/main | Production line; out of scope for staging bridges. |
Merge bridge → main as part of this workflow | Staging validates first; prod promotion is a separate, explicit process. |
| Use prod remote | Not part of staging bridge work. |
| Create merge requests (GitLab MR) | Team does not use agent-created MRs; push branches and merge locally / per team habit. |
If a task appears to require main, origin/main, or prod:
backend-claim-dev mounts docs/ as submodule (documentation-claim). When docs change:
docs/ on its repo (main or agreed docs branch).staging.| Step | Result |
|---|---|
APP_VERSION='v1.0.2' in staging.env + development.env | Branch name source |
v1.0.2 from origin/main | Bridge branch created |
Commit 48ed6f3 | fix(approver): exclude finance steps from business approver list |
Docs submodule de8ae7d | Approver vs finance-approver list documented |
Merge → staging, push | origin/staging at merge commit a45c6c4 |
(pending) Push bridge → ready-prod | Then bump APP_VERSION in both env files and create + push next bridge (e.g. v1.0.3) in one step |