Skip to content

fix(copilot): DetectPresence delegates to AreHooksInstalled#590

Merged
peyton-alt merged 2 commits intoalex/add-copilot-agentfrom
peyton/copilot-detect-presence-fix
Mar 3, 2026
Merged

fix(copilot): DetectPresence delegates to AreHooksInstalled#590
peyton-alt merged 2 commits intoalex/add-copilot-agentfrom
peyton/copilot-detect-presence-fix

Conversation

@peyton-alt
Copy link
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 3, 2026 22:16
@cursor
Copy link

cursor bot commented Mar 3, 2026

PR Summary

Low Risk
Low risk: changes are limited to Copilot CLI agent presence detection and its unit tests/documentation, with no effect on session I/O or hook installation logic.

Overview
Updates Copilot CLI agent DetectPresence to stop treating .github/hooks/ as sufficient and instead report presence only when AreHooksInstalled finds Entire hook entries in .github/hooks/entire.json.

Adjusts tests to cover the new behavior (no hooks dir, hooks dir without entire.json, and entire.json containing an Entire command), and updates the Copilot CLI integration doc to reflect the stricter detection rule.

Written by Cursor Bugbot for commit 3516afb. Configure here.

Copy link
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

Updates Copilot CLI agent presence detection to only report “present” when Entire-managed Copilot CLI hooks are actually installed (via .github/hooks/entire.json), aligning detection behavior with the hook installation logic.

Changes:

  • Change DetectPresence to delegate to AreHooksInstalled (instead of checking only for a .github/hooks directory).
  • Expand/adjust unit tests to cover “hooks dir exists but no entire.json” vs “entire.json contains Entire hooks”.
  • Update Copilot CLI agent documentation to describe the new presence detection criteria.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
cmd/entire/cli/agent/copilotcli/copilotcli.go Makes presence detection rely on AreHooksInstalled for accurate detection of Entire hooks.
cmd/entire/cli/agent/copilotcli/copilotcli_test.go Updates/extends tests to validate presence detection based on entire.json contents, not just directory existence.
cmd/entire/cli/agent/copilotcli/AGENT.md Documents the new presence detection behavior and the required hook prefixes.

@peyton-alt peyton-alt marked this pull request as ready for review March 3, 2026 23:14
@peyton-alt peyton-alt requested a review from a team as a code owner March 3, 2026 23:14
@peyton-alt peyton-alt merged commit 2a90c86 into alex/add-copilot-agent Mar 3, 2026
3 checks passed
@peyton-alt peyton-alt deleted the peyton/copilot-detect-presence-fix branch March 3, 2026 23:40
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