Expand description
Policy-neutral local mechanics for verified multi-artifact updates.
The core crate deliberately does not fetch bytes, manage services, or choose release policy. Callers acquire artifacts and prove destination ownership; the core provides validated preparation, SHA-256 integrity verification, bounded candidate validation, locked ownership revalidation, staged-digest revalidation, and atomic-feeling multi-artifact commit with rollback.
Integrity here is checksum evidence only. No authenticity or signature claim is made: there is no authenticity verifier in this crate.
Runnable flows live in examples/: one-member, multi-member, custom
validator, ownership verifier, and receipt interpretation.
Structs§
- Absent
Only Verifier - A verifier that permits creation only:
Absentwhen missing,Foreignwhen anything exists. Useful for first-install flows that must never replace an existing file. - AllValidators
- A validator composition that requires every contained validator to pass.
- Artifact
Member - One explicitly acquired local artifact and its intended destination.
- Artifact
Set - A non-empty set of artifact members with unique member identities.
- Bound
Sources - Already-open member objects staged without pathname re-resolution.
- Command
Output - A bounded child-process result with timeout and overflow state.
- Command
Spec - An argv-based candidate command with bounded execution policy.
- Commit
Ownership - Commit-time ownership contract: who proves ownership and whether absent destinations may be created.
- Cross
Member Agreement Validator - A named helper for requiring one exact identity across all bundle members.
- Current
Executable - The exact executable that is currently running, bound once to a canonical target.
- Exact
Digest Verifier - A verifier that proves ownership by exact prior SHA-256 content.
- Exact
Identity Validator - A strict exact-output check for one or more staged member programs.
- Existing
AsOwned Verifier - A verifier that treats an existing regular file as owned.
- Failure
Report - A bounded structured report describing one transaction failure.
- Install
Plan - An explicit installation root and a coherent artifact set ready for private preparation.
- Integrity
Result - One member’s bounded integrity result.
- Lock
Observation - A bounded, read-only observation of one exact lock record.
- Member
Id - A stable identity for one member of a deployment bundle.
- Mutation
Lock - An exclusive ownership record for one installation domain.
- Prepared
Transaction - A validated, privately staged transaction that has not performed live mutation.
- Product
Id - A validated opaque product identifier owned by the consumer.
- Release
Id - A validated opaque release identifier owned by the consumer.
- Sha256
Manifest - A parsed single-entry SHA-256 sidecar or manifest line.
- Transaction
Receipt - Evidence describing the terminal result of a transaction attempt.
- Validated
Transaction - A transaction whose integrity-verified candidates passed a consumer validator.
- Verified
Transaction - A prepared transaction whose declared integrity requirements have passed.
Enums§
- Absent
Policy - Authorization to create a destination that is currently
Ownership::Absent. - Cleanup
Disposition - How transaction-owned temporary evidence was handled.
- Error
- Errors produced while validating a local update plan or preparing private stage state.
- Failure
Category - A stable machine-readable failure category.
- Failure
Phase - The transaction phase that produced a failure.
- File
Kind - The file kind expected for an artifact member.
- Integrity
Requirement - A declared integrity requirement. Computation is provided by the verification layer.
- Integrity
Status - The result of applying a member’s integrity declaration to staged bytes.
- Lock
Status - The observable state of an installation-domain lock record.
- Ownership
- The canonical ownership classification for a live destination.
- Permissions
Intent - The permission intent to apply to a staged member.
- Post
Commit Failure Policy - Caller policy for a failed post-commit check.
- Recovery
Error - The result type used by the recovery-aware entry points.
- Stage
Placement - Where transaction-owned staging state is created for a plan.
- Stale
Lock Decision - The caller’s verdict about one observed lock record.
- Transaction
Disposition - The terminal disposition of a commit attempt.
Traits§
- Candidate
Validator - A candidate validator supplied by a consumer or by eggup-core helpers.
- Ownership
Verifier - Consumer-supplied proof that a live destination belongs to this deployment.
- Stale
Lock Verifier - Consumer-supplied proof that one observed lock record is stale.
Functions§
- hash_
file - Streams a local file through SHA-256 without buffering the complete artifact.
- parse_
sha256_ sidecar - Parses exactly one strict SHA-256 sidecar line.
- run_
bounded - Executes a command with cleared environment, null stdin, bounded output, and kill/reap.
- verify_
file - Verifies a local file against a parsed SHA-256 declaration.
Type Aliases§
- Recovery
Result - The result type returned by the recovery-aware entry points.
- Result
- The result type used by eggup-core.