pub enum Ownership {
Absent,
Owned,
Foreign,
Unknown,
}Expand description
Canonical ownership classification, re-exported from eggup-core.
This is the same type as eggup_core::Ownership, not a copy of it:
eggup_service::Ownership and eggup_core::Ownership denote one type, so
no conversion between them exists or is needed anywhere in the workspace.
§Service-context meaning
eggup-core states this classification in destination terms, because it
classifies a filesystem object. The service crate uses the same
classification for a manager registration:
Absent— no registration exists under this identity;Owned— the registration exactly matches this deployment and may be mutated;Foreign— the registration belongs to another deployment and must not be mutated;Unknown— ownership cannot be proven, so mutation is denied.
The core wording must not be read unqualified here: in the service context “destination” means the registered service unit, launchd label, or SCM service that the caller’s identity claims.
§Fail-closed rule
Owned is never inferred. It is returned only by a caller-proven
ownership check — in the service crate, by the manager adapter’s exact
identity comparison against the requested spec. Foreign and Unknown
always fail closed: they are never destructively mutated, and they never
produce a successful mutation outcome. See eggup_core::Ownership for
core’s canonical statement of the same rule.
The canonical ownership classification for a live destination.
Owned is never inferred from an InstallPlan. It is returned only by a
consumer-supplied OwnershipVerifier that proves the destination belongs
to the intended deployment. Foreign and Unknown always fail closed.
Variants§
Absent
No filesystem object exists at the destination.
Owned
The destination provably belongs to this deployment and may be replaced.
Foreign
The destination belongs to another deployment and must not be mutated.
Unknown
Ownership cannot be proven; mutation is denied.