Skip to content

chore(make): deploy branch-guard becomes a warning (freshness check kept)#837

Merged
jonathaneoliver merged 1 commit into
devfrom
chore/deploy-any-branch
Jun 23, 2026
Merged

chore(make): deploy branch-guard becomes a warning (freshness check kept)#837
jonathaneoliver merged 1 commit into
devfrom
chore/deploy-any-branch

Conversation

@jonathaneoliver

Copy link
Copy Markdown
Owner

What

make deploy (and deploy-frontend / analytics-rebuild-forwarder) no longer block when you're not on dev. The branch check becomes a loud, non-blocking warning showing which branch's working tree is being deployed; the command then proceeds.

Why

These targets rsync the local working tree to test-dev (:21000), so deploying a feature branch to your iteration box is legitimate and common. The 2026-06-08 incident that motivated the guard was about a stale-branch deploy reverting test-dev silently — the fix is to surface it loudly, not to forbid it.

Kept intact

The freshness check is unchanged: _ff-guard still git fetches origin, auto-fast-forwards a clean branch that's behind its upstream, and aborts only when the tree is behind-and-diverged or dirty-and-behind. ALLOW_BRANCH_DEPLOY=1 still silences the warning entirely.

- exit 1 on wrong branch
+ ⚠ warn which branch is shipping, then continue

Verified the guard returns exit 0 on a feature branch and the Makefile parses.

🤖 Generated with Claude Code

`make deploy` / `deploy-frontend` / `analytics-rebuild-forwarder` rsync
the local working tree to test-dev, so deploying from a feature branch
is a legitimate, common thing to want. The 2026-06-08 incident's harm
was that a stale-branch deploy reverted test-dev *silently* — so the fix
is to be loud, not to block: print exactly which branch's working tree
is being shipped, then proceed.

The freshness half of _ff-guard is unchanged — it still fetches origin,
auto-fast-forwards when clean, and aborts on a behind-and-diverged tree.
ALLOW_BRANCH_DEPLOY=1 still silences the warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the chore label Jun 23, 2026
@jonathaneoliver jonathaneoliver merged commit f9c6be1 into dev Jun 23, 2026
1 check passed
@jonathaneoliver jonathaneoliver deleted the chore/deploy-any-branch branch June 23, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant