[PR #473] Harden install script tests and Claude hook validation #494

Closed
opened 2026-03-02 04:13:47 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/473

State: closed
Merged: No


Ensures installer tests run against the root install scripts and improves the Claude hook validation logic to reduce false failures across CI environments.

Changes Made

  • Resolve the repository root in tests/install/install-script.sh so tests always invoke the top-level install.sh.
  • Remove the unused install.sh copy step from the shell-detection BATS setup.
  • Parse ~/.claude/settings.json to validate the installed git-ai hook command by tokenizing the command line and verifying it references the installed binary path.

Testing

  • SHELL_NAME=bash bash tests/install/install-script.sh (fails in this sandbox due to usegitai.com DNS resolution)
Original prompt

This section details on the original issue you should resolve

<issue_title>Automate testing of install scripts</issue_title>
<issue_description>- [ ] Linux

  • Mac
  • Windows
  • Github Actions</issue_description>

<agent_instructions>Git AI has install scripts (install.sh and install.ps1) that install git ai on the machine. We should test that they work properly in both commits/prs as well as nightly.

Make sure to test with various options, all platforms, all common shells, include agent integration tests (so figure out how to ensure we install at least claude code to test that install-hooks runs and updates hooks config properly), and run tests after the script runs to ensure that git-ai is properly installed (env updated properly for the setup shells, git-ai runs, correct version, etc.).</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/473 **State:** closed **Merged:** No --- Ensures installer tests run against the root install scripts and improves the Claude hook validation logic to reduce false failures across CI environments. ## Changes Made - Resolve the repository root in `tests/install/install-script.sh` so tests always invoke the top-level `install.sh`. - Remove the unused `install.sh` copy step from the shell-detection BATS setup. - Parse `~/.claude/settings.json` to validate the installed git-ai hook command by tokenizing the command line and verifying it references the installed binary path. ## Testing - `SHELL_NAME=bash bash tests/install/install-script.sh` (fails in this sandbox due to `usegitai.com` DNS resolution) <!-- START COPILOT ORIGINAL PROMPT --> <details> <summary>Original prompt</summary> > > ---- > > *This section details on the original issue you should resolve* > > <issue_title>Automate testing of install scripts</issue_title> > <issue_description>- [ ] Linux > - [ ] Mac > - [ ] Windows > - [ ] Github Actions</issue_description> > > <agent_instructions>Git AI has install scripts (install.sh and install.ps1) that install git ai on the machine. We should test that they work properly in both commits/prs as well as nightly. > > Make sure to test with various options, all platforms, all common shells, include agent integration tests (so figure out how to ensure we install at least claude code to test that install-hooks runs and updates hooks config properly), and run tests after the script runs to ensure that git-ai is properly installed (env updated properly for the setup shells, git-ai runs, correct version, etc.).</agent_instructions> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> <!-- START COPILOT CODING AGENT SUFFIX --> - Fixes git-ai-project/git-ai#67 <!-- START COPILOT CODING AGENT TIPS --> --- 💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs. <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/473" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
kerem 2026-03-02 04:13:47 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#494
No description provided.