{"record":{"id":"80a671f5d2d7b958","repo":"ZhuLinsen/daily_stock_analysis","slug":"schema-validation-failed-80a671","errorCode":"schema_validation_failed","errorMessage":"schema_validation_failed at smoke_validation for backend generation_backend","messagePattern":"schema_validation_failed at smoke_validation for backend generation_backend","errorType":"error_code","errorClass":"GenerationError","httpStatus":null,"severity":"error","filePath":"src/services/generation_backend_status_service.py","lineNumber":418,"sourceCode":"            self._json_smoke_validator(result.text)\n        else:\n            self._text_smoke_validator(result.text)\n\n    @classmethod\n    def _json_smoke_validator(cls, text: str) -> None:\n        try:\n            payload = json.loads((text or \"\").strip())\n        except Exception as exc:\n            raise GenerationError(\n                error_code=GenerationErrorCode.INVALID_JSON,\n                stage=\"smoke_validation\",\n                retryable=False,\n                fallbackable=False,\n                backend=\"generation_backend\",\n                details={\"reason\": \"invalid_json\"},\n            ) from exc\n        if payload != {\"ok\": True, \"backend_smoke\": \"passed\"}:\n            raise GenerationError(\n                error_code=GenerationErrorCode.SCHEMA_VALIDATION_FAILED,\n                stage=\"smoke_validation\",\n                retryable=False,\n                fallbackable=False,\n                backend=\"generation_backend\",\n                details={\"reason\": \"unexpected_smoke_payload\"},\n            )\n\n    @classmethod\n    def _text_smoke_validator(cls, text: str) -> None:\n        if (text or \"\").strip() != \"DSA_GENERATION_BACKEND_SMOKE_OK\":\n            raise GenerationError(\n                error_code=GenerationErrorCode.SCHEMA_VALIDATION_FAILED,\n                stage=\"smoke_validation\",\n                retryable=False,\n                fallbackable=False,\n                backend=\"generation_backend\",\n                details={\"reason\": \"unexpected_smoke_text\"},","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/ZhuLinsen/daily_stock_analysis/blob/5159bd72e8373d215492dff122acc9d389e219c9/src/services/generation_backend_status_service.py#L400-L436","documentation":"Error \"schema_validation_failed at smoke_validation for backend generation_backend\" thrown in ZhuLinsen/daily_stock_analysis.","triggerScenarios":"Thrown at src/services/generation_backend_status_service.py:418 when the library encounters an invalid state.","commonSituations":"Reported when the generation backend smoke validation response JSON does not match the expected schema; occurs when the upstream returns an error payload or an incompatible response shape.","solutions":["The smoke-validation response did not match the expected schema; verify the backend implements the expected API surface.","Update the response schema/validator or fix the backend output so required fields are present with correct types.","Confirm the configured model route matches the surface (e.g. openai/<model>) the validator expects."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5159bd72e8373d215492dff122acc9d389e219c9","analyzedAt":"2026-08-15T01:59:36.292Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}