From 87a0e97783dcd60363a333fa66453ad9789d19da Mon Sep 17 00:00:00 2001 From: sean-can-bwell Date: Wed, 11 Nov 2026 21:58:12 -0600 Subject: [PATCH 1/2] BAI-1601 stop trusting commit author on push; accept Dependabot bump subjects in pattern --- .github/workflows/check-commit-message.yml | 18 ++++++++---------- playbooks/MERGING.md | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-commit-message.yml b/.github/workflows/check-commit-message.yml index 1f2f2fa8..e7850361 100644 --- a/.github/workflows/check-commit-message.yml +++ b/.github/workflows/check-commit-message.yml @@ -11,18 +11,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Check For Issue Key - # Dependabot opens no Jira ticket, so its PRs are exempt from this key check, and so is the squash - # commit one leaves on main (the author stays dependabot[bot]). The PR author, not the actor, so a - # human's push to a Dependabot branch does not turn the check back on. A push is exempt only when - # it is that one commit: the checker reads every commit in a push, so a Dependabot tip must not - # hide human commits beneath it. A skipped step reports as passing. The AI-attribution step below - # has no condition: it runs for every PR and push, Dependabot's included. - if: >- - github.event.pull_request.user.login != 'dependabot[bot]' && - (github.event.head_commit.author.name != 'dependabot[bot]' || github.event.commits[1] != null) + # Dependabot opens no Jira ticket, so its PRs are exempt from this key check. The PR author, not the + # actor, so a human's push to a Dependabot branch does not turn the check back on. Only PRs are + # exempt: a push always runs the check, because the commit author on a push is a free-text git + # field and a rebase merge keeps it. Dependabot's own squash commit on main passes on its subject + # (the bump alternatives in the pattern). A skipped step reports as passing. The AI-attribution + # step below has no condition: it runs for every PR and push, Dependabot's included. + if: github.event.pull_request.user.login != 'dependabot[bot]' uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0 with: - pattern: '^(Bump|Merge|Revert|Reapply|fix\(security\):|\[Aikido\]|build\(deps(-dev)?\): bump|([A-Z]+-[0-9]+))\s+.+' + pattern: '^(Bump|Merge|Revert|Reapply|fix\(security\):|\[Aikido\]|build\(deps(-dev)?\): bump|chore\(deps(-dev)?\): [Bb]ump|([A-Z]+-[0-9]+))\s+.+' flags: 'gm' error: 'Commit message must begin with a JIRA Issue Key: e.g. HP-123 ' diff --git a/playbooks/MERGING.md b/playbooks/MERGING.md index eb2bd0fc..7e7a838e 100644 --- a/playbooks/MERGING.md +++ b/playbooks/MERGING.md @@ -8,7 +8,7 @@ is in [DEPLOYMENT.md](DEPLOYMENT.md). ## Before you merge -1. Commit messages start with a JIRA issue key, for example `BAI-1129 ...`. Enforced by `.github/workflows/check-commit-message.yml` (exempt: `Bump`, `Merge`, `Revert`, `Reapply`, `fix(security):`, `[Aikido]`, `build(deps): bump`; Dependabot PRs, and a lone Dependabot commit pushed to `main`, skip the key check). The same workflow rejects AI attribution in commits and the PR description. +1. Commit messages start with a JIRA issue key, for example `BAI-1129 ...`. Enforced by `.github/workflows/check-commit-message.yml` (exempt: `Bump`, `Merge`, `Revert`, `Reapply`, `fix(security):`, `[Aikido]`, `build(deps): bump`, `chore(deps): bump`, `chore(deps-dev): bump`; Dependabot PRs skip the key check, pushes are always checked). The same workflow rejects AI attribution in commits and the PR description. 2. `Build and Test` is green by convention; the ruleset has no `required_status_checks`, so GitHub does not block a merge on it: pre-commit (ruff, mypy `--strict`, bandit, detect-secrets), then the pytest suite (`.github/workflows/build_and_test.yml`, `.pre-commit-config.yaml`). 3. `PR Architecture Review` has run (`.github/workflows/pr-architecture-review.yml`, reusable workflow from `icanbwell/.github`). It does not block merge by ruleset (no `required_status_checks`). 4. A change to `AGENTS.md` or `CLAUDE.md` needs `@icanbwell/enterprise-architecture` review (`CODEOWNERS`). That is a convention, not enforced: the `main` ruleset has `require_code_owner_review: false`, so another person's approval satisfies GitHub, but request the owner anyway (`gh api repos/icanbwell/language-model-common/rules/branches/main`, 2026-10-11). From 4d897eeaff0b636e72d62e6081f7bbaa2016e55c Mon Sep 17 00:00:00 2001 From: sean-can-bwell Date: Thu, 12 Nov 2026 09:38:30 -0600 Subject: [PATCH 2/2] BAI-1601 drop the chore(deps) bump alternative; Dependabot commits here start with Bump --- .github/workflows/check-commit-message.yml | 2 +- playbooks/MERGING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-commit-message.yml b/.github/workflows/check-commit-message.yml index e7850361..cd64636e 100644 --- a/.github/workflows/check-commit-message.yml +++ b/.github/workflows/check-commit-message.yml @@ -20,7 +20,7 @@ jobs: if: github.event.pull_request.user.login != 'dependabot[bot]' uses: gsactions/commit-message-checker@16fa2d5de096ae0d35626443bcd24f1e756cafee # v2.0.0 with: - pattern: '^(Bump|Merge|Revert|Reapply|fix\(security\):|\[Aikido\]|build\(deps(-dev)?\): bump|chore\(deps(-dev)?\): [Bb]ump|([A-Z]+-[0-9]+))\s+.+' + pattern: '^(Bump|Merge|Revert|Reapply|fix\(security\):|\[Aikido\]|build\(deps(-dev)?\): bump|([A-Z]+-[0-9]+))\s+.+' flags: 'gm' error: 'Commit message must begin with a JIRA Issue Key: e.g. HP-123 ' diff --git a/playbooks/MERGING.md b/playbooks/MERGING.md index 7e7a838e..e9ea4e99 100644 --- a/playbooks/MERGING.md +++ b/playbooks/MERGING.md @@ -8,7 +8,7 @@ is in [DEPLOYMENT.md](DEPLOYMENT.md). ## Before you merge -1. Commit messages start with a JIRA issue key, for example `BAI-1129 ...`. Enforced by `.github/workflows/check-commit-message.yml` (exempt: `Bump`, `Merge`, `Revert`, `Reapply`, `fix(security):`, `[Aikido]`, `build(deps): bump`, `chore(deps): bump`, `chore(deps-dev): bump`; Dependabot PRs skip the key check, pushes are always checked). The same workflow rejects AI attribution in commits and the PR description. +1. Commit messages start with a JIRA issue key, for example `BAI-1129 ...`. Enforced by `.github/workflows/check-commit-message.yml` (exempt: `Bump`, `Merge`, `Revert`, `Reapply`, `fix(security):`, `[Aikido]`, `build(deps): bump`; Dependabot PRs skip the key check, pushes are always checked). The same workflow rejects AI attribution in commits and the PR description. 2. `Build and Test` is green by convention; the ruleset has no `required_status_checks`, so GitHub does not block a merge on it: pre-commit (ruff, mypy `--strict`, bandit, detect-secrets), then the pytest suite (`.github/workflows/build_and_test.yml`, `.pre-commit-config.yaml`). 3. `PR Architecture Review` has run (`.github/workflows/pr-architecture-review.yml`, reusable workflow from `icanbwell/.github`). It does not block merge by ruleset (no `required_status_checks`). 4. A change to `AGENTS.md` or `CLAUDE.md` needs `@icanbwell/enterprise-architecture` review (`CODEOWNERS`). That is a convention, not enforced: the `main` ruleset has `require_code_owner_review: false`, so another person's approval satisfies GitHub, but request the owner anyway (`gh api repos/icanbwell/language-model-common/rules/branches/main`, 2026-10-11).