// ----------------------------------------------------------------------------- // SchedulerEnqueueResult.cs // Sprint: SPRINT_20260105_002_002_SCHEDULER_hlc_queue_chain // Task: SQC-009 - Implement HlcSchedulerEnqueueService // ----------------------------------------------------------------------------- using StellaOps.HybridLogicalClock; namespace StellaOps.Scheduler.Queue.Models; /// /// Result of an HLC-ordered enqueue operation. /// Contains the assigned HLC timestamp, job ID, and chain link. /// public sealed record SchedulerEnqueueResult { /// /// HLC timestamp assigned at enqueue time. /// This determines the job's position in the total order. /// public required HlcTimestamp Timestamp { get; init; } /// /// Deterministic job ID computed from payload. /// public required Guid JobId { get; init; } /// /// Chain link (SHA-256 hash) proving sequence position. /// link = Hash(prev_link || job_id || t_hlc || payload_hash) /// public required byte[] Link { get; init; } /// /// SHA-256 hash of the canonical payload. /// public required byte[] PayloadHash { get; init; } /// /// Previous chain link (null for first entry in partition). /// public byte[]? PrevLink { get; init; } /// /// Whether this was a duplicate submission (idempotent). /// If true, the existing job's values are returned. /// public bool IsDuplicate { get; init; } }