Skip to content

fix(baseline): Keep the --pr branch check lenient for Dependabot - #41

Merged
mpaulosky merged 1 commit into
mainfrom
fix/40-dependabot-branch-pr-form
Nov 10, 2026
Merged

mpaulosky merged 1 commit into
mainfrom
fix/40-dependabot-branch-pr-form

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Fixes R11 from the pre-push review of mpaulosky/TicketManager#263 (see #40).

#37 made the Branch name check accept only A-Za-z0-9._- in a dependabot/* name, in both forms. The --pr form accepted any dependabot/* before, so a Dependabot PR whose branch carries another character (a scoped npm package's @, a version's +) would fail the required Branch name check. All 146 real Dependabot branch names in the Fleet match the pattern, but none is an ungrouped scoped npm package, so the data neither confirms nor rules it out.

  • --pr takes any dependabot/* again, as before chore(baseline): Let the hook accept dependabot/* so a person can fix a Dependabot PR #37; CI quotes the name.
  • The hook form stays shell-safe and now also takes @ and +.
  • Tests: @ and + in the first and later segments, --pr leniency, and refused dependabot/, dependabot/a/, dependabot//a, Dependabot/x, claude/dependabot/x, xdependabot/a and a name with a newline. Five mutations (+ to * in each segment, dropping @/+, dropping the --pr branch, unanchoring) each fail a test.
  • references/git-hooks.md updated. scripts/check-branch-name.sh copied over; scripts/gate.sh and the Sandcastle check pass.

Left in #40: R3-R9, R19 and the rest.

Rollout: scripts/check-branch-name.sh and its test are Owned files, so this reaches the Fleet by a Rollout. TicketManager's re-Apply (#263) is waiting for it.

🤖 Generated with Claude Code

…widen the hook's shell-safe class

#37 made the CI Branch name job refuse a dependabot/* name with a character outside A-Za-z0-9._-.
The --pr form takes any dependabot/* again; the hook form also takes '@' and '+'.

Refs #40

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 20:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the Dependabot branch-handling changes.

No open issues 🎉

What changed in this PR

Restores lenient Dependabot branch handling in the Baseline’s --pr check, preventing character restrictions from blocking Dependabot PRs. The Template changes reach Applications through a Rollout.

Changes:

  • Accepts any dependabot/* name with --pr, while retaining shell-safe hook validation and adding support for @ and +.
  • Adds regression cases for allowed characters, PR-only leniency, malformed names, and prefix anchoring.
  • Updates the hook reference and synchronizes the Factory’s script with the Template.
File Description
scripts/​check-branch-name.sh Synchronizes the Factory’s branch check with the Template.
.claude/​skills/​repo-ci-baseline/​template/​owned/​scripts/​tests/​check-branch-name.test.sh Adds Dependabot character and boundary cases.
.claude/​skills/​repo-ci-baseline/​template/​owned/​scripts/​check-branch-name.sh Restores --pr leniency and expands hook-safe characters.
.claude/​skills/​repo-ci-baseline/​references/​git-hooks.md Documents the distinct CI and hook acceptance rules.

Review effort: Balanced

@mpaulosky
mpaulosky merged commit aba77f9 into main Nov 10, 2026
9 checks passed
@mpaulosky
mpaulosky deleted the fix/40-dependabot-branch-pr-form branch November 10, 2026 20:09
mpaulosky added a commit to mpaulosky/TicketManager that referenced this pull request Nov 10, 2026
## Why

Re-Apply the repo-ci-baseline Template so this repo carries the Template
changes from mpaulosky/Application_Factory#36,
mpaulosky/Application_Factory#37, mpaulosky/Application_Factory#38 and
mpaulosky/Application_Factory#39.

## What changed

- `f1d2468` Apply commit, `apply.sh` output alone: brings
mpaulosky/Application_Factory#36, mpaulosky/Application_Factory#37,
mpaulosky/Application_Factory#38 and mpaulosky/Application_Factory#39.
  - `.claude/rules/sandcastle-hand-off.md`
  - `.github/scripts/tests/pr-automerge.test.mjs`
  - `.github/workflows/lint-actions.yml`
  - `.github/workflows/pr-automerge.yml`
  - `.github/workflows/sandcastle.yml`
  - `.sandcastle/lib/branches.mts`
  - `.sandcastle/lib/branches.test.mts`
  - `.sandcastle/lib/review-ledger.mts`
  - `.sandcastle/lib/review-ledger.test.mts`
  - `.sandcastle/lib/role-logs.mts`
  - `.sandcastle/lib/role-logs.test.mts`
  - `scripts/check-branch-name.sh`
  - `scripts/tests/check-branch-name.test.sh`

## Verification

- The Apply commit is exactly `apply.sh`'s output on a branch up to date
with `main`.
- The pre-push gate (`scripts/gate.sh`) passed on `f1d2468`.

- `427f43e` Apply commit, `apply.sh` output alone: brings
mpaulosky/Application_Factory#36, mpaulosky/Application_Factory#37,
mpaulosky/Application_Factory#38, mpaulosky/Application_Factory#39,
mpaulosky/Application_Factory#41 and mpaulosky/Application_Factory#42.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
mpaulosky added a commit that referenced this pull request Nov 11, 2026
…pilot request with no login (#48)

## Why

Issue #40 lists findings from the pre-push review of TicketManager's
re-Apply. R11 was already fixed by #41; R19 and R7 were not.

## What changed

- `docs/PROCESS.md` (Owned): says the pre-push hook also allows
shell-safe `dependabot/*` names, and which names the Branch name check
allows (R19).
- `pr-automerge.test.mjs` (Owned): two review-request events with no
reviewer login are not taken for Copilot's (R7). The code already
handled them; this adds coverage.

Rollout: both are Owned files, so they reach the Fleet by a Rollout
(`rollout.sh`), not by themselves.

## Verification

`scripts/gate.sh` (with `GATE_SKIP_REVIEW=1`) passes; `node --test` on
`pr-automerge.test.mjs` passes (403). Local pre-push review: 3 rounds, 2
Advisory findings, both fixed.

Fixes #40

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
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