| 491 | return out |
| 492 | |
| 493 | def _invoke_cpp(self, module: Any, request: dict[str, Any]) -> dict[str, Any]: |
| 494 | try: |
| 495 | payload = module.execute_case(request) |
| 496 | except Exception as exc: |
| 497 | raise BackendExecutionError(f"cpp_core execution failed: {exc}", "RUNTIME_ERROR", "SCF") from exc |
| 498 | if not isinstance(payload, dict): |
| 499 | raise BackendExecutionError("cpp_core returned invalid payload type", "RUNTIME_ERROR", "POSTPROCESS") |
| 500 | output = payload.get("output") |
| 501 | if not isinstance(output, dict): |
| 502 | raise BackendExecutionError("cpp_core payload missing output object", "RUNTIME_ERROR", "POSTPROCESS") |
| 503 | return payload |
| 504 | |
| 505 | def _normalize_diagnostics(self, mode: str, output: dict[str, Any], diagnostics: dict[str, Any]) -> dict[str, Any]: |
| 506 | out = dict(diagnostics) |