fix(git): pre-push rejects merging main into feature branches after #1282 Co-authored-by #1287

Merged
PlasticDigits merged 2 commits from issue/1286 into main 2026-09-21 05:18:33 +00:00

Fixes #1287
Fixes #1286

Summary

pre-push scanned every commit in the push range, including commits already on origin/main. After #1282, ad2d2493 on main carries a Co-authored-by trailer; merging origin/main into a PR branch then pushing re-scanned that commit and blocked the push.

Skip policy validation for commits already reachable from origin/main (via the push remote’s main). New branch-only violations still fail.

Acceptance criteria

  • git merge origin/main on a feature branch plus git push succeeds when the only policy-violating commit is already on origin/main.
  • New commits with email / Co-authored-by trailers still fail.

Validation

  • make verify-issue-1287 (alias for make test-commit-msg-hook, includes scripts/test-pre-push-commit-policy.sh)

Gaps

  • None for scoped fix; verify-commit-messages.sh still scans explicit ranges and is unchanged (not used for push-range semantics).
Fixes #1287 Fixes #1286 ## Summary `pre-push` scanned every commit in the push range, including commits already on `origin/main`. After #1282, `ad2d2493` on main carries a `Co-authored-by` trailer; merging `origin/main` into a PR branch then pushing re-scanned that commit and blocked the push. Skip policy validation for commits already reachable from `origin/main` (via the push remote’s `main`). New branch-only violations still fail. ## Acceptance criteria - [x] `git merge origin/main` on a feature branch plus `git push` succeeds when the only policy-violating commit is already on `origin/main`. - [x] New commits with email / Co-authored-by trailers still fail. ## Validation - `make verify-issue-1287` (alias for `make test-commit-msg-hook`, includes `scripts/test-pre-push-commit-policy.sh`) ## Gaps - None for scoped fix; `verify-commit-messages.sh` still scans explicit ranges and is unchanged (not used for push-range semantics).
fix(git): skip pre-push policy check for commits on origin/main
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
11527a6c71
Merging main into a feature branch re-scans historical main commits in the
push range; ignore bodies already on the integration branch (#1286).
Author
Owner

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue
Author
Owner

cl8y-agent-control: queued implement job a3e8bcb5-39fc-44dd-a26a-88f9d58ca290 (not executed; no Hetzner VM).

cl8y-agent-control: queued `implement` job `a3e8bcb5-39fc-44dd-a26a-88f9d58ca290` (not executed; no Hetzner VM).
docs(git): verify-issue-1287 playbook and regression target
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
35896f4d01
Document pre-push origin/main skip (#1287 / #1286) for agents and testing.md.
PlasticDigits deleted branch issue/1286 2026-09-21 05:18:33 +00:00
Author
Owner

Merged as PR #1287 onto origin/main.

Follow-up: make verify-issue-1287 failed on the stacked main because a leftover echo FAIL; exit 1 survived the #1291 merge into scripts/test-commit-msg-hook.sh. Fixed in PR #1301. Combined pre-push keeps origin/main skip plus --not --remotes for new branches.

Leftover ops: #1300

Merged as PR #1287 onto origin/main. Follow-up: `make verify-issue-1287` failed on the stacked main because a leftover `echo FAIL; exit 1` survived the #1291 merge into `scripts/test-commit-msg-hook.sh`. Fixed in PR #1301. Combined pre-push keeps origin/main skip plus `--not --remotes` for new branches. Leftover ops: https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1300
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1287
No description provided.