{"record":{"id":"361aaaf4fc91f730","repo":"Hmbown/CodeWhale","slug":"this-mutation-requires-async-execute-network-i-o","errorCode":null,"errorMessage":"this mutation requires async execute (network I/O)","messagePattern":"this mutation requires async execute \\(network I/O\\)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/skills/mutation.rs","lineNumber":438,"sourceCode":"            remove_skill(resolved.id, expected_digest.or(Some(resolved.digest)), ctx)\n        }\n        SkillMutationRequest::Trust {\n            skill_id,\n            expected_digest,\n        } => trust_skill(skill_id, expected_digest, ctx),\n        SkillMutationRequest::TrustByName {\n            name,\n            scope,\n            expected_digest,\n        } => {\n            let resolved = resolve_owned_skill_by_name(ctx, &name, scope)?;\n            let digest = expected_digest.unwrap_or(resolved.digest);\n            trust_skill(resolved.id, digest, ctx)\n        }\n        SkillMutationRequest::InstallRemote { .. }\n        | SkillMutationRequest::Update { .. }\n        | SkillMutationRequest::UpdateByName { .. } => {\n            bail!(\"this mutation requires async execute (network I/O)\")\n        }\n    }\n}\n\n#[derive(Debug)]\nstruct ResolvedOwnedSkill {\n    id: AuditedSkillId,\n    digest: String,\n}\n\nfn resolve_owned_skill_by_name(\n    ctx: &MutationContext<'_>,\n    name: &str,\n    scope: Option<SkillTargetScope>,\n) -> Result<ResolvedOwnedSkill> {\n    // Match SkillRegistry::get — users may pass frontmatter/dir forms\n    // (Hello_World) while audit stores the folded canonical key (hello-world).\n    let canonical = normalize_skill_name_for_lookup(name);","sourceCodeStart":420,"sourceCodeEnd":456,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/skills/mutation.rs#L420-L456","documentation":"Guard in execute_sync: it handles only local mutations (install/import/remove/trust without network) and bails for requests that require network I/O, directing them to the async execute path. It fires when a caller invoked the synchronous executor with a SkillMutationRequest variant (typically remote install/update) that performs network operations, which sync execution cannot support.","triggerScenarios":"Thrown at crates/tui/src/skills/mutation.rs:438 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Route the mutation through the async execute() entry point instead of execute_sync","Only call execute_sync for purely local mutations (remove/trust/local import)","Refactor the caller to detect network-dependent requests before choosing the sync path"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}