Project
vgrep
Description
The health() function in src/server/client.rs line 158-178 only checks if it can write to the TCP socket, but never reads the HTTP response. This means a hung server (process running but not responding) would still be reported as "healthy".
Error Message
No error - false positive health status in edge cases.
Debug Logs
System Information
- Bounty Version: 0.1.0
- OS: Ubuntu 24.04 LTS
- Rust: 1.75+
Screenshots
No response
Steps to Reproduce
- Start vgrep server:
vgrep serve
- Cause the server to hang (e.g., block the async runtime)
- Run:
vgrep status
- Observe that health check returns
true even though server is unresponsive
Expected Behavior
Health check should verify the complete round-trip:
- Send GET /health request
- Read the HTTP response
- Verify response is received (confirms server is processing)
Actual Behavior
Health check only verifies:
- TCP connection can be established
- Request bytes can be written to socket
The write succeeds even if the server is hung because bytes go to OS kernel buffers.
Additional Context
The server's /health endpoint itself is simplistic - it always returns {"status": "ok"} without checking if the model is loaded or DB is accessible. A more comprehensive fix would include server-side health validation as well.
Project
vgrep
Description
The
health()function insrc/server/client.rsline 158-178 only checks if it can write to the TCP socket, but never reads the HTTP response. This means a hung server (process running but not responding) would still be reported as "healthy".Error Message
Debug Logs
System Information
Screenshots
No response
Steps to Reproduce
vgrep servevgrep statustrueeven though server is unresponsiveExpected Behavior
Health check should verify the complete round-trip:
Actual Behavior
Health check only verifies:
The write succeeds even if the server is hung because bytes go to OS kernel buffers.
Additional Context
The server's
/healthendpoint itself is simplistic - it always returns{"status": "ok"}without checking if the model is loaded or DB is accessible. A more comprehensive fix would include server-side health validation as well.