Skip to main content

VerifiedArtifactStore

Trait VerifiedArtifactStore 

Source
pub trait VerifiedArtifactStore: Send {
    // Required methods
    fn supports_listing(&self) -> bool;
    fn supports_download(&self) -> bool;
    fn supports_removal(&self) -> bool;
    fn list_verified(
        &mut self,
        context: &GithubArtifactContext,
    ) -> RemoteBuildResult<Vec<ArtifactManifest>>;
    fn download_verified(
        &mut self,
        context: &GithubArtifactContext,
        request: &ArtifactDownloadRequest,
    ) -> RemoteBuildResult<ArtifactDownloadResult>;
    fn remove_artifacts(
        &mut self,
        context: &GithubArtifactContext,
    ) -> RemoteBuildResult<()>;

    // Provided methods
    fn supports_signed_cleanup_evidence(&self) -> bool { ... }
    fn verified_run_evidence(
        &mut self,
        _context: &GithubArtifactContext,
    ) -> RemoteBuildResult<Option<GithubVerifiedRunEvidence>> { ... }
}
Expand description

Injectable independent artifact ingestion and verification seam.

Implementations must not call back into the provider. Artifact operations may run while the provider holds the exact job identity stable.

Required Methods§

Source

fn supports_listing(&self) -> bool

Whether verified manifest enumeration is implemented.

Source

fn supports_download(&self) -> bool

Whether verified no-clobber download is implemented.

Source

fn supports_removal(&self) -> bool

Whether exact retained-artifact deletion is implemented.

Source

fn list_verified( &mut self, context: &GithubArtifactContext, ) -> RemoteBuildResult<Vec<ArtifactManifest>>

Return only independently verified manifests, or an empty vector while pending.

§Errors

Returns a typed verification or provider failure; unverified manifests must not be returned.

Source

fn download_verified( &mut self, context: &GithubArtifactContext, request: &ArtifactDownloadRequest, ) -> RemoteBuildResult<ArtifactDownloadResult>

Download and independently verify one exact manifest artifact.

§Errors

Returns a typed download, identity, or integrity failure.

Source

fn remove_artifacts( &mut self, context: &GithubArtifactContext, ) -> RemoteBuildResult<()>

Delete only artifacts owned by the exact mapped run.

The same exact request may be replayed after a crash. Implementations must therefore be idempotent, succeed when those artifacts are already absent, and never broaden deletion beyond the validated run identity.

§Errors

Returns a typed failure when exact ownership cannot be established or deletion fails.

Provided Methods§

Source

fn supports_signed_cleanup_evidence(&self) -> bool

Whether this verifier can produce attempt-scoped signed-cleanup evidence from raw reports.

Source

fn verified_run_evidence( &mut self, _context: &GithubArtifactContext, ) -> RemoteBuildResult<Option<GithubVerifiedRunEvidence>>

Return evidence produced by the same independent verification as Self::list_verified.

The default cannot claim evidence. Implementations must never synthesize this value from a caller-provided manifest or durable checkpoint.

§Errors

Returns a typed verification failure or None while exact artifacts are unavailable.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§