// -----------------------------------------------------------------------------
// IBatchSnapshotService.cs
// Sprint: SPRINT_20260105_002_002_SCHEDULER_hlc_queue_chain
// Task: SQC-013 - Implement BatchSnapshotService
// -----------------------------------------------------------------------------
using StellaOps.HybridLogicalClock;
using StellaOps.Scheduler.Queue.Models;
namespace StellaOps.Scheduler.Queue.Services;
///
/// Service for creating and managing batch snapshots of the scheduler log.
/// Snapshots provide audit anchors for verifying chain integrity.
///
public interface IBatchSnapshotService
{
///
/// Creates a batch snapshot for a given HLC range.
///
/// Tenant identifier.
/// Start HLC timestamp (inclusive).
/// End HLC timestamp (inclusive).
/// Cancellation token.
/// The created snapshot.
/// If no jobs exist in the specified range.
Task CreateSnapshotAsync(
string tenantId,
HlcTimestamp startT,
HlcTimestamp endT,
CancellationToken ct = default);
///
/// Gets a batch snapshot by ID.
///
Task GetByIdAsync(Guid batchId, CancellationToken ct = default);
///
/// Gets recent batch snapshots for a tenant.
///
Task> GetRecentAsync(
string tenantId,
int limit = 10,
CancellationToken ct = default);
///
/// Gets the latest batch snapshot for a tenant.
///
Task GetLatestAsync(
string tenantId,
CancellationToken ct = default);
///
/// Finds snapshots that contain a specific HLC timestamp.
///
Task> FindContainingAsync(
string tenantId,
HlcTimestamp timestamp,
CancellationToken ct = default);
}