Skip to content

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

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

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

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 prominent banner when auto-merge is active, pointing at the off switch. The default stays ON (non-breaking).

Changes

  • cli_commands/workflow.py — new auto_merge_notice(auto_merge) helper; start prints it right after the run header when auto-merge is on.

Testing

  • New tests in tests/cli/test_start_command.py: pure auto_merge_notice on/off, plus start shows the banner by default and suppresses it under --no-auto-merge.
  • pytest, ruff check, ruff format --check, and mypy . clean.

Closes #104

Summary by CodeRabbit

  • New Features
    • The start command now displays a yellow warning banner indicating auto-merge is enabled.
    • The banner is suppressed when auto-merge is disabled (including via the no-auto-merge option and related configuration).
  • Tests
    • Added coverage to verify banner content and that startup output includes (or omits) the banner appropriately.

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-auto-merge.

Closes #104
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 6d15811a-d7ff-4ee8-bc6b-4e942e736543

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

A new auto_merge_notice helper is added to workflow.py that returns a warning banner string when auto-merge is enabled, or None when disabled. The start command is updated to call this helper and print the banner when present. Matching unit and CLI tests validate both the helper output and the command's banner behavior.

Changes

Auto-merge warning banner

Layer / File(s) Summary
auto_merge_notice helper and start command integration
src/claude_task_master/cli_commands/workflow.py
Adds auto_merge_notice(auto_merge: bool) -> str | None returning a formatted warning string when auto-merge is on, and wires it into the start command to print the banner immediately after the startup lines.
Unit and CLI tests for auto-merge banner
tests/cli/test_start_command.py
Imports auto_merge_notice and adds tests asserting the helper returns the expected banner text when True and None when False, plus CLI-level tests confirming the banner appears by default and is suppressed with --no-auto-merge.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

🚥 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 describes the main user-facing change: announcing auto-merge before the run starts.
Linked Issues check ✅ Passed The PR surfaces auto-merge prominently at startup and mentions both the subprocess behavior and the disable paths requested in #104.
Out of Scope Changes check ✅ Passed The changes stay focused on the auto-merge warning banner and its tests, with no clear unrelated additions.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 60.00%.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/automerge-notice-104

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/claude_task_master/cli_commands/workflow.py`:
- Around line 33-35: The auto-merge banner in the workflow output is missing the
hook-bypass warning, so update the message returned by the relevant
workflow/banner helper to explicitly mention that merges run through gh outside
Claude Code’s tool boundary and that auto-merge can be disabled persistently.
Keep the existing auto-merge/--no-auto-merge guidance, but expand the text so
operators see the full warning in the banner.

In `@tests/cli/test_start_command.py`:
- Around line 48-85: The start-command tests only assert that
auto_merge_notice() is present or absent, so they miss regressions in the full
operator warning contract. Update test_auto_merge_notice_helper,
test_start_shows_auto_merge_banner_by_default, and
test_start_no_auto_merge_suppresses_banner to assert the complete banner content
from auto_merge_notice() and the start workflow output, including the
gh/tool-boundary warning and the persistent disable hint tied to
auto_merge_notice and app.invoke. Keep the tests deterministic by checking the
exact returned string/expected substrings rather than just the ON/OFF state.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 86c0b999-484a-4321-8ee6-753206da2c7a

📥 Commits

Reviewing files that changed from the base of the PR and between 56399c9 and 1e8024e.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • src/claude_task_master/cli_commands/workflow.py
  • tests/cli/test_start_command.py

Comment thread src/claude_task_master/cli_commands/workflow.py Outdated
Comment thread tests/cli/test_start_command.py
Per review: the banner now states that merges run via gh (outside Claude Code's tool boundary, so host git-guard hooks can't intercept them) and offers the persistent disable (config-update --no-auto-merge), not just the per-run flag. Tests assert the full warning contract.
@OGtwelve

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@OGtwelve OGtwelve merged commit 582eed8 into main Jun 30, 2026
8 checks passed
@OGtwelve OGtwelve deleted the feat/automerge-notice-104 branch June 30, 2026 01:28
@OGtwelve OGtwelve mentioned this pull request Jun 30, 2026
OGtwelve added a commit that referenced this pull request Jun 30, 2026
Release 0.1.51.

## Included since 0.1.50
- #104 / #105 — auto-merge start banner that spells out the
`gh`/git-guard bypass and offers both `--no-auto-merge` and the
persistent `config-update --no-auto-merge`.

Merging this and pushing tag `v0.1.51` triggers the OIDC PyPI publish.

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

## Summary by CodeRabbit

* **Documentation**
* Added release notes for version 0.1.51, including the new auto-merge
banner shown at the start of a run.
  * Updated the changelog comparison links for the latest release.

* **Chores**
  * Bumped the package version to 0.1.51.

<!-- 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