feat(start): announce auto-merge default before the run#105
Conversation
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
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughA new ChangesAuto-merge warning banner
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
src/claude_task_master/cli_commands/workflow.pytests/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.
|
@coderabbitai review |
✅ Action performedReview finished.
|
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>
Summary
Auto-merge is on by default and merges PRs via a
ghsubprocess — outside Claude Code's tool boundary, so a host repo's git-guard hook can't intercept it.startnow 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— newauto_merge_notice(auto_merge)helper;startprints it right after the run header when auto-merge is on.Testing
tests/cli/test_start_command.py: pureauto_merge_noticeon/off, plusstartshows the banner by default and suppresses it under--no-auto-merge.pytest,ruff check,ruff format --check, andmypy .clean.Closes #104
Summary by CodeRabbit