Skip to content

fix(release-automation): converge CC regexes — drop top-level security:#154

Merged
githubrobbi merged 1 commit intomainfrom
fix/release-automation-cc-converge
May 8, 2026
Merged

fix(release-automation): converge CC regexes — drop top-level security:#154
githubrobbi merged 1 commit intomainfrom
fix/release-automation-cc-converge

Conversation

@githubrobbi
Copy link
Copy Markdown
Collaborator

Summary

Brings forward the Phase R1b sub-question "keep top-level security: or migrate to chore(security):" and resolves it: top-level security: is no longer an accepted Conventional Commits type anywhere in the toolchain. Security work uses the conventional encoding:

Form Bump Changelog section
fix(security): foo patch (0.x.y0.x.y+1) ### Security
chore(security): foo none ### Security

Top-level security: foo is rejected by the local commit-msg hook, the commitlint workflow, and (after this PR) by both cliff.toml and release-plz.toml's release_commits filter.

Background — the four-regex drift

Regex location Before this PR After this PR
scripts/ci/check_commit_subjects.sh (commit-msg + pre-push hook) 11 standard CC types (unchanged)
.github/workflows/commitlint.yml (PR-title advisory check) 11 standard CC types (unchanged)
cliff.toml::commit_parsers 11 + top-level security: 11 only
release-plz.toml::release_commits feat|fix|perf|security feat|fix|perf

The permissive carve-out in cliff.toml + release-plz.toml was a tolerance for PRs #31, #33, #34 — three early-project commits that used security: as a top-level type before the commit-msg hook was installed. Since the hook landed, no future commit can use that prefix on main, so the carve-outs were dead code preemptively allowing what no longer reaches the codebase.

The dedicated ^fix\(security\) and ^chore\(security\) parsers in cliff.toml already route security work to the ### Security changelog section without needing a non-CC top-level type, so this PR is strictly subtractive for the changelog generator.

Diff (4 files, +34 / −11)

  • release-plz.tomlrelease_commits regex collapses; comment block expanded with the security-encoding convention.
  • cliff.toml — drop the ^security(\([a-z0-9-]+\))?: parser and its carve-out comment; updated the section header explaining why only the two scope-based parsers remain.
  • CONTRIBUTING.md § Commit message conventions — new "Security commits" paragraph codifying fix(security): + chore(security): as canonical and explicitly stating top-level security: is not allowed. Cross-references the hook + workflow + release-plz filter.
  • docs/architecture/release-automation-plan.md — append a deviation log entry "R1b CC-type convergence (early)" documenting decision, rationale, and historical PR linkage.

No code changes. Pure regex + comment + docs convergence.

Validation

Plan impact

Brings R1b's enforcement decision forward by ~1 phase. Does not change the R1a → R1b advisory→required scheduling for the commitlint workflow itself; only resolves the orthogonal "should security: be a top-level type" sub-question.

Rollback

Single-file revert restores the carve-outs. No data has moved; no commits are affected (the historical entries in CHANGELOG and release-automation-baseline.md remain unchanged regardless).

Refs

…ty:`

Brings forward the Phase R1b "decide whether to keep top-level
`security:` or migrate to `chore(security):`" sub-question and resolves
it: top-level `security:` is no longer an accepted Conventional Commits
type anywhere in the toolchain.  Security work uses `fix(security):`
(patch + Security changelog row) or `chore(security):` (no bump +
Security changelog row).

Background — four regexes had drifted into two camps:

  Strict (11 standard CC types):
    - scripts/ci/check_commit_subjects.sh  (commit-msg + pre-push hook)
    - .github/workflows/commitlint.yml     (PR-title advisory check)

  Permissive (11 + top-level `security:`):
    - cliff.toml::commit_parsers
    - release-plz.toml::release_commits

The permissive carve-out tolerated PRs #31, #33, #34 — three early-
project commits that used `security:` as a top-level type before the
commit-msg hook was installed.  Since the hook landed, no future commit
can use that prefix on `main`, so the cliff.toml + release-plz.toml
allowances are dead code preemptively allowing what no longer reaches
the codebase.  The dedicated `^fix\(security\)` and `^chore\(security\)`
parsers in `cliff.toml` already route security work to the dedicated
**### Security** changelog section without the top-level type.

Changes:

  - `release-plz.toml::release_commits`:
        ^(feat|fix|perf|security)(\\(.+\\))?:
      → ^(feat|fix|perf)(\\(.+\\))?:
    Plus a comment block explaining the security-encoding convention
    and pointing to CONTRIBUTING.md.

  - `cliff.toml::commit_parsers`:
    Drop the `^security(\\([a-z0-9-]+\\))?:` line and its carve-out
    comment.  The two scope-based parsers
    (`^fix\\(security\\)` + `^chore\\(security\\)`) remain, so the
    Security changelog section is unaffected.

  - `CONTRIBUTING.md` § "Commit message conventions":
    Add a "Security commits" paragraph explicitly codifying
    `fix(security):` + `chore(security):` as the canonical encodings
    and stating that top-level `security:` is NOT an allowed type.
    Cross-reference the commit-msg hook + commitlint workflow + the
    release-plz `release_commits` filter.

  - `docs/architecture/release-automation-plan.md`:
    Append a deviation log entry "R1b CC-type convergence (early)"
    documenting the decision, the dead-code rationale, and that
    historical PRs #31/#33/#34 remain in the changelog.

No code changes.  Pure regex + comment + docs convergence.

Validation:

  - `git grep -nE "release_commits|\\^security|security:"` in
    `cliff.toml` + `release-plz.toml` shows the four regexes now
    agree (11 standard CC types only).
  - No CHANGELOG churn — the historical PR #31/#33/#34 entries are
    not regenerated by `git-cliff` because they predate the most
    recent tag.
  - `taplo fmt --check` on the two TOML files green.

Refs: #153 (R5 retirement, where the drift was first surfaced).

Plan impact: brings R1b's enforcement decision forward by ~1 phase.
Does NOT change the R1a → R1b advisory→required scheduling for the
commitlint workflow itself; only resolves the orthogonal type-list
sub-question.
@githubrobbi githubrobbi merged commit 40188a2 into main May 8, 2026
18 checks passed
@githubrobbi githubrobbi deleted the fix/release-automation-cc-converge branch May 8, 2026 14:08
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