{"record":{"id":"0ba8ecb4b33aac10","repo":"ruvnet/RuView","slug":"mock-pose-generation-is-disabled-real-pose-estima","errorCode":null,"errorMessage":"Mock pose generation is disabled. Real pose estimation requires CSI data from configured hardware and trained model weights. Set mock_pose_data=True in settings for development, or provide real CSI input. See docs/hardware-setup.md.","messagePattern":"Mock pose generation is disabled\\. Real pose estimation requires CSI data from configured hardware and trained model weights\\. Set mock_pose_data=True in settings for development, or provide real CSI input\\. See docs/hardware-setup\\.md\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"archive/v1/src/services/pose_service.py","lineNumber":410,"sourceCode":"            x = float(torch.sigmoid(output[bbox_start]).item())\n            y = float(torch.sigmoid(output[bbox_start + 1]).item())\n            w = float(torch.sigmoid(output[bbox_start + 2]).item())\n            h = float(torch.sigmoid(output[bbox_start + 3]).item())\n            return {\"x\": x, \"y\": y, \"width\": w, \"height\": h}\n        else:\n            return {\"x\": 0.0, \"y\": 0.0, \"width\": 0.0, \"height\": 0.0}\n    \n    def _generate_mock_poses(self) -> List[Dict[str, Any]]:\n        \"\"\"Generate mock pose data for development.\n\n        Delegates to the testing module. Only callable when mock_pose_data is True.\n\n        Raises:\n            NotImplementedError: If called without mock_pose_data enabled,\n                indicating that real CSI data and trained models are required.\n        \"\"\"\n        if not self.settings.mock_pose_data:\n            raise NotImplementedError(\n                \"Mock pose generation is disabled. Real pose estimation requires \"\n                \"CSI data from configured hardware and trained model weights. \"\n                \"Set mock_pose_data=True in settings for development, or provide \"\n                \"real CSI input. See docs/hardware-setup.md.\"\n            )\n        from src.testing.mock_pose_generator import generate_mock_poses\n        return generate_mock_poses(max_persons=self.settings.pose_max_persons)\n\n    def _classify_activity(self, features: torch.Tensor) -> str:\n        \"\"\"Classify activity from model features.\n\n        Uses the magnitude of the feature tensor to make a simple threshold-based\n        classification. This is a basic heuristic; a proper activity classifier\n        should be trained and loaded alongside the pose model.\n        \"\"\"\n        feature_norm = float(torch.norm(features).item())\n        # Deterministic classification based on feature magnitude ranges\n        if feature_norm > 2.0:","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/ruvnet/RuView/blob/4685618388a5e49fad5b3005806f3bdd6a7c25c3/archive/v1/src/services/pose_service.py#L392-L428","documentation":"PoseService._generate_mock_poses() is an intentional guard: when settings.mock_pose_data is False it raises NotImplementedError rather than fabricating people. The service is designed so mock data only exists in development mode; reaching this method with mock disabled means a code path fell back to mock generation without the setting that authorizes it (production runs must use real CSI input and trained weights).","triggerScenarios":"Running with production settings (mock_pose_data=False) while a path still calls _generate_mock_poses(), e.g. estimate flow with no CSI data; running tests against production settings; a stale caller that used mocks before the setting was introduced.","commonSituations":"Deploying to production with a config that still exercises dev code paths; CI suites importing prod settings; refactoring that left a mock call site reachable when mock_pose_data is off.","solutions":["For development, enable mock data: set mock_pose_data=True in the environment/settings (never in production).","For production, ensure real CSI data flows in from hardware collection so the mock path is never entered.","Audit call sites of _generate_mock_poses() and gate them on settings.mock_pose_data before calling.","Point developers at docs/hardware-setup.md for the real CSI setup when mocks are off."],"exampleFix":"# before\nposes = pose_service._generate_mock_poses()  # NotImplementedError in prod\n\n# after\nif not pose_service.settings.mock_pose_data:\n    raise RuntimeError('mock poses disabled; provide real CSI data or enable mock_pose_data for dev')\nposes = pose_service._generate_mock_poses()","handlingStrategy":"validation","validationCode":"if not pose_service.settings.mock_pose_data:\n    raise RuntimeError('mock path disabled; supply real CSI data')\nposes = pose_service._generate_mock_poses()","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Gate every call to _generate_mock_poses() on settings.mock_pose_data before invoking it.","Keep mock_pose_data=True only in dev/test settings profiles; never in production env files.","Write a config lint rule that fails CI if production settings enable mock poses."],"tags":["pose","mock","configuration","not-implemented"],"backgroundTag":null,"analyzedSha":"4685618388a5e49fad5b3005806f3bdd6a7c25c3","analyzedAt":"2026-08-16T06:09:40.886Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}