Skip to content

feat(health): report idle-suspended embedder as IDLE, not DEGRADED#10

Merged
couragehong merged 1 commit into
CryptoLabInc:mainfrom
couragehong:feat/embedder-idle-status
Jun 2, 2026
Merged

feat(health): report idle-suspended embedder as IDLE, not DEGRADED#10
couragehong merged 1 commit into
CryptoLabInc:mainfrom
couragehong:feat/embedder-idle-status

Conversation

@couragehong
Copy link
Copy Markdown
Contributor

The idle ticker stops llama-server after RUNED_IDLE_TIMEOUT to free model memory; the next Embed RPC resurrects it. Health previously mapped any down backend to STATUS_DEGRADED, so a status check looked broken during a normal idle-suspend instead of signalling a benign, self-healing pause.

  • proto: add HealthResponse STATUS_IDLE
  • backend: track why the child is down (idle-suspend via Stop vs crash or failed restart) and expose Serving(); only the idle ticker's Stop() yields IDLE, while a crash or a failed (re)start stays DEGRADED
  • server: Health maps Serving() -> IDLE/DEGRADED/OK, with an IDLE message
  • test: mapping + real-lifecycle coverage for the new states

The idle ticker stops llama-server after RUNED_IDLE_TIMEOUT to free model
memory; the next Embed RPC resurrects it. Health previously mapped any
down backend to STATUS_DEGRADED, so a status check looked broken during a
normal idle-suspend instead of signalling a benign, self-healing pause.

- proto: add HealthResponse STATUS_IDLE
- backend: track why the child is down (idle-suspend via Stop vs crash or
  failed restart) and expose Serving(); only the idle ticker's Stop()
  yields IDLE, while a crash or a failed (re)start stays DEGRADED
- server: Health maps Serving() -> IDLE/DEGRADED/OK, with an IDLE message
- test: mapping + real-lifecycle coverage for the new states

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@couragehong couragehong merged commit ab18997 into CryptoLabInc:main Jun 2, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants