Skip to content

chore(ci): rename benchmark/ branch prefix to chore/#1044

Merged
carlos-alm merged 2 commits intomainfrom
chore/rename-benchmark-branch-prefix
May 1, 2026
Merged

chore(ci): rename benchmark/ branch prefix to chore/#1044
carlos-alm merged 2 commits intomainfrom
chore/rename-benchmark-branch-prefix

Conversation

@carlos-alm
Copy link
Copy Markdown
Contributor

Summary

The benchmark workflow currently creates auto-generated PR branches under a benchmark/ prefix that is not in the local guard-git.sh allow-list. When a developer needs to push a fix to one of those PRs from a Claude Code session, the hook denies the push and the only workaround is bypassing the hook.

This PR renames all auto-generated branches to use the standard chore/ prefix and drops benchmark/ from the commitlint allow-list since no workflow creates such branches anymore.

Changes

  • .github/workflows/benchmark.yml — three BRANCH=... lines updated:
    • benchmark/v\${VERSION}-…chore/bench-v\${VERSION}-… (combined record-benchmarks job)
    • benchmark/embedding-dev-…chore/embedding-bench-dev-…
    • benchmark/embedding-v\${VERSION}-…chore/embedding-bench-v\${VERSION}-…
  • .github/workflows/commitlint.yml — drop benchmark from the branch-name regex and the human-readable error message.

The discriminator (bench, embedding-bench) is preserved so generated branches remain self-describing under the new prefix.

Context

Surfaced during /sweep on PR #1032: the benchmark workflow created benchmark/incremental-v3.9.6-… and the local guard hook blocked the push. Aligning the workflow with the guard's allow-list is cleaner than expanding the allow-list.

Test plan

  • Workflows still parse — GitHub Actions YAML validation succeeds on push.
  • Commitlint job still runs and rejects branches outside the allow-list.
  • Next benchmark run (manual workflow_dispatch or post-publish) opens a PR with a chore/... branch.

The benchmark workflow was creating PR branches under a benchmark/
prefix that is not in the guard-git.sh allow-list, blocking local
sessions from pushing fixes to those PRs without working around the
hook. Rename all auto-generated branches to use the standard chore/
prefix (chore/bench-v${VERSION}-..., chore/embedding-bench-...) and
drop benchmark/ from the commitlint allow-list since no workflow
creates such branches anymore.
@claude
Copy link
Copy Markdown

claude Bot commented May 1, 2026

Claude finished @carlos-alm's task —— View job


PR Review Complete

Todo List

  • Read and analyze changed files
  • Phase 1: Root cause analysis
  • Phase 2: Configuration change detection
  • Phase 3: Test integrity check
  • Phase 4: Code quality assessment
  • Phase 5: Backlog compliance evaluation
  • Provide final structured review

Root Cause Analysis

Problem Being Solved: Local guard-git.sh hook blocks pushes to auto-generated benchmark/* branches because that prefix is not in the hook's allow-list. This creates friction when developers need to push fixes to benchmark PRs from Claude Code sessions.

Why This Approach: Rather than expanding the allow-list to include benchmark/ (which would weaken the guard), the PR aligns the workflow with existing conventions by using the already-allowed chore/ prefix. This maintains security while removing friction.

Risk Assessment: ✅ Low risk - This fixes a legitimate workflow issue without weakening security controls.

Backlog Compliance

  • Zero-dep: ✅ — No new dependencies, pure configuration change
  • Foundation-aligned: ✅ — Fixes workflow friction without adding complexity or external dependencies
  • Problem-fit: 3 — Useful workflow improvement but doesn't directly help AI agents navigate codebases
  • Breaking: No — Purely internal workflow change, no user-facing API changes
  • Tier: 1 (zero-dep ✓ + foundation-aligned ✓)

Critical Concerns

None. This is a clean, well-motivated change that fixes real workflow friction.

Technical Review

Changes Analysis

Precise and consistent:

  • .github/workflows/benchmark.yml:85 - benchmark/v${VERSION}-...chore/bench-v${VERSION}-...
  • .github/workflows/benchmark.yml:252 - benchmark/embedding-dev-...chore/embedding-bench-dev-...
  • .github/workflows/benchmark.yml:254 - benchmark/embedding-v${VERSION}-...chore/embedding-bench-v${VERSION}-...
  • .github/workflows/commitlint.yml:35,38 - Removed benchmark from allowed branch patterns

Preserves clarity: Maintains bench vs embedding-bench discriminators so generated branches remain self-describing.

No security issues: Pure string substitutions with no command injection risks or validation bypasses.

Test Plan Validation

The provided test plan covers the essential verification steps:

  • ✅ GitHub Actions YAML validation
  • ✅ Commitlint enforcement verification
  • ✅ Next benchmark run verification

Final Recommendation

  • Rating: ⭐⭐⭐⭐☆ (4/5)
  • Action: APPROVE
  • Reasoning: Clean, well-motivated fix for real workflow friction. Changes are minimal, precise, and maintain security while improving developer experience. The PR demonstrates good understanding of the root cause and chooses the correct solution (align workflow with guards) rather than weakening security (expand allow-list).

Minor deduction: While technically excellent, this is maintenance work that doesn't advance core functionality, hence 4/5 rather than 5/5.


@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 1, 2026

Greptile Summary

This PR aligns the auto-generated benchmark PR branch names with the chore/ prefix already expected by both guard-git.sh and the commitlint branch-name check, and drops the now-unused benchmark entry from the commitlint allow-list. The three BRANCH= assignments in benchmark.yml and the regex + error message in commitlint.yml are the only changes — all logic, commit messages, and PR body templates are untouched.

Confidence Score: 5/5

Safe to merge — minimal, mechanical rename with no logic changes.

Both changed files have straightforward, correct updates. The new branch names (chore/bench-, chore/embedding-bench-) satisfy the ^(feat|fix|…|chore|…)/ pattern in both commitlint.yml and guard-git.sh. No other code paths are affected.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/benchmark.yml Three BRANCH assignments renamed from benchmark/ to chore/ prefix; logic and commit messages unchanged.
.github/workflows/commitlint.yml Drops benchmark from the branch-name regex and the human-readable error message; all other allowed prefixes are preserved.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Publish workflow succeeds] --> B[benchmark.yml triggered]
    B --> C{Job type}
    C -->|record-benchmarks| D["BRANCH = chore/bench-v{VERSION}-{timestamp}"]
    C -->|embedding-benchmark| E{VERSION = dev?}
    E -->|yes| F["BRANCH = chore/embedding-bench-dev-{timestamp}"]
    E -->|no| G["BRANCH = chore/embedding-bench-v{VERSION}-{timestamp}"]
    D --> H[git push + gh pr create]
    F --> H
    G --> H
    H --> I[commitlint.yml validates branch]
    I --> J{"BRANCH matches ^(feat|fix|docs|refactor|test|chore|ci|perf|build|release|dependabot|revert)/"}
    J -->|✅ chore/ matches| K[Branch valid — PR proceeds]
    J -->|❌ benchmark/ would have failed| L[guard-git.sh also blocks push]
Loading

Reviews (2): Last reviewed commit: "Merge branch 'main' into chore/rename-be..." | Re-trigger Greptile

@carlos-alm carlos-alm merged commit 16dc216 into main May 1, 2026
21 checks passed
@carlos-alm carlos-alm deleted the chore/rename-benchmark-branch-prefix branch May 1, 2026 07:44
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant