Refactor health checks to use OpenCode liveness endpoint

This commit is contained in:
Chris Scott committed 2026-07-30 23:30:15 -04:00
1 parent 5c381ddf6c
commit adc1290836
12 files changed
+62 -18

No files matched your search

@@ -132,7 +132,7 @@ describe('OpenCodeSupervisor', () => {
manager.checkHealth.mockResolvedValueOnce(false)
const status = await supervisor.checkNow('api_probe')
const status = await supervisor.checkNow('manual')
expect(status.state).toBe('unhealthy')
expect(status.failureCount).toBe(1)
@@ -152,7 +152,7 @@ describe('OpenCodeSupervisor', () => {
.mockResolvedValueOnce(false)
.mockResolvedValueOnce(true)
const status = await supervisor.checkNow('api_probe')
const status = await supervisor.checkNow('manual')
expect(status.healthy).toBe(true)
expect(ensureDirectoryExists).toHaveBeenCalled()
@@ -167,7 +167,7 @@ describe('OpenCodeSupervisor', () => {
manager.isOperationInProgress.mockReturnValue(true)
await supervisor.checkNow('api_probe')
await supervisor.checkNow('manual')
expect(manager.checkHealth).not.toHaveBeenCalled()
})