Skip to content

fix: enforce semantic titles after meta agent removal - #83

Merged
mateodelnorte merged 2 commits into
mainfrom
fix/semantic-pr-title-release-note
May 19, 2026
Merged

mateodelnorte merged 2 commits into
mainfrom
fix/semantic-pr-title-release-note

Conversation

@mateodelnorte

@mateodelnorte mateodelnorte commented May 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Port gitkb-core's commitlint configuration and commit-msg hook into meta
  • Add a merge-blocking Semantic PR Title workflow so GitHub merge subjects remain conventional
  • Document Conventional Commit requirements and hook installation

Release notes

This PR intentionally uses a conventional fix: title mentioning the meta agent removal so the next release notes include the work from PR #81 / dffe7aa, whose merged GitHub subject was not conventional.

Verification

  • .githooks/commit-msg accepts fix: remove legacy meta agent workspace entry [[tasks/harmony-678]]
  • .githooks/commit-msg rejects Align workspace after meta agent removal (#81)
  • cargo fmt --all -- --check
  • pre-push clippy completed successfully; pre-push cargo test --workspace hit existing git_utils test worktree mutation/lock failures unrelated to this workflow/doc/hook change

Summary by CodeRabbit

Chores

  • Implemented Conventional Commit formatting enforcement for commit messages and PR titles through local git hook validation and merge-blocking CI checks.
  • Added GitHub Actions workflow for semantic PR title validation.
  • Updated contribution documentation with Conventional Commit guidelines and examples.
  • Added new make install-hooks command for developers to configure local validation.

Review Change Stack

…-678]]

Release-note follow-up for PR #81 / dffe7aa, whose GitHub merge subject was not conventional.
@coderabbitai

coderabbitai Bot commented May 19, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@mateodelnorte has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 7 minutes and 46 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f1fc7286-dcda-4bdf-b42d-a48af6f062fc

📥 Commits

Reviewing files that changed from the base of the PR and between 1cc8a04 and 98921f5.

📒 Files selected for processing (2)
  • .githooks/commit-msg
  • Makefile

Walkthrough

This PR adds Conventional Commits enforcement to the repository through a local git hook, GitHub Actions workflow, commitlint configuration, Makefile installation target, and updated contributor documentation. Developers commit locally with format validation via the commit-msg hook, and PR titles are also validated at the CI level before merge.

Changes

Conventional Commits Enforcement

Layer / File(s) Summary
Commit Validation Configuration & Local Hook
commitlint.config.cjs, .githooks/commit-msg
Commitlint configuration restricts commit type enum to build, chore, ci, deps, docs, feat, fix, perf, refactor, revert, style, test. The commit-msg hook invokes commitlint via npx, gracefully handles missing npx and network failures (with warnings), and blocks commits on validation failures.
Hook Installation Automation
Makefile
New install-hooks target makes hook scripts executable, resolves the git hooks directory, symlinks commit-msg, pre-commit, and pre-push from .githooks/ into the hooks directory, and outputs confirmation. .PHONY is updated to include the new target.
CI-Level PR Title Enforcement
.github/workflows/semantic-pr-title.yml
GitHub Actions workflow triggers on PR lifecycle events (opened, edited, synchronize, reopened, ready_for_review), configures read permissions and per-PR concurrency, and runs semantic pull request title validation against the same commit type allowlist.
Contributor Guidelines
CONTRIBUTING.md
Documentation specifies Conventional Commit formatting for commits and PR titles, provides examples of compliant messages, documents optional task wikilink embedding, notes merge-blocking semantic PR checks, and includes make install-hooks setup instruction.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A hook hops in, commits now shine so bright,
With types enforced and titles checked just right,
Make install-hooks and the CI stays clean,
Conventional Commits—the finest workflow's seen! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix: enforce semantic titles after meta agent removal' directly addresses the main objective—adding semantic title enforcement via commitlint and GitHub Actions after the meta agent removal. It follows Conventional Commits format and clearly summarizes the primary change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/semantic-pr-title-release-note

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.githooks/commit-msg:
- Line 20: The current grep pattern that checks the variable output in the
commit-msg hook only matches messages that start with "npm ERR!" or "npm error"
and therefore misses alternative npx error formats like "Error: could not
determine executable"; update the grep regex used on the output variable (the
line containing printf '%s\n' "$output" | grep -qE '...') to also accept common
non-"npm ERR!" prefixes (for example allow an optional leading "npm (ERR!|error)
" or other prefixes like "Error:"), so the check will detect
network/resolution/executable errors regardless of whether they include the "npm
ERR!" prefix; keep the rest of the conditional logic unchanged.

In `@Makefile`:
- Around line 57-59: The three ln commands creating symlinks for commit-msg,
pre-commit, and pre-push currently use absolute paths via
"$$(pwd)/.githooks/..." which makes them non-portable; change them to create
relative symlinks instead (point the hooks to ".githooks/commit-msg",
".githooks/pre-commit", ".githooks/pre-push" or compute the repository root with
git and form paths relative to the hooks directory) so the symlinks remain valid
if the repo is moved or re-cloned; update the three ln -sf lines that reference
the .githooks files to use these relative paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5952a2bf-637b-42fd-8cd7-87a8c5f0adb2

📥 Commits

Reviewing files that changed from the base of the PR and between dffe7aa and 1cc8a04.

📒 Files selected for processing (5)
  • .githooks/commit-msg
  • .github/workflows/semantic-pr-title.yml
  • CONTRIBUTING.md
  • Makefile
  • commitlint.config.cjs

Comment thread .githooks/commit-msg Outdated
Comment thread Makefile Outdated
@mateodelnorte
mateodelnorte merged commit 344e814 into main May 19, 2026
8 checks passed
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