Skip to content

test(copilot-init): binary path resolution tests — parity with claude-init (#964)#1326

Merged
jpleva91 merged 1 commit intomainfrom
agent/kernel-qa-20260329-065003
Mar 29, 2026
Merged

test(copilot-init): binary path resolution tests — parity with claude-init (#964)#1326
jpleva91 merged 1 commit intomainfrom
agent/kernel-qa-20260329-065003

Conversation

@jpleva91
Copy link
Copy Markdown
Collaborator

Summary

  • PR fix(claude-init): write hooks with full binary path (closes #964) #969 fixed resolveCliPrefix() in both claude-init.ts and copilot-init.ts but only shipped tests for claude-init
  • Adds 3 symmetric tests to cli-copilot-init.test.ts covering the resolveBinary() paths:
    • npm-install: ./node_modules/.bin/agentguard is used when the binary exists locally
    • --global bypass: bare agentguard is used even when node_modules/.bin exists
    • Bare fallback: bare agentguard when no local binary is present

Test plan

  • pnpm test --filter=@red-codes/agentguard — 949/949 passing (946 → +3 new)
  • All 3 new tests verify the bash field in preToolUse hook config

🤖 Generated with Claude Code

…init parity (#964)

PR #969 fixed resolveCliPrefix() in both claude-init.ts and copilot-init.ts but
only added tests for claude-init. Add the 3 symmetric tests for copilot-init:
npm-install resolution, --global bare fallback, and no-node_modules bare fallback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jpleva91 jpleva91 merged commit 007d344 into main Mar 29, 2026
4 checks passed
@jpleva91
Copy link
Copy Markdown
Collaborator Author

Auto-merged by PR Merger Agent. All quality gates passed.

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.

1 participant