{"record":{"id":"cfd19b1e8fd3087f","repo":"astrid-runtime/astrid","slug":"parent-start-identity-is-required-on-this-platform","errorCode":null,"errorMessage":"parent start identity is required on this platform","messagePattern":"parent start identity is required on this platform","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-storage-provider-fskit/src/service.rs","lineNumber":414,"sourceCode":"    parent: &astrid_core::storage_filesystem::StorageProviderParentLifetimeV1,\n) -> Result<()> {\n    if parent.pid <= 1 || parent.pid == std::process::id() {\n        bail!(\"invalid parent PID\");\n    }\n    if parent.token.len() < 16\n        || parent.token.len() > 512\n        || parent.token.chars().any(char::is_control)\n    {\n        bail!(\"invalid parent token\");\n    }\n    if let Some(identity) = parent.start_identity.as_deref()\n        && (identity.is_empty() || identity.len() > 512 || identity.chars().any(char::is_control))\n    {\n        bail!(\"invalid parent start identity\");\n    }\n    #[cfg(any(target_os = \"linux\", target_os = \"macos\"))]\n    if parent.start_identity.is_none() {\n        bail!(\"parent start identity is required on this platform\");\n    }\n    Ok(())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[cfg(target_os = \"macos\")]\n    #[test]\n    #[ignore = \"requires an explicit disposable live FSKit lease manifest\"]\n    fn live_managed_callback_lease_is_accepted() {\n        let path = std::env::var(\"ASTRID_FSKIT_TEST_LEASE_MANIFEST\").expect(\"explicit QA manifest\");\n        let bytes = std::fs::read(path).expect(\"read QA manifest\");\n        let lease = serde_json::from_slice(&bytes).expect(\"decode QA lease\");\n        validate_lease(&lease).expect(\"accept managed live callback\");\n        let mut stale = lease.clone();\n        stale.callback_path = stale.resource_path.join(\"control.sock\");","sourceCodeStart":396,"sourceCodeEnd":432,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-storage-provider-fskit/src/service.rs#L396-L432","documentation":"On Linux and macOS the provider requires the parent lifetime record to carry a start_identity, because on those platforms process supervision/re-identification depends on it. If start_identity is None on a supported desktop platform, launch validation fails.","triggerScenarios":"validate_launch_parent runs with cfg(linux|macos) and parent.start_identity is None — i.e. the caller launched the helper without specifying which app identity started it.","commonSituations":"Reusing a launch path written for another OS that leaves start_identity unset; a config that omits the identity field; tests constructing a minimal StorageProviderParentLifetimeV1 without it.","solutions":["Set start_identity (e.g. the launching app's bundle ID or executable identity) before calling validate_launch on Linux/macOS","Make the identity a required field of your launch configuration on desktop platforms","Check for platform-conditional code paths that skip populating start_identity","Update tests/fixtures to include a valid start_identity"],"exampleFix":"// before\nStorageProviderParentLifetimeV1 { pid, token, start_identity: None, .. }\n// after\nStorageProviderParentLifetimeV1 { pid, token, start_identity: Some(\"com.example.hostapp\".into()), .. }","handlingStrategy":"validation","validationCode":"fn parent_record_ok(p: &StorageProviderParentLifetimeV1) -> bool { cfg!(any(target_os = \"linux\", target_os = \"macos\")).implies(p.start_identity.is_some()) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set start_identity on Linux/macOS launches","Make the identity required in your launch config on desktop platforms","Audit platform-conditional code paths that skip it","Include a valid identity in test fixtures"],"tags":["platform","validation","identity"],"backgroundTag":"missing-required-argument","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}