Skip to content

ci(commits): check conventional commit style and dispatch the compaction bot - #755

Merged
davide221 merged 2 commits into
Luce-Org:mainfrom
Graffioh:ci/compact-merge-bot
Sep 23, 2026
Merged

davide221 merged 2 commits into
Luce-Org:mainfrom
Graffioh:ci/compact-merge-bot

Conversation

@Graffioh

@Graffioh Graffioh commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

What

Two workflows for commit history.

1. Commit style check: commit-style.yml (no LLM)

It checks every non-merge commit in a PR with a plain regex (.github/ci/check_commit_messages.py):

  • Subject format: type(scope): summary, where type is one of feat, fix, perf, refactor, docs, test, bench, build, ci, chore, revert (CONTRIBUTING's list plus build/revert, which main already uses).
  • Scope: required and lowercase, e.g. fix(server): .... A bare fix: ... fails.
  • Length and punctuation: subject ≤ 100 characters, no trailing period, and a blank line before the body.
  • Allowed as is: GitHub's Revert "..." subjects and merge commits.

These limits come from the last 600 commits on main: 105 subjects exceed 72 characters, 3 exceed 100, none end with a period, and every scope is lowercase. 36 of those 600 have no scope and would now fail. On real history it passes #743 and #733 and flags #738's four ggml-cuda: ... / harness: ... subjects. Failures point to the compact-commits label.

2. Compaction bot trigger: compact-commits.yml

Adding the compact-commits label forwards the PR to the commit compaction bot, which runs outside this repository.

  • What this workflow does: it only forwards the request. It checks out and runs nothing, and has permissions: {}.
  • What the bot does:
    • re-checks the request: write access, PR open, not a draft, still labelled;
    • folds the commits into a few conventional commits without changing the code (the tree hash is verified);
    • validates each message with this repo's check_commit_messages.py;
    • force-pushes under a lease on the old head, comments the old-to-new mapping, and removes the label.
    • It never merges.

Setup

  • Secrets LUCEBOX_BOTS_DISPATCH_TOKEN and LUCEBOX_BOTS_DISPATCH_REPO (see the maintainers' setup notes).
  • Delete the now unused COMPACT_BOT_TOKEN, OPENROUTER_API_KEY and COMPACT_MODEL secrets.
  • compact-commits label.

Testing

  • 16 style-check tests. CI runs them in the uv-workspace job.
  • Checked the forwarded request's body against a nonexistent target, so nothing was triggered.

🤖 Generated with Claude Code

@Graffioh
Graffioh force-pushed the ci/compact-merge-bot branch from f75eddb to 7051e5c Compare September 23, 2026 12:19
@Graffioh Graffioh changed the title ci(merge): fold pull request commits when a maintainer merges ci: fold pull request commits when the compact label is added Sep 23, 2026
@Graffioh Graffioh changed the title ci: fold pull request commits when the compact label is added feat(ci): fold pull request commits when the compact label is added Sep 23, 2026
@Graffioh
Graffioh force-pushed the ci/compact-merge-bot branch 2 times, most recently from 8dfe893 to 2824081 Compare September 23, 2026 12:41
@Graffioh Graffioh added compact-commits Set when you want to run LLM to compact commit history. and removed compact-commits Set when you want to run LLM to compact commit history. labels Sep 23, 2026
@Graffioh
Graffioh force-pushed the ci/compact-merge-bot branch 2 times, most recently from c044724 to e866091 Compare September 23, 2026 13:01
@Graffioh

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@Graffioh cubic can't start this review because your workspace has reached its free monthly review limit. cubic has reviewed 162,810 of the 160,000 allowed lines of code this month. Reviews resume on 1 October 2026 (in 8 days). Paid plans include much higher monthly review limits. Upgrade now to resume reviews.

To help optimise your usage, you can tune cubic to get the most out of your usage limits:

Learn more →

@Graffioh
Graffioh marked this pull request as ready for review September 23, 2026 13:06
@Graffioh
Graffioh marked this pull request as draft September 23, 2026 13:07
@Graffioh
Graffioh force-pushed the ci/compact-merge-bot branch from e866091 to 7d07322 Compare September 23, 2026 13:16
@Graffioh Graffioh changed the title feat(ci): fold pull request commits when the compact label is added ci: check conventional commit style and dispatch the compaction bot Sep 23, 2026
@Graffioh
Graffioh force-pushed the ci/compact-merge-bot branch 2 times, most recently from 274e94c to be99bdd Compare September 23, 2026 13:25
@Graffioh
Graffioh marked this pull request as ready for review September 23, 2026 13:32
Graffioh and others added 2 commits September 23, 2026 14:01
…ion bot

Commit style (commit-style.yml) checks every non-merge commit in a pull
request. Subjects must look like `type(scope): summary`, with a type
from CONTRIBUTING.md plus build and revert and a lowercase scope. They
must be at most 100 characters with no trailing period, and a blank
line must separate the subject from the body. GitHub's `Revert "..."`
subjects pass as they are.

Compact commits (compact-commits.yml) forwards a pull request to the
commit compaction bot when a maintainer adds the `compact-commits`
label; it checks out and runs nothing. The bot folds the commits into a
few conventional commits without changing the code, validates the
messages with this repository's check_commit_messages.py, force-pushes,
and comments the old-to-new mapping. It never merges.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s label

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Graffioh
Graffioh force-pushed the ci/compact-merge-bot branch from be99bdd to 1c7be1e Compare September 23, 2026 14:01
@Graffioh Graffioh changed the title ci: check conventional commit style and dispatch the compaction bot ci(commits): check conventional commit style and dispatch the compaction bot Sep 23, 2026
@davide221
davide221 merged commit 006ad65 into Luce-Org:main Sep 23, 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.

2 participants