ci: lint PR conventions and polish CI workflows#72
Conversation
Audit found all four entries in the root package.json `trustedDependencies` (electron, node-pty, esbuild, tree-sitter) have install/postinstall scripts that invoke `node` directly, so `bun install` needs node in PATH to succeed. Dropping setup-node from any job that runs `bun install` would silently fail those postinstalls. Add a short comment at every setup-node usage pointing at the `trustedDependencies` field so the invariant is grep-able and the comment stays accurate if the trusted list changes.
Add an advisory workflow that fails the check when a PR title does not start with a Conventional Commits type (`feat:`, `fix:`, `refactor:`, `docs:`, `chore:`, `ci:`, `build:`, `perf:`, `test:`, `style:`, `revert:`). Not added to the `dev` ruleset; advisory only. Uses `pull_request_target` so the check runs when a PR opens from a fork (the workflow copy on `dev` runs, not the fork's). Permissions are scoped to read-only and no fork code is checked out, so the usual `pull_request_target` injection concerns do not apply. Triggers on `opened`/`edited`/`reopened`/`ready_for_review`. `synchronize` is omitted because the title does not change on new commits. `wip: true` skips draft PRs whose title starts with `WIP:`; safe because this repo uses merge commits, so the PR title is not the commit subject on `dev`. Concurrency group cancels superseded runs on rapid title edits.
Add an advisory workflow using wagoid/commitlint-github-action (bundles @commitlint/config-conventional) to validate every commit in a PR against Conventional Commits. Pairs with pr-title-lint.yml -- the title check only sees the PR title, while this catches intermediate commits that would land on `dev` under the merge-commit strategy. Config lives in .commitlintrc.json. Merge commits are ignored by commitlint's defaults. Not required in the `dev` ruleset; advisory only. `pull-requests: read` is declared defensively in case the action ever switches from reading local git history to the PR commits API; `fetch-depth: 0` is preserved because the current action implementation uses git log. Concurrency group cancels superseded runs.
`comment-summary-in-pr: always` combined with `warn-only: true` means every PR gets a summary comment even when there are no findings. Since the bun.lock parse rollout on PR #55 confirmed the action is working, the always-on summary is pure noise now. Switch to `never`; findings still show in the Actions log. The fork guard and `pull-requests: write` permission are also removed -- they existed only to avoid a write-access error on fork PRs under the always-on summary, which no longer applies. Fork PRs now get advisory coverage too, which is exactly where it is most useful. CVE/license gating remains advisory (warn-only). Upgrading to fail-on-severity is a separate decision.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 12 minutes and 59 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📝 WalkthroughWalkthroughThis change introduces Conventional Commits enforcement for PR titles and commit messages through two new GitHub Actions workflows, adds a Commitlint configuration file, inserts explanatory comments across workflow files documenting Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a .commitlintrc.json configuration file to enforce conventional commit standards using the @commitlint/config-conventional preset. Feedback suggests enhancing the configuration by adding a JSON schema for IDE autocompletion and disabling the subject-case rule to prevent linting errors when using acronyms like PR or CI in commit messages.
Points at json.schemastore.org so editors offer autocompletion and validation for the commitlint config. Runtime behavior unchanged; CI still reads `extends` the same way. Addressed from gemini-code-assist review on PR #72.
Summary
setup-nodeusage documenting it is load-bearing ([Feature] Drop actions/setup-node from bun-only CI jobs #70) —bun installtriggerstrustedDependenciespostinstalls (electron, node-pty, esbuild, tree-sitter) that callnodeexplicitly. Comment anchors totrustedDependenciesinpackage.jsonso the list stays grep-able.pr-title-lintworkflow usingamannn/action-semantic-pull-request@v6.1.1(SHA-pinned) to validate PR titles against Conventional Commits ([Feature] Enforce Conventional Commits on PR titles #68).commit-lintworkflow usingwagoid/commitlint-github-action@v6.2.1(SHA-pinned) with.commitlintrc.jsonextending@commitlint/config-conventional([Feature] Enforce Conventional Commits on commit messages #69).dependency-review'scomment-summary-in-prfromalwaystonever; drop the fork-skip guard andpull-requests: writepermission (both only existed because of the always-on summary). Fork PRs now get advisory CVE/license coverage too.Why
Issue #54 (the CI merge-gate hardening epic) left four loose ends. This PR closes #67, #68, #69, and #70 in a single batch since all four are small workflow-level changes with no logical dependencies. Also folds in a small dependency-review cleanup: the always-on PR summary was useful during the initial rollout on #55 to verify
bun.lockparses correctly, but it has served its purpose and is noise on every PR now.AGENTS.md convention was updated in a prior local edit: PR titles switched from the old
[Feature]/[Bug]scheme to Conventional Commits; issue titles still use[Feature]/[Bug]via.github/ISSUE_TEMPLATE/*.yml.Decisions declined during two rounds of crosscheck review: re-adding
synchronizeto pr-title-lint (title does not change on push); droppingfetch-depth: 0on commit-lint (wagoid uses local git log, not the API); droppingwip: true(safe under merge-commit strategy); merging pr-title-lint and commit-lint into one file (mixedpull_request_target/pull_requestsecurity contexts); switching commit-lint tobunx commitlintinside ci.yml (real alternative but adds devDep; deferred).Related Issue
Closes #67
Closes #68
Closes #69
Closes #70
How To Verify
test:ciexit-code audit for #67 is recorded as an issue comment on #67;bun test --reporter=junitwas empirically verified to exit non-zero on a failing test.Screenshots or Recordings
No UI changes.
Checklist
devbranchSummary by CodeRabbit
feat:,fix:,refactor:)