namespace ZB.MOM.WW.Secrets.Rotation;

/// <summary>
/// The outcome of a <see cref="KekRotationService.RewrapAllAsync"/> pass: how many rows were
/// re-wrapped onto the new KEK, how many were already on it (skipped), and the total scanned.
/// Carries no secret material.
/// </summary>
public sealed record RewrapReport
{
    /// <summary>Total number of rows scanned (includes tombstoned rows).</summary>
    public required int Total { get; init; }

    /// <summary>Number of rows re-wrapped from the old KEK onto the new KEK in this pass.</summary>
    public required int Rewrapped { get; init; }

    /// <summary>
    /// Number of rows already wrapped by the new KEK and therefore skipped — the count that makes a
    /// re-run idempotent (a completed rotation reports <see cref="Rewrapped"/> 0 and all rows here).
    /// </summary>
    public required int AlreadyCurrent { get; init; }
}
