Skip to content

less duplication between enable and configure#950

Merged
Soph merged 6 commits intomainfrom
soph/unify-enable-configure
Apr 14, 2026
Merged

less duplication between enable and configure#950
Soph merged 6 commits intomainfrom
soph/unify-enable-configure

Conversation

@Soph
Copy link
Copy Markdown
Collaborator

@Soph Soph commented Apr 14, 2026

This fixes an issue with entire configure --force not working only if you add --agent it worked, it now works in both cases.

Also while we at it let's remove some duplication and make entire enable use the same code path as entire configure except for the enabling part.


Note

Medium Risk
Changes entire enable control flow on already-configured repos and alters hook installation behavior when --force is 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 enable and entire configure on repos that are already set up: when any setup-mutating flag is present (e.g. --force, strategy flags, telemetry, absolute hook path), enable now routes through the same manage/configure flow instead of the lightweight “already enabled” path.

Extends agent management to treat --force as a reinstall for already-selected agents, rewriting Entire-managed hooks (e.g. restoring the canonical Claude Stop hook) rather than reporting “No changes made.” Adds targeted unit and integration tests to validate --force routing and stale hook rewrite behavior for Claude Code.

Reviewed by Cursor Bugbot for commit 957163b. Configure here.

@Soph Soph requested a review from a team as a code owner April 14, 2026 10:49
Copilot AI review requested due to automatic review settings April 14, 2026 10:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 enable can 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.

Comment thread cmd/entire/cli/setup.go
Comment thread cmd/entire/cli/setup.go Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ 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.

Comment thread cmd/entire/cli/setup.go Outdated
Comment thread cmd/entire/cli/setup.go Outdated
Soph added 5 commits April 14, 2026 13:25
Entire-Checkpoint: 40cfbd5e6b3d
Entire-Checkpoint: 8c56f58bd260
Entire-Checkpoint: 9a3ef49f415c
Entire-Checkpoint: a019e88b2e24
Entire-Checkpoint: 1459b75f2053
@Soph Soph force-pushed the soph/unify-enable-configure branch from af08164 to 81fab8d Compare April 14, 2026 11:38
Entire-Checkpoint: 717c5e68e8a8
@Soph Soph merged commit e00b0f9 into main Apr 14, 2026
9 checks passed
@Soph Soph deleted the soph/unify-enable-configure branch April 14, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants