// ----------------------------------------------------------------------------- // IRebuildService.cs // Sprint: SPRINT_20260119_005 Reproducible Rebuild Integration // Task: REPR-001 - Rebuild Service Abstractions // Description: Main interface for reproducible rebuild orchestration. // ----------------------------------------------------------------------------- namespace StellaOps.BinaryIndex.GroundTruth.Reproducible; /// /// Service for orchestrating reproducible binary rebuilds. /// public interface IRebuildService { /// /// Requests a rebuild for a package. /// /// The rebuild request. /// Cancellation token. /// The rebuild job ID. Task RequestRebuildAsync( RebuildRequest request, CancellationToken cancellationToken = default); /// /// Gets the status of a rebuild job. /// /// The job ID. /// Cancellation token. /// The rebuild status. Task GetStatusAsync( string jobId, CancellationToken cancellationToken = default); /// /// Downloads the artifacts from a completed rebuild. /// /// The job ID. /// The directory to write artifacts. /// Cancellation token. /// The rebuild result with artifacts. Task DownloadArtifactsAsync( string jobId, string outputDirectory, CancellationToken cancellationToken = default); /// /// Performs a local rebuild using a .buildinfo file. /// /// Path to the .buildinfo file. /// Local rebuild options. /// Cancellation token. /// The rebuild result. Task RebuildLocalAsync( string buildinfoPath, LocalRebuildOptions? options = null, CancellationToken cancellationToken = default); /// /// Queries if a package has existing rebuild data. /// /// Package name. /// Package version. /// Target architecture. /// Cancellation token. /// Existing rebuild info if available. Task QueryExistingRebuildAsync( string package, string version, string architecture, CancellationToken cancellationToken = default); } /// /// Rebuild backend type. /// public enum RebuildBackend { /// /// Remote rebuild via reproduce.debian.net. /// ReproduceDebian, /// /// Local container-based rebuild. /// Local, /// /// Air-gapped rebuild from pre-fetched bundle. /// AirGap }