LearnNewsExamplesServices
Frontmatter
id7583
titleImplement Abort-on-Startup if Health Check Fails
stateClosed
labels
enhancementai
assigneestobiu
createdAtOct 20, 2025, 3:37 PM
updatedAtOct 20, 2025, 3:44 PM
githubUrlhttps://github.com/neomjs/neo/issues/7583
authortobiu
commentsCount0
parentIssue7564
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtOct 20, 2025, 3:44 PM

Implement Abort-on-Startup if Health Check Fails

Closed v11.0.0 enhancementai
tobiu
tobiu commented on Oct 20, 2025, 3:37 PM

To ensure the github-workflow server is always in a valid state, it should perform a comprehensive health check upon startup and refuse to run if its critical dependencies are not met. This prevents any tool from executing in a broken environment.

This will be achieved by leveraging the existing HealthService.

Acceptance Criteria

  1. The main() function in ai/mcp/server/github-workflow/mcp-stdio.mjs is updated.
  2. It must import the HealthService.
  3. Before the server connects to the transport, it must call HealthService.healthcheck().
  4. It must inspect the response payload from the health check.
  5. If payload.status is 'unhealthy', the server must: a. Log a clear error message to stderr indicating that the server is aborting. b. Log the detailed reasons for the failure from payload.githubCli.details. c. Terminate the process with a non-zero exit code (e.g., process.exit(1)).

Benefits

  • Fail-Fast Principle: The server aborts immediately if its dependencies (like gh CLI) are not correctly installed, authenticated, and versioned.
  • Robustness: Prevents any tool from being called when the server is in an invalid state.
  • Clear Errors: Provides immediate, actionable feedback to the user if their environment is not configured correctly.
  • DRY: Reuses the existing, comprehensive logic in HealthService instead of duplicating checks.
tobiu assigned to @tobiu on Oct 20, 2025, 3:37 PM
tobiu added the enhancement label on Oct 20, 2025, 3:37 PM
tobiu added parent issue #7564 on Oct 20, 2025, 3:37 PM
tobiu added the ai label on Oct 20, 2025, 3:37 PM
tobiu referenced in commit 207320e - "Implement Abort-on-Startup if Health Check Fails #7583" on Oct 20, 2025, 3:44 PM
tobiu closed this issue on Oct 20, 2025, 3:44 PM