- Verify generation requests include an abort signal
- Assert timeout-related abort errors propagate with the expected error name
- Restore the global fetch implementation after the test
- Verify network-level fetch failures propagate from the generation client
- Assert the original error type and message are preserved
- Restore the global fetch implementation after the test
- Add an Ollama client for Qwen3 8B generation with request timeouts and HTTP error handling
- Implement POST /generate with request validation and sanitized failure responses
- Update GET /ready to report Ollama availability and return HTTP 503 when unavailable
- Add unit and integration tests for generation, dependency health, and failure handling
- Document implemented API endpoints, setup instructions, scripts, and remaining planned capabilities in README
- Add a centralized Fastify error handler with server-side error logging
- Preserve valid 4xx status codes while normalizing other errors to HTTP 500
- Return generic error messages without exposing sensitive internal details
- Add a test endpoint and regression test for unexpected errors
- Verify 500-character messages are accepted
- Verify messages exceeding 500 characters are rejected with HTTP 400
- Extract the Zod validation schema to module scope for reuse
- Test successful echo responses for valid messages
- Verify empty messages are rejected with HTTP 400
- Validate request bodies using a Zod schema with a 1–500 character limit
- Return a consistent error response for invalid request bodies
- Replace the placeholder test script with tsx --test
- Add tests for GET /health response status and payload
- Add tests for GET /ready response status and dependency status
- Use Fastify injection to test endpoints without opening a network listener
- Close the app after the test suite completes
- Extract route and server configuration into an exported buildApp function
- Guard server startup so importing the module does not automatically listen on port 3000
- Preserve health and readiness endpoints and loopback-only binding
- Normalize string literals to double quotes