{"record":{"id":"fda7e85fa0b96f62","repo":"ruvnet/RuView","slug":"pose-estimation-requires-real-csi-data-input-no-c","errorCode":null,"errorMessage":"Pose estimation requires real CSI data input. No CSI data was provided and mock_pose_data is disabled. Either pass csi_data from hardware collection, or enable mock_pose_data for development. See docs/hardware-setup.md for CSI data collection setup.","messagePattern":"Pose estimation requires real CSI data input\\. No CSI data was provided and mock_pose_data is disabled\\. Either pass csi_data from hardware collection, or enable mock_pose_data for development\\. See docs/hardware-setup\\.md for CSI data collection setup\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/services/pose_service.py","lineNumber":522,"sourceCode":"    async def estimate_poses(self, zone_ids=None, confidence_threshold=None, max_persons=None,\n                           include_keypoints=True, include_segmentation=False,\n                           csi_data: Optional[np.ndarray] = None):\n        \"\"\"Estimate poses with API parameters.\n\n        Args:\n            zone_ids: List of zone identifiers to estimate poses for.\n            confidence_threshold: Minimum confidence threshold for detections.\n            max_persons: Maximum number of persons to return.\n            include_keypoints: Whether to include keypoint data.\n            include_segmentation: Whether to include segmentation masks.\n            csi_data: Real CSI data array. Required when mock_pose_data is False.\n\n        Raises:\n            NotImplementedError: If no CSI data is provided and mock mode is off.\n        \"\"\"\n        try:\n            if csi_data is None and not self.settings.mock_pose_data:\n                raise NotImplementedError(\n                    \"Pose estimation requires real CSI data input. No CSI data was provided \"\n                    \"and mock_pose_data is disabled. Either pass csi_data from hardware \"\n                    \"collection, or enable mock_pose_data for development. \"\n                    \"See docs/hardware-setup.md for CSI data collection setup.\"\n                )\n\n            metadata = {\n                \"timestamp\": datetime.now(),\n                \"zone_ids\": zone_ids or [\"zone_1\"],\n                \"confidence_threshold\": confidence_threshold or self.settings.pose_confidence_threshold,\n                \"max_persons\": max_persons or self.settings.pose_max_persons,\n            }\n\n            if csi_data is not None:\n                # Process real CSI data\n                result = await self.process_csi_data(csi_data, metadata)\n            else:\n                # Mock mode: generate mock poses directly (no fake CSI data)","sourceCodeStart":504,"sourceCodeEnd":540,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/services/pose_service.py#L504-L540","documentation":"PoseService.estimate_poses() refuses to invent output: when csi_data is None and settings.mock_pose_data is False it raises NotImplementedError. The service can produce poses only from real CSI arrays (collected from configured ESP32 hardware) or, in development, from the explicit mock mode. Calling the estimation API with no input under production settings is treated as a programming/configuration error, with the remediation spelled out in the message.","triggerScenarios":"Calling estimate_poses() with no csi_data argument while mock_pose_data=False (production profile); an API endpoint invoking pose estimation before any hardware feed delivers CSI; hardware collection failed upstream and None was forwarded.","commonSituations":"Frontends/dashboards probing the pose endpoint on a box without sensors; dev machines running prod settings; upstream CSI collection errors silently passing None instead of failing fast.","solutions":["Pass real CSI data: obtain the ndarray from hardware collection and call estimate_poses(csi_data=csi_array, ...).","For local development, enable mock_pose_data=True in settings so empty-input calls are allowed.","Fix upstream collectors to raise on failure instead of forwarding None, so this guard never triggers.","Follow docs/hardware-setup.md to configure the CSI data source for real estimation."],"exampleFix":"# before\nresult = await pose_service.estimate_poses()  # NotImplementedError\n\n# after\nif csi_data is None and not pose_service.settings.mock_pose_data:\n    raise ValueError('csi_data is required when mock_pose_data is disabled')\nresult = await pose_service.estimate_poses(csi_data=csi_data)","handlingStrategy":"validation","validationCode":"if csi_data is None and not pose_service.settings.mock_pose_data:\n    raise ValueError('csi_data required when mock_pose_data is disabled')\nresult = await pose_service.estimate_poses(csi_data=csi_data)","typeGuard":"from typing import Any, Dict, Optional, TypeGuard\nimport numpy as np\n\ndef is_valid_csi(csi: Optional[np.ndarray]) -> TypeGuard[np.ndarray]:\n    \"\"\"True when real CSI input is present and non-empty.\"\"\"\n    return csi is not None and getattr(csi, 'size', 0) > 0\n\nif not is_valid_csi(csi_data) and not pose_service.settings.mock_pose_data:\n    raise ValueError('csi_data required')","tryCatchPattern":null,"preventionTips":["Make CSI collection failures raise upstream so None never reaches estimate_poses().","Require csi_data as a positional argument in production call paths (the signature already documents it as required when mock is off).","Return 400/422 from pose endpoints when no csi_data is supplied and mock mode is disabled."],"tags":["pose","csi","configuration","not-implemented","hardware"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}