{"record":{"id":"d0b664a1d2f85e91","repo":"AprilNEA/OpenLogi","slug":"a-retained-hid-route-has-no-captured-capability-facts","errorCode":null,"errorMessage":"a retained HID++ route has no captured capability facts; refusing to guess setting support (no profile was written)","messagePattern":"a retained HID\\+\\+ route has no captured capability facts; refusing to guess setting support \\(no profile was written\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/openlogi-cli/src/cmd/fixture/record_profile.rs","lineNumber":277,"sourceCode":"    let mut settings = Vec::with_capacity(retained.paired.len());\n    for ((source_route, profile_route), device) in source_routes\n        .iter()\n        .zip(profile_routes)\n        .zip(&retained.paired)\n    {\n        settings.push(capture_hidpp_settings(client, source_route, profile_route, device).await?);\n    }\n    Ok((vec![retained], Vec::new(), settings, selected_route))\n}\n\nasync fn capture_hidpp_settings(\n    client: &AgentClient,\n    source_route: &DeviceRoute,\n    profile_route: DeviceRoute,\n    device: &PairedDevice,\n) -> Result<ProfileDeviceSettings> {\n    let capabilities = device.capabilities.ok_or_else(|| {\n        anyhow!(\n            \"a retained HID++ route has no captured capability facts; refusing to guess setting \\\n             support (no profile was written)\"\n        )\n    })?;\n\n    let dpi = match capability_setting(device.online, capabilities.pointer) {\n        Some(setting) => setting,\n        None => {\n            semantic_read(\n                \"DPI\",\n                client.read_dpi(context::current(), source_route.clone()),\n            )\n            .await?\n        }\n    };\n    let smartshift = if device.online {\n        semantic_read(\n            \"SmartShift\",","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/AprilNEA/OpenLogi/blob/e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8/crates/openlogi-cli/src/cmd/fixture/record_profile.rs#L259-L295","documentation":"Raised in `capture_hidpp_settings` when the retained device's `capabilities` field is `None`. The capture refuses to guess which settings (DPI, wheel, lighting) a device supports: without the agent's captured capability facts it cannot decide between Supported/Unsupported/Unavailable, so it aborts without writing a profile. Capability facts come from the agent's probe; their absence means the device was never probed or the facts were dropped.","triggerScenarios":"Recording a profile for an inventory device that the running agent has not probed — `PairedDevice.capabilities` is `None` in the snapshot, e.g. a freshly paired or half-enumerated device.","commonSituations":"Device just plugged/paired and the agent hasn't finished its probe; device in a degraded state where probing failed at agent startup; snapshot served by the mock or an older agent that omits capabilities.","solutions":["Wait for the agent to finish probing the device (open the GUI or run `openlogi list` and confirm capability details appear), then retry the capture.","Reconnect the device so the agent re-probes it.","Restart the agent to force a full re-enumeration.","If capabilities never appear, the device's HID++ probe is failing — check agent logs and file a device-support issue."],"exampleFix":"// confirm capabilities exist before recording\nopenlogi list --verbose   # device shows capability facts\nopenlogi fixture record profile --id my-mouse --name \"My Mouse\" --output mouse.json","handlingStrategy":"validation","validationCode":"// pre-check: device must have probed capability facts\nlet ready = |snap: &AgentSnapshot, sel: &str| snap.inventory.iter()\n    .flat_map(|inv| inv.paired.iter())\n    .any(|d| d.capabilities.is_some());\nif !ready(&snapshot, selector) { eprintln!(\"device not yet probed; wait or reconnect\"); }","typeGuard":"fn has_capabilities(d: &PairedDevice) -> bool { d.capabilities.is_some() }","tryCatchPattern":"// abort cleanly and prompt a probe wait\nmatch capture_hidpp_settings(...).await {\n    Err(e) if e.to_string().contains(\"no captured capability facts\") => {\n        eprintln!(\"device not probed yet; reconnect and retry\");\n    }\n    other => other,\n}","preventionTips":["Wait for the agent to finish probing (visible in GUI/openlogi list) before recording.","Reconnect the device so the agent re-probes if capabilities are missing.","Don't record profiles for freshly paired devices until enumerated."],"tags":["rust","cli","hidpp","capabilities","device-probe"],"backgroundTag":"missing-required-data","analyzedSha":"e846e6f4b4405e33bd6a9aaf949a482ce34cb6d8","analyzedAt":"2026-09-13T03:07:16.451Z","contentChangedAt":"2026-09-13T03:07:16.451Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}