Problem
GET /ready currently checks only whether the model and health-report paths exist.
A zero-byte/corrupt baseline_model.joblib or malformed model_health_report.json still makes the endpoint return 200 {"status":"ready"}, while /predict or /health can fail immediately afterward.
Why it matters
For orchestration/readiness probes, file existence is weaker than actual service readiness and can route traffic to an unhealthy instance.
Suggested fix
Validate that:
- the model artifact can be loaded successfully, and
- the health report can be parsed as JSON with the expected top-level fields.
Keep the check lightweight; caching or mtime-based validation is fine if repeated deserialization is a concern.
Acceptance criteria
- corrupt model artifact =>
/ready returns 503
- malformed health JSON =>
/ready returns 503
- valid artifacts =>
/ready returns 200
- regression tests cover all three cases
Problem
GET /readycurrently checks only whether the model and health-report paths exist.A zero-byte/corrupt
baseline_model.joblibor malformedmodel_health_report.jsonstill makes the endpoint return200 {"status":"ready"}, while/predictor/healthcan fail immediately afterward.Why it matters
For orchestration/readiness probes, file existence is weaker than actual service readiness and can route traffic to an unhealthy instance.
Suggested fix
Validate that:
Keep the check lightweight; caching or mtime-based validation is fine if repeated deserialization is a concern.
Acceptance criteria
/readyreturns 503/readyreturns 503/readyreturns 200