fix: validate commit messages on merge to main#55
Merged
Conversation
Conventional-commit validation was bundled in the run-checks-gated quality job, so it only ran on PRs (against throwaway branch commits) and publish pushes -- never on an ordinary squash-merge to main. Teams merging via the GitHub UI thus had no landing-time guard at all (the local predicted_bump gate only runs under `hyperi-ci push`). Move it to a dedicated cheap `commit-check` job that runs on push-to- main (FATAL -- validates what lands) and on PRs (ADVISORY -- branch commits may be squashed away). Not run-checks-gated. Feature-branch pushes skip it, preserving the chore-skip fast path. Local `hyperi-ci check` runs the same validation over origin/main..HEAD (FATAL) so a bad message is caught in the local tight loop, not after the push. Added to all four reusable <lang>-ci.yml workflows and the self-hosting ci.yml, plus a new `hyperi-ci check-commits` CLI entrypoint. Surfaced by dfe-ui#81 (squash-merge PR red-flagged on discarded branch commits).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Moves conventional-commit validation out of the
run-checks-gatedqualityjob into a dedicated cheapcommit-checkjob.Before: validation only ran on PRs (against throwaway branch commits that a squash-merge discards) and on publish pushes. An ordinary squash-merge to main was never validated (
run-checks=false), and UI-merge teams never hit the localpredicted_bumpguard (that only runs underhyperi-ci push). Net: no landing-time guard on main for GitHub-UI merges.After:
commit-checkruns on push-to-main (FATAL - validates what actually lands) and on PRs (ADVISORY - branch commits may be squashed away, only the squash subject lands). It is a git-log + regex check, notrun-checks-gated. Feature-branch pushes skip it, preserving the chore-skip fast path.Local
hyperi-ci checknow runs the same validation overorigin/main..HEAD(FATAL) so a bad message is caught in the local tight loop, not after the push - keepingchecka complete local dry-run of what CI would flag.Where
commit-checkjob in all four reusable<lang>-ci.ymlworkflows + the self-hostingci.yml(dogfoods on this PR).hyperi-ci check-commitsCLI entrypoint;commit_validation.rungains advisory-on-PR +local=modes.stage_quality; kept there only for localcheck.docs/ARCHITECTURE.mdjob-contract + what-runs-when tables.Notes
feat:/BREAKINGopt-in gate is unchanged and still deliberate (comment-locked). This PR only changes where/when validation runs, not the rules.<lang>-ci.yml@main. Advisory-on-PR means PRs won't newly break; push-to-main will now flag a genuinely bad squash subject landing on main (branch protection is off, so it signals rather than blocks).