Skip to content

fix(ci): exclude trunk-reachable history from release-PR commit gate - #1153

Merged
c-vigo merged 2 commits into
devfrom
bugfix/1149-exclude-trunk-reachable-commits
Jul 16, 2026
Merged

c-vigo merged 2 commits into
devfrom
bugfix/1149-exclude-trunk-reachable-commits

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

A freshly migrated consumer's first release PR (release/X.Y.Z → main)
re-lints its entire pre-migration history: the Commit Messages job validates
merge-base(base, head)..head, which reaches back to the last release — commits
merged before the commit gate existed. One non-compliant historical commit
(immutable, non-merge, human-authored → no exemption) permanently blocks the
train at the worst possible moment.

Fix (issue preference #1 — self-healing, no per-repo SHA list)

  • validate-commit-range gains a repeatable --exclude-reachable REF that
    appends ^REF to the git log range.
  • Scaffolded ci.yml commit-checks fetches the trunk and passes
    --exclude-reachable origin/dev on non-dev PRs. Commits already reachable
    from trunk were gated (or grandfathered) on their way in and are not
    re-litigated.
  • No-op on dev PRs (base is dev); only tightens release/main ranges.

Tests

  • TestReadCommits builds a main→dev→release topology and asserts a
    trunk-grandfathered commit is dropped with --exclude-reachable and kept
    without it. Full validate-commit-range suite green (36 passed).

Closes #1149

c-vigo added 2 commits July 16, 2026 16:50
The Commit Messages job validated merge-base(base, head)..head, so a
consumer's first release PR (release/X.Y.Z -> main) re-linted the entire
pre-migration history and one non-compliant historical commit blocked
the whole train. validate-commit-range gains --exclude-reachable REF and
the scaffolded ci.yml passes origin/dev on non-dev PRs, dropping commits
already gated (or grandfathered) on their way into trunk. No-op on dev
PRs whose base is dev.

Refs: #1149
@c-vigo
c-vigo merged commit 5963018 into dev Jul 16, 2026
13 checks passed
@c-vigo
c-vigo deleted the bugfix/1149-exclude-trunk-reachable-commits branch July 16, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant