Skip to content

fix(hooks): accept the ! breaking-change marker in commit-quality - #3824

Merged
haelyra merged 1 commit into
affaan-m:mainfrom
NotAFlightRisk:fix/commit-quality-breaking-marker
Nov 16, 2026
Merged

haelyra merged 1 commit into
affaan-m:mainfrom
NotAFlightRisk:fix/commit-quality-breaking-marker

Conversation

@NotAFlightRisk

Copy link
Copy Markdown
Contributor

What Changed

The commit-quality hook now allows a ! after the type or scope, so feat!: ... and feat(api)!: ... pass its format check. One test covers both.

Why This Change

The conventional-commit-review skill tells the agent to mark a breaking change as feat(api)!: remove legacy endpoint, and with the strict profile on, this hook then warns that the same message "does not follow conventional commit format". The ! is part of the Conventional Commits spec, and commitlint's conventional preset (same type list as the hook) accepts it. It's only a warning so nothing was blocked, it's just telling you off for doing what the skill said.

It's the line just above one that #3672 changes, so whichever lands second might need a quick rebase.

Testing Done

  • Manual testing completed - both forms got the format warning before and don't now
  • Automated tests pass locally (node tests/run-all.js) - not the whole lot, I didn't have deps installed so plenty of unrelated files fall over on missing modules. The hook's own test file passes, plus the quality-gate and claw tests that load it
  • Edge cases considered and tested - feat!(api): x and feat!!: x still fail the format check, and feat!: Drop ... still gets the lowercase one

Type of Change

  • fix: Bug fix (a small one - it was a false warning)
  • feat: New feature
  • refactor: Code refactoring
  • docs: Documentation
  • test: Tests
  • chore: Maintenance/tooling
  • ci: CI/CD changes

Security & Quality Checklist

  • No secrets or API keys committed (ghp_, sk-, AKIA, xoxb, xoxp patterns checked)
  • JSON files validate cleanly - no JSON touched
  • Shell scripts pass shellcheck (if applicable) - no shell touched
  • Pre-commit hooks pass locally (if configured) - none configured here
  • No sensitive data exposed in logs or output
  • Follows conventional commits format

If you changed dependencies or package.json (bin / files / deps)

  • Ran yarn install --mode=update-lockfile and committed the yarn.lock change - N/A, no dependency changes

If you added a skill, command, agent, hook, or CLI tool

  • N/A - nothing new added, just a two-character change to an existing hook

Documentation

  • Updated relevant documentation - not needed, the skill already documents !
  • Added comments for complex logic - none needed
  • README updated (if needed) - not needed

@ecc-tools

ecc-tools Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Security Evidence

Commit: f914d617fd495786e4a8939b05fdc9a18c1c2a71

Security scanner evidence required (action_required)

Detected 1 security-sensitive predictive risk signal(s) without scanner evidence.

Mode: enforce

Findings:

  • Security-sensitive changes may ship without scanner evidence: The PR touches billing, secrets, auth, webhooks, agent, or CI-sensitive surfaces without adding obvious security scanner, code scanning, or security-focused validation evidence. (2 security-sensitive paths changed; 0 security scanner or security-focused validation artifacts changed)

Touched security-sensitive paths:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js

Expected evidence:

  • Security scanner, code scanning, secret scanning, dependency/security review, or focused security regression output.
  • SARIF/code-scanning upload or equivalent pass/fail gate for the changed surface.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / PR Risk Taxonomy

Commit: f914d617fd495786e4a8939b05fdc9a18c1c2a71

PR taxonomy review recommended (neutral)

Detected 3 PR taxonomy bucket(s): Security Evidence, Harness Drift, CI/CD Recommendation.

Scanned 2 changed file(s).

Roadmap taxonomy buckets:

Security Evidence

Security-sensitive changes should carry explicit scanner, code-scanning, or focused regression evidence.

Signals:

  • Security-sensitive changes may ship without scanner evidence
  • 0 security-sensitive path(s) changed

Paths:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js

Harness Drift

Harness-facing changes can drift across Claude Code, Codex, OpenCode, and shared adapter surfaces.

Signals:

  • Harness config changes may ship without compatibility evidence
  • 0 harness-facing path(s) changed

Paths:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js

CI/CD Recommendation

CI, dependency, coverage, and contract signals should be routed into follow-up checks or verification work.

Signals:

  • 1 CI or workflow path(s) changed

Paths:

  • tests/hooks/pre-bash-commit-quality.test.js

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Reference Set Readiness

Commit: f914d617fd495786e4a8939b05fdc9a18c1c2a71

Reference set readiness gaps detected (neutral)

Reference evidence present for 0/7 areas (0%) across 2 changed file(s).

This check is based on files changed in this PR. Repository-level readiness is still reported by /ecc-tools analyze comments and generated manifests.

Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@ecc-tools

ecc-tools Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

ECC Tools / Hosted Promotion Readiness

Commit: f914d617fd495786e4a8939b05fdc9a18c1c2a71

Hosted promotion readiness passed (success)

No hosted promotion evidence gaps detected across 2 changed file(s); 0 corpus scenarios had matching evidence.

This check compares PR file changes against the evaluator/RAG promotion corpus in src/analyzers/fixtures/evaluator-rag-corpus.ts.
Hosted output scoring inspected 0 completed cached hosted job results.

No evaluator corpus scenarios matched this PR.

Check publication was denied or unavailable. An app owner must enable Checks: read and write, and the installation owner must approve the updated permission.

@coderabbitai

coderabbitai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: affaan-m/ECC
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: b38be6a
  • Layers: Repository YAML
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: fcb7ac96-1ad2-4973-a603-6eba2032cc79
Commits

