-
-
Notifications
You must be signed in to change notification settings - Fork 195
Closed
Description
Summary
Reproduce startup behavior when the GitHub CLI (gh) is entirely absent or not on the PATH; add unit tests for HealthService, implement an explicit ENOENT detection and a small non-blocking retry/backoff so the server recovers when gh becomes available, and add a short runbook/docs snippet with reproduction and remediation steps.
(see parent issue #7687)
To do
- Add reproducible instructions and a short script to simulate
ghbeing absent (e.g., PATH modification) underai/mcp/server/github-workflow/docs/gh-absent.md. - Add unit tests for
HealthServicethat mockchild_process.exec/execAsyncto simulate these states:ENOENT(gh not installed / not in PATH)- stdout empty + stderr-only output
- gh present but unauthenticated
- gh present but old version
- Implement code changes in
ai/mcp/server/github-workflow/services/HealthService.mjsto:- Detect
ENOENTexplicitly and log a clear, actionable message ("gh CLI not found in PATH; tools will be disabled until installed") - Return a consistent health status (degraded/unhealthy) without crashing the server
- Add a small non-blocking retry/backoff (configurable) for auth/version checks so the server can recover without restart
- Detect
- Add a short runbook/docs entry with reproduction steps and remediation commands.
Acceptance criteria
- Reproduction steps and logs included in the issue or added doc file
- Unit tests added covering the four states; tests pass locally and in CI
- HealthService code updated with ENOENT handling and retry/backoff and no server crash on startup
- PR references this issue and parent Enhance GitHub Workflow server robustness when gh cli is not installed #7687
Metadata
Metadata
Assignees
Labels
No labels