pub struct GitSnapshotStageDirectory { /* private fields */ }Expand description
Retained create-only directory for assembling one private operation stage.
Implementations§
Source§impl GitSnapshotStageDirectory
impl GitSnapshotStageDirectory
Sourcepub fn create(
isolation_root: &Path,
operation_id: &str,
) -> Result<Self, GitSnapshotError>
pub fn create( isolation_root: &Path, operation_id: &str, ) -> Result<Self, GitSnapshotError>
Create one new operation stage below the strict private snapshots store.
The fixed store is created once when absent. The operation directory itself is always create-only: an existing complete or partial stage is never reused by this path.
§Errors
Returns a typed failure for an unsafe operation, non-private or rebound directory, failed durability barrier, or an existing operation stage.
Sourcepub fn archive_path(&self) -> PathBuf
pub fn archive_path(&self) -> PathBuf
Exact create-only archive destination consumed by the deterministic source archiver.
Sourcepub fn write_archive_bytes_create_new(
&self,
bytes: &[u8],
expected: &SourceArchive,
) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>
pub fn write_archive_bytes_create_new( &self, bytes: &[u8], expected: &SourceArchive, ) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>
Create and durably publish an exact already-verified archive byte sequence.
This is used only for exact-source retry after the parent blob was re-read and verified from the private Git object database. Ordinary workspace capture continues to use the deterministic streaming source archiver.
§Errors
Returns a typed failure for size/SHA mismatch, archive-limit overflow, an existing file, unsafe filesystem identity, or failed file/directory durability.
Sourcepub fn descriptor_path(&self) -> PathBuf
pub fn descriptor_path(&self) -> PathBuf
Exact create-only descriptor destination.
Sourcepub fn isolation_root_identity(&self) -> &str
pub fn isolation_root_identity(&self) -> &str
Root identity persisted into canonical stage bytes and the durable locator.
Sourcepub fn snapshots_store_identity(&self) -> &str
pub fn snapshots_store_identity(&self) -> &str
Snapshot-store identity persisted into canonical stage bytes and the durable locator.
Sourcepub fn stage_directory_identity(&self) -> &str
pub fn stage_directory_identity(&self) -> &str
Operation-stage identity persisted into canonical stage bytes and the durable locator.
Sourcepub fn write_descriptor_create_new(
&self,
descriptor: &GitSnapshotDescriptor,
) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>
pub fn write_descriptor_create_new( &self, descriptor: &GitSnapshotDescriptor, ) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>
Create and durably publish the exact canonical descriptor bytes.
§Errors
Returns a typed failure if the descriptor cannot be encoded, the destination already exists, the private stage changed, or file/directory synchronization fails.
Sourcepub fn seal_archive(
&self,
expected: &SourceArchive,
) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>
pub fn seal_archive( &self, expected: &SourceArchive, ) -> Result<RegularFileFilesystemIdentity, GitSnapshotError>
Synchronize and bind the already create-only deterministic archive.
The archive creator remains responsible for create-only ZIP construction. This barrier reopens its exact single-link identity, synchronizes it, and reproduces its size/SHA-256 while the identity guard remains live.
§Errors
Returns a typed failure for a missing, rebound, oversized, unsynchronized, or digest- mismatched archive.
Sourcepub fn precompute_inputs(
&self,
archive_file_identity: &RegularFileFilesystemIdentity,
descriptor_file_identity: &RegularFileFilesystemIdentity,
archive: &SourceArchive,
descriptor: &GitSnapshotDescriptor,
) -> Result<GitSnapshotPrecomputeInputs, GitSnapshotError>
pub fn precompute_inputs( &self, archive_file_identity: &RegularFileFilesystemIdentity, descriptor_file_identity: &RegularFileFilesystemIdentity, archive: &SourceArchive, descriptor: &GitSnapshotDescriptor, ) -> Result<GitSnapshotPrecomputeInputs, GitSnapshotError>
Reopen the exact archive and descriptor as retained no-write precompute inputs.
Callers must probe the fixed private Git database for exact SHA-1 object format before hashing either returned input. The archive is supplied as an already-open reader; the descriptor is supplied as exact canonical bytes. No file, Git object, ref, or network state is mutated by this method.
§Errors
Returns a typed failure for any directory, entry-set, file identity, digest, or canonical descriptor mismatch.
Sourcepub fn publish_metadata_create_new(
&self,
stage: &GitSnapshotStageV1,
descriptor: &GitSnapshotDescriptor,
final_request: &IosDeviceBuildRequest,
) -> Result<GitSnapshotStageLocatorV1, GitSnapshotError>
pub fn publish_metadata_create_new( &self, stage: &GitSnapshotStageV1, descriptor: &GitSnapshotDescriptor, final_request: &IosDeviceBuildRequest, ) -> Result<GitSnapshotStageLocatorV1, GitSnapshotError>
Create and durably publish canonical stage.json, returning its path-free locator.
The metadata destination is create-only. Success requires exact request/descriptor/stage binding and reproduces both staged file identities and digests before the final directory metadata barrier.
§Errors
Returns a typed failure for any stage, request, identity, digest, encoding, unexpected entry, create-only, or durability mismatch.