astrid-runtime/astrid · error

parent start identity is required on this platform

Error message

parent start identity is required on this platform

What it means

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.

Solutions

  1. Set start_identity (e.g. the launching app's bundle ID or executable identity) before calling validate_launch on Linux/macOS
  2. Make the identity a required field of your launch configuration on desktop platforms
  3. Check for platform-conditional code paths that skip populating start_identity
  4. Update tests/fixtures to include a valid start_identity

Example fix

// before
StorageProviderParentLifetimeV1 { pid, token, start_identity: None, .. }
// after
StorageProviderParentLifetimeV1 { pid, token, start_identity: Some("com.example.hostapp".into()), .. }
Defensive patterns

Strategy: validation

Validate before calling

fn parent_record_ok(p: &StorageProviderParentLifetimeV1) -> bool { cfg!(any(target_os = "linux", target_os = "macos")).implies(p.start_identity.is_some()) }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/cfd19b1e8fd3087f. Report an issue: GitHub.

Appendix: source

Thrown at crates/astrid-storage-provider-fskit/src/service.rs:414

    parent: &astrid_core::storage_filesystem::StorageProviderParentLifetimeV1,
) -> Result<()> {
    if parent.pid <= 1 || parent.pid == std::process::id() {
        bail!("invalid parent PID");
    }
    if parent.token.len() < 16
        || parent.token.len() > 512
        || parent.token.chars().any(char::is_control)
    {
        bail!("invalid parent token");
    }
    if let Some(identity) = parent.start_identity.as_deref()
        && (identity.is_empty() || identity.len() > 512 || identity.chars().any(char::is_control))
    {
        bail!("invalid parent start identity");
    }
    #[cfg(any(target_os = "linux", target_os = "macos"))]
    if parent.start_identity.is_none() {
        bail!("parent start identity is required on this platform");
    }
    Ok(())
}

#[cfg(test)]
mod tests {
    use super::*;

    #[cfg(target_os = "macos")]
    #[test]
    #[ignore = "requires an explicit disposable live FSKit lease manifest"]
    fn live_managed_callback_lease_is_accepted() {
        let path = std::env::var("ASTRID_FSKIT_TEST_LEASE_MANIFEST").expect("explicit QA manifest");
        let bytes = std::fs::read(path).expect("read QA manifest");
        let lease = serde_json::from_slice(&bytes).expect("decode QA lease");
        validate_lease(&lease).expect("accept managed live callback");
        let mut stale = lease.clone();
        stale.callback_path = stale.resource_path.join("control.sock");

View on GitHub (pinned to affd8760f4)