Skip to content

feat(start): announce auto-merge default before the run#76

Merged
OGtwelve merged 2 commits into
mainfrom
feat/automerge-notice-73
Jun 30, 2026
Merged

feat(start): announce auto-merge default before the run#76
OGtwelve merged 2 commits into
mainfrom
feat/automerge-notice-73

Conversation

@OGtwelve

@OGtwelve OGtwelve commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Auto-merge is on by default and merges PRs via a gh subprocess — outside Claude Code's tool boundary, so a host repo's git-guard hook can't intercept it. start now prints a banner when auto-merge is active, making the default explicit and pointing at the off switch. Per the chosen direction, the default stays ON (non-breaking).

Changes

  • src/cli/commands.ts — new exported autoMergeNotice(autoMerge) helper; runStart prints it (via a new optional stdout seam on StartCtx) before launching the loop.
  • docs/commands/start.md — new "Auto-merge" section documenting the default, the banner, and how to disable.

Testing

  • New tests in src/cli/commands.test.ts: pure autoMergeNotice on/off, plus runStart emits the banner by default and suppresses it under --no-automerge.
  • bun test + node --test green; biome check and tsc --noEmit clean.

Closes #73

Summary by CodeRabbit

  • New Features

    • Added an auto-merge notice when starting a PR workflow, so you can see when merges will happen automatically after checks pass.
    • Improved start behavior to support opening PRs without auto-merging, with clear guidance on how to finish later.
  • Documentation

    • Updated the start command docs with the new auto-merge behavior and the option to disable it.

auto-merge is on by default and merges via a gh subprocess, outside Claude Code's tool boundary, so a host repo's git-guard hook can't intercept it. Print a banner at start when auto-merge is active, pointing at --no-automerge, and document the behavior.

Closes #73
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 92409219-a863-4e5d-aa5e-338cd68b94d9

📥 Commits

Reviewing files that changed from the base of the PR and between 507cd4b and 1f4d9b0.

📒 Files selected for processing (3)
  • packages/aitm/docs/commands/start.md
  • packages/aitm/src/cli/commands.test.ts
  • packages/aitm/src/cli/commands.ts
📝 Walkthrough

Walkthrough

Adds a autoMergeNotice(autoMerge: boolean) helper that returns a formatted warning banner or null. StartCtx gains an optional stdout sink. runStart emits the notice before runLoop. Tests cover banner presence/absence. Docs describe the auto-merge default and opt-out flags.

Auto-merge notice banner

Layer / File(s) Summary
autoMergeNotice helper and runStart wiring
packages/aitm/src/cli/commands.ts
StartCtx gets an optional stdout callback; autoMergeNotice returns a multi-line warning or null; runStart emits it via ctx.stdout or process.stdout before runLoop.
Tests for banner behavior
packages/aitm/src/cli/commands.test.ts
Imports autoMergeNotice; adds unit tests for the helper's return values and two integration-style tests asserting runStart stdout output with and without autoMerge.
Docs
packages/aitm/docs/commands/start.md
New ### Auto-merge subsection documents default behavior, the gh subprocess merge path, banner text, and --no-automerge / autoMerge: false opt-out.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related issues

Possibly related PRs

Suggested labels

claudetm

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: announcing the default auto-merge behavior before start runs.
Linked Issues check ✅ Passed The changes match issue #73 by surfacing auto-merge in start output and documenting the existing opt-out path.
Out of Scope Changes check ✅ Passed The PR stays focused on auto-merge notice, docs, and tests with no obvious unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/automerge-notice-73

Comment @coderabbitai help to get the list of available commands.

Match the consuming-tool message: state that merges run via gh (outside Claude Code's tool boundary, so host git-guard hooks can't intercept them) and offer the persistent disable (aitm config set autoMerge false), not just --no-automerge. Tests assert the full contract; docs updated.
@OGtwelve OGtwelve merged commit 78b9937 into main Jun 30, 2026
3 checks passed
@OGtwelve OGtwelve deleted the feat/automerge-notice-73 branch June 30, 2026 01:29
@OGtwelve OGtwelve mentioned this pull request Jun 30, 2026
OGtwelve added a commit that referenced this pull request Jun 30, 2026
Release 0.0.8 — bumps `aitm` + `@developerz.ai/ai-claude-compat` to
0.0.8 (lockstep) and the aitm→compat dep pin.

## Included since 0.0.7
- #74 — open a PR for committed work when a later task blocks
(multi-task reliability)
- #75 — anchor the PR title on the group goal, not the last task's
commit message
- #76 — announce the auto-merge default + git-guard bypass before the
run

Merging this and cutting GitHub Release `v0.0.8` triggers the OIDC npm
publish for both packages.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Bumped the `@developerz.ai/ai-claude-compat` package version to
`0.0.8`.
  * Updated the `@developerz.ai/aitm` package version to `0.0.8`.
* Aligned the `aitm` package to use the latest compatible
`ai-claude-compat` release.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: marshall <marshall@developerz.ai>
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.

Reconsider auto-merge-on-by-default: subprocess merges bypass host git-guard hooks

1 participant