Reviewing files that changed from the base of the PR and between b38be6a and f914d61.

Files selected for processing: 2
  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Recent review details
Context from checks skipped due to timeout: 2
  • GitHub Check: CodeRabbit
  • GitHub Check: Greptile Review
Additional context used
Code guidelines: 7
.cursor/rules/typescript-security.md — auto-discovered
.cursor/rules/typescript-coding-style.md — auto-discovered
.cursor/rules/common-patterns.md — auto-discovered
.cursor/rules/kotlin-testing.md — auto-discovered
.cursor/rules/python-coding-style.md — auto-discovered
.cursor/rules/swift-patterns.md — auto-discovered
.cursor/rules/common-testing.md — auto-discovered
Path-based instructions: 8
Focus on command injection, unsafe subprocess usage, path traversal, SSRF, secret exposure, and missing tests for new CLI behavior.

CodeRabbit configuration file

Files:

  • scripts/hooks/pre-bash-commit-quality.js
Source excerpt:

CodeRabbit inference engine (.cursor/rules/typescript-security.md)

Files:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js
Source excerpt: Use spread operator for immutable updates: Source excerpt: Use async/await with try-catch: Source excerpt: Use Zod for schema-based validation: Source excerpt: No `console.log` statements in production code Source excerpt: U...

CodeRabbit inference engine (.cursor/rules/typescript-coding-style.md)

Files:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js
Source excerpt: Encapsulate data access behind a consistent interface: Define standard operations: findAll, findById, create, update, delete Concrete implementations handle storage details (database, API, file, etc.) Business logic depends...

CodeRabbit inference engine (.cursor/rules/common-patterns.md)

Files:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js
Source excerpt: Use **Kotest** with spec styles (StringSpec, FunSpec, BehaviorSpec) and **MockK** for mocking.

CodeRabbit inference engine (.cursor/rules/kotlin-testing.md)

Files:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js
Source excerpt: Follow **PEP 8** conventions Source excerpt: Use **type annotations** on all function signatures Source excerpt: Prefer immutable data structures: Source excerpt: **black** for code formatting Source excerpt: **isort** for i...

CodeRabbit inference engine (.cursor/rules/python-coding-style.md)

Files:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js
Source excerpt: Define small, focused protocols.

CodeRabbit inference engine (.cursor/rules/swift-patterns.md)

Files:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js
Source excerpt: Test Types (ALL required): **Unit Tests** - Individual functions, utilities, components **Integration Tests** - API endpoints, database operations **E2E Tests** - Critical user flows (framework chosen per language)

CodeRabbit inference engine (.cursor/rules/common-testing.md)

Files:

  • scripts/hooks/pre-bash-commit-quality.js
  • tests/hooks/pre-bash-commit-quality.test.js
Additional comments: 2
scripts/hooks/pre-bash-commit-quality.js: 1

186-186: LGTM!

tests/hooks/pre-bash-commit-quality.test.js: 1

212-217: LGTM!

📝 Summary

Summary by CodeRabbit

  • New Features
    • Conventional commit messages can now include the ! breaking-change marker, with or without a scope, such as feat!: ... and feat(scope)!: ....
  • Tests
    • Added coverage confirming these marked commit messages pass validation without reported issues.

The conventional commit validator now accepts an optional ! before the colon. Tests cover subjects with and without a scope.

Changes: Commit message validation

Layer / File(s) Summary
Accept and test breaking-change markers
scripts/hooks/pre-bash-commit-quality.js, tests/hooks/pre-bash-commit-quality.test.js
The conventional commit pattern permits an optional ! before the colon. Tests verify that scoped and unscoped subjects using ! produce no validation issues.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • affaan-m/ECC#3734: Changes the same hook’s message extraction and subject validation.
  • affaan-m/ECC#3729: Adds subject-line validation and here-document message handling in the same hook.
  • affaan-m/ECC#3731: Adds subject extraction and validation behavior in the same hook.

Suggested reviewers: xingzihai

Merge Risk: Minimal · up to f914d

The marker validation change is covered for scoped and unscoped subjects and is mergeable.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: accepting the ! breaking-change marker in the commit-quality hook.
Description check Passed The description directly explains the hook change, affected commit formats, rationale, tests, and known limitations.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] Safe to merge. The intended breaking-change syntax is accepted without weakening the tested format, capitalization, or length checks.

Summary

The commit-quality hook now accepts feat!: and feat(api)!: without a false format warning. The added regression test covers both forms, and existing subject checks remain intact.

The hook suite passed with 24 passing tests, no failures, and one Windows-only skip. A 58-case comparison also checked the exported validator and both stdin entry paths, including the strict-profile wrapper. Valid breaking-change messages passed across all supported types; malformed markers, uppercase subjects, and overlong messages retained their expected warnings.

No actionable issues found. This change is safe to merge.

  • Breaking-change commits can use ! after the type or scope.

Reviews (1) · Last reviewed commit: "fix(hooks): accept the ! breaking-change..." · Reviewed by Greptile

@haelyra
haelyra merged commit 612cba6 into affaan-m:main Nov 16, 2026
4 checks passed
@haelyra

haelyra commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator

Thank you for contributing fix(hooks): accept the ! breaking-change marker in commit-quality. Your complete reviewed head is preserved with attribution in maintainer integration #3945.

The delivered main commit now passes CI, CodeQL and a fresh Supply-Chain Watch after the focused coverage-report and dependency recovery in #3947. We appreciate your patience and your help improving ECC.

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.

2 participants