fix(release): ff-only sync local branches to origin before push (unblocks deploys) #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/3-release-ff-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #3. Crown-jewel engine change — reviewed PR only; human merges + operates the control-plane rollout (P-ROLLOUT). Do not auto-deploy.
The bug
release()pushed the engine clone`s local source branch without syncing to origin first:Branch merges land via forge PRs, never in the engine
s/root/apps/clone, so that clones localmainis routinely behindorigin/main. The push is rejected non-fast-forward andrelease()500s atpush_source— blocking every deploy. This stalled muralla ~36 commits. (The handoff misdiagnosed it as aknown_hostsperms issue; the real cause is the stale local ref.)The fix (+11 lines, no behavior change on the happy path)
Add
git merge --ff-only <remote>/<branch>after fetch, on both the source- and deploy-branch paths:node --checkclean. Follows the existingrun()idiom exactly.Base =
production(deliberate)Targets the deployed/hardened ref (
ed47680) becausemainis security-regressed pending the P2 reconcile (#1). Once P2 lands (production -> main), this comes along / rebases onto main. Landing it on production is what actually unblocks the running engine.Verified out-of-band
The equivalent one-liner (
git -C /root/apps/muralla merge --ff-only origin/main) applied by hand on sol-prod on 2026-07-10 unblockedrelease(); the muralla deploy then ran end-to-end (build/deploy/migrate/health all green, container swapped).Adversarial review (Fable) — verdict SAFE-TO-MERGE. Two follow-ups captured:
.okguard — applied in this PR (commit above): a silent checkout failure beforemerge --ff-only(which acts on HEAD) could ff the wrong branch. Now asserted.main(operator sequencing, non-negotiable): this PR targetsproductionas a bootstrap becauserelease()is broken until it deploys (chicken-and-egg). Recommended sequence:mainbecomes ==production(ed47680)main, merge →maingains the ff-only fixmain(P-ROLLOUT) — release() cannot self-deploy the fix that unblocks release()release-appflow works againOtherwise
mainwould ship without the ff-only fix and re-open the exact main↔production drift #5 just cured.Pre-existing, out of scope (later PRs):
release()runs without the per-app lock (concurrent releases interleave git ops); brand-new-branch source push edge case.