feat: preserve due operation provenance (AEG-V15-035)

Carries scheduledFor, catch-up policy, and maxCatchUp from the scheduler through the request model and transactional outbox. Evidence: targeted Release tests 5/5 passed; TRX SHA256 C1BF3EF274702305A29673D5B6A1C3A98D08B1716DA3CD8CB0EE710B5E6C12E6. Schedules remain disabled.
This commit is contained in:
2026-08-09 02:04:26 +09:00
parent dd352596fc
commit d18f6a7a67
10 changed files with 168 additions and 5 deletions
@@ -14,6 +14,9 @@ public sealed class ModelOperationRequestService(
string scopeKey,
string automationMode,
string idempotencyKey,
DateTimeOffset scheduledFor,
string catchUpPolicy,
int maxCatchUp,
string correlationId,
CancellationToken cancellationToken)
{
@@ -21,6 +24,8 @@ public sealed class ModelOperationRequestService(
ModelOperationExecutionBoundary.EnsureAllowed(definition);
if (!definition.AutomationMode.ToContractValue().Equals(automationMode, StringComparison.OrdinalIgnoreCase))
throw new InvalidOperationException("Schedule automation mode does not match the approved operation registry.");
if (maxCatchUp is < 0 or > 31) throw new ArgumentOutOfRangeException(nameof(maxCatchUp));
if (string.IsNullOrWhiteSpace(catchUpPolicy)) throw new ArgumentException("Catch-up policy is required.", nameof(catchUpPolicy));
var now = clock.UtcNow;
var context = await contextReader.ReadAsync(scopeKey, now, cancellationToken);
@@ -35,6 +40,9 @@ public sealed class ModelOperationRequestService(
scopeKey,
definition.AutomationMode.ToContractValue(),
idempotencyKey,
scheduledFor,
catchUpPolicy,
maxCatchUp,
context,
correlationId,
now);
@@ -28,6 +28,9 @@ public sealed record ModelOperationRequest(
string ScopeKey,
string AutomationMode,
string IdempotencyKey,
DateTimeOffset ScheduledFor,
string CatchUpPolicy,
int MaxCatchUp,
ApprovedModelContext Context,
string CorrelationId,
DateTimeOffset RequestedAt);
@@ -82,6 +85,9 @@ public interface IModelOperationRequestService
string scopeKey,
string automationMode,
string idempotencyKey,
DateTimeOffset scheduledFor,
string catchUpPolicy,
int maxCatchUp,
string correlationId,
CancellationToken cancellationToken);
}