{"record":{"id":"fa4771cf5df81f64","repo":"tinyhumansai/openhuman","slug":"no-pending-approval-ever-registered-for-request-id","errorCode":null,"errorMessage":"no pending approval ever registered for request_id '{request_id}'","messagePattern":"no pending approval ever registered for request_id '(.+?)'","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/security/approval/rpc.rs","lineNumber":245,"sourceCode":"            // \"no pending approval found\" wording that `expected_error_kind`\n            // demotes, while the never-registered arm emits a distinct string\n            // that stays a captured Sentry signal.\n            return match gate.classify_decide_miss(request_id) {\n                DecideMiss::AlreadyResolved => {\n                    tracing::warn!(\n                        request_id = request_id,\n                        \"[rpc:approval_decide] no pending approval found (already decided/expired — benign race)\"\n                    );\n                    Err(anyhow!(\n                        \"no pending approval found for request_id '{request_id}' (already decided or expired)\"\n                    ))\n                }\n                DecideMiss::NeverRegistered => {\n                    tracing::warn!(\n                        request_id = request_id,\n                        \"[rpc:approval_decide] no pending approval ever registered (genuine lost registration)\"\n                    );\n                    Err(anyhow!(\n                        \"no pending approval ever registered for request_id '{request_id}'\"\n                    ))\n                }\n            };\n        }\n    };\n\n    let mut logs = vec![format!(\n        \"[approval] decided request_id={} tool={} decision={}\",\n        row.request_id,\n        row.tool_name,\n        decision.as_str()\n    )];\n\n    // \"Always allow\": persist the tool onto the user's `autonomy.auto_approve`\n    // allowlist (config save + live-policy reload) so the gate skips prompting\n    // for it on future turns — this session and across restarts. Best-effort:\n    // `gate.decide` already resolved the current call, so a persistence failure","sourceCodeStart":227,"sourceCodeEnd":263,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/security/approval/rpc.rs#L227-L263","documentation":"Decide-miss disambiguation in approval_decide: the conditional UPDATE matched zero rows and gate.classify_decide_miss reports the never-registered case — no approval request with this request_id was ever parked in this session. Unlike the benign already-decided/expired race at rpc.rs:236, this distinct wording stays a captured Sentry signal (TAURI-RUST-5EH); the faulting input is an unknown or foreign-session request_id.","triggerScenarios":"Thrown at src/openhuman/security/approval/rpc.rs:245 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the request_id matches one emitted by a live pending approval in this session.","Re-fetch the pending approvals list; the id may belong to a previous session or different user.","If it recurs, check for dual-core instances or session mismatch between UI and core."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}