{"record":{"id":"d4e7f07b43bd8dac","repo":"BigPizzaV3/CodexPlusPlus","slug":"invalid-oai-sky-package-json-path","errorCode":null,"errorMessage":"invalid @oai/sky package.json path","messagePattern":"invalid @oai/sky package\\.json path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/computer_use_guard.rs","lineNumber":186,"sourceCode":"            changed: false,\n            package_json: Some(package_json.to_path_buf()),\n            backup_path: None,\n        });\n    }\n\n    let existing = std::fs::read_to_string(package_json)\n        .with_context(|| format!(\"failed to read {}\", package_json.display()))?;\n    let Some(updated) = add_sky_internal_computer_use_export(&existing)? else {\n        return Ok(RuntimeCompatResult {\n            changed: false,\n            package_json: Some(package_json.to_path_buf()),\n            backup_path: None,\n        });\n    };\n\n    let backup_path = package_json\n        .parent()\n        .ok_or_else(|| anyhow::anyhow!(\"invalid @oai/sky package.json path\"))?\n        .join(SKY_PACKAGE_EXPORTS_BACKUP);\n    if !backup_path.exists() {\n        std::fs::copy(package_json, &backup_path).with_context(|| {\n            format!(\n                \"failed to back up {} to {}\",\n                package_json.display(),\n                backup_path.display()\n            )\n        })?;\n    }\n    atomic_write_runtime_file(package_json, updated.as_bytes())?;\n    Ok(RuntimeCompatResult {\n        changed: true,\n        package_json: Some(package_json.to_path_buf()),\n        backup_path: Some(backup_path),\n    })\n}\n","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/fb3ebd9a82383aedd8d098aa9ae3aef9426d13a4/crates/codex-plus-core/src/computer_use_guard.rs#L168-L204","documentation":"Validation guard in the @oai/sky runtime-compat patcher: the caller passed a package.json path that failed path validation before Codex++ would read and rewrite the file to add the computer-use export. Fires when the runtime-compat routine is invoked with a package.json location that cannot be safely operated on.","triggerScenarios":"Thrown at crates/codex-plus-core/src/computer_use_guard.rs:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the path points at an existing @oai/sky package.json","Pass the resolved absolute path instead of a relative or user-typed path","Reinstall or relocate the @oai/sky package if it moved"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb3ebd9a82383aedd8d098aa9ae3aef9426d13a4","analyzedAt":"2026-08-17T11:35:12.031Z","contentChangedAt":"2026-08-17T11:35:12.031Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}