less duplication between enable and configure#950
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the setup/enable flows to reduce duplication between entire enable and entire configure, and fixes the previously inconsistent behavior where entire configure --force only worked reliably when combined with --agent.
Changes:
- Adds a routing helper so
entire enablecan delegate to the setup/configure path when “setup-mutating” flags are used. - Updates agent management to support forced hook reinstall for already-installed agents (
--force). - Adds unit + integration tests covering the new routing behavior and forced hook rewrites (Claude hooks).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| cmd/entire/cli/setup.go | Adds enableUsesSetupFlow, adjusts enable routing, and enables forced reinstalls in agent management. |
| cmd/entire/cli/setup_test.go | Adds unit tests for routing and for --force causing a reinstall in manage-agents flow. |
| cmd/entire/cli/integration_test/setup_claude_hooks_test.go | Adds integration tests verifying --force rewrites stale Claude hooks for both configure and enable --agent. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 957163b. Configure here.
Entire-Checkpoint: 40cfbd5e6b3d
Entire-Checkpoint: 8c56f58bd260
Entire-Checkpoint: 9a3ef49f415c
Entire-Checkpoint: a019e88b2e24
Entire-Checkpoint: 1459b75f2053
af08164 to
81fab8d
Compare
Entire-Checkpoint: 717c5e68e8a8
pjbgf
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This fixes an issue with
entire configure --forcenot working only if you add--agentit worked, it now works in both cases.Also while we at it let's remove some duplication and make
entire enableuse the same code path asentire configureexcept for theenablingpart.Note
Medium Risk
Changes
entire enablecontrol flow on already-configured repos and alters hook installation behavior when--forceis used, which could impact users’ existing agent hook setups. Risk is mitigated by added unit/integration coverage around the new routing and hook rewrite behavior.Overview
Unifies behavior between
entire enableandentire configureon repos that are already set up: when any setup-mutating flag is present (e.g.--force, strategy flags, telemetry, absolute hook path),enablenow routes through the same manage/configure flow instead of the lightweight “already enabled” path.Extends agent management to treat
--forceas a reinstall for already-selected agents, rewriting Entire-managed hooks (e.g. restoring the canonical ClaudeStophook) rather than reporting “No changes made.” Adds targeted unit and integration tests to validate--forcerouting and stale hook rewrite behavior for Claude Code.Reviewed by Cursor Bugbot for commit 957163b. Configure here.