LearnNewsExamplesServices
Frontmatter
id7713
titlehealth(github-workflow): reproduce gh-absent
stateClosed
labels[]
assigneesMannXo
createdAtNov 7, 2025, 9:28 AM
updatedAtNov 8, 2025, 11:05 AM
githubUrlhttps://github.com/neomjs/neo/issues/7713
authorMannXo
commentsCount1
parentIssue7687
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 8, 2025, 11:05 AM

health(github-workflow): reproduce gh-absent

Closed v11.0.0 []
MannXo
MannXo commented on Nov 7, 2025, 9:28 AM

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 gh being absent (e.g., PATH modification) under ai/mcp/server/github-workflow/docs/gh-absent.md.
  • Add unit tests for HealthService that mock child_process.exec / execAsync to 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.mjs to:
    • Detect ENOENT explicitly 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
  • 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 #7687
tobiu added parent issue #7687 on Nov 7, 2025, 9:48 AM
tobiu assigned to @MannXo on Nov 7, 2025, 9:49 AM
tobiu
tobiu Nov 7, 2025, 9:52 AM

@MannXo Thanks for the new tickets. I assigned both to you, assuming that you want to tackle them. We are getting super close to v11 => all tests got migrated to playwright, and I fixed the combobox issues and created a faster and non-vulnerable version of jsdoc-x within the repo.

On my end, I will create the .npmignore next, and then polish the AI guides more.

MannXo cross-referenced by PR #7717 on Nov 7, 2025, 10:35 AM
tobiu closed this issue on Nov 8, 2025, 11:05 AM