Skip to content

Conversation

@shadowfax92
Copy link
Contributor

No description provided.

@claude
Copy link

claude bot commented Jan 30, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 30, 2026

Greptile Overview

Greptile Summary

This PR removes the health watchdog feature that previously self-terminated the server when no health checks were received within 90 seconds. The watchdog was designed to prevent orphaned server processes when Chrome crashed or multiple instances existed.

Major changes:

  • Removed HealthWatchdog class and all related initialization/lifecycle code
  • Simplified /health endpoint to return status without recording checks
  • Deleted healthWatchdog parameter from HttpServerConfig interface
  • Removed all watchdog tests (both unit and integration)

Minor issues:

  • Empty lines left behind after removing imports and properties in main.ts and types.ts
  • Unused watchdog timeout constants remain in packages/shared/src/constants/timeouts.ts (lines 42-45)

The removal is clean and complete in the server code, following the principle of removing dead code rather than leaving it in the codebase.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The watchdog removal is complete and clean. All references are removed from server code, tests are deleted, and the feature is cleanly excised. Only minor style issues remain (empty lines and unused constants in shared package)
  • Check packages/shared/src/constants/timeouts.ts to remove unused watchdog constants

Important Files Changed

Filename Overview
apps/server/src/api/routes/health.ts Simplified health route by removing watchdog integration
apps/server/src/lib/health-watchdog.ts Deleted entire health watchdog implementation
apps/server/src/main.ts Removed watchdog initialization, start/stop calls, and empty lines left behind
packages/shared/src/constants/timeouts.ts Watchdog timeout constants not removed (lines 42-45)

Sequence Diagram

sequenceDiagram
    participant Client
    participant HealthRoute as /health Route
    participant Watchdog as HealthWatchdog (removed)
    
    Note over Client,Watchdog: Before: Health check with watchdog
    Client->>HealthRoute: GET /health
    activate HealthRoute
    HealthRoute->>Watchdog: recordHealthCheck()
    Watchdog-->>HealthRoute: (updates timestamp)
    HealthRoute-->>Client: 200 { status: "ok" }
    deactivate HealthRoute
    
    Note over Watchdog: Watchdog timer checks every 30s
    Note over Watchdog: Exits process if no check within 90s
    
    Note over Client,Watchdog: After: Simple health check
    Client->>HealthRoute: GET /health
    activate HealthRoute
    HealthRoute-->>Client: 200 { status: "ok" }
    deactivate HealthRoute
    
    Note over HealthRoute: No watchdog monitoring
    Note over HealthRoute: Server relies on external monitoring
Loading

@shadowfax92 shadowfax92 merged commit 06dd421 into main Jan 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants