SELECT [Id], [WorkspaceId], [AgentId], [DecisionKey], [Action], [Summary], [Rationale], [Confidence], [ScoreDelta], [SupportingSignalsJson], [MetadataJson], [GeneratedAt], [Status], [StatusUpdatedAt], [StatusChangedByUserId], [StatusReason], [ExpiresAt], [CreatedAt], [UpdatedAt]
FROM [dbo].[AgentOutcomeLearningProposals]
WHERE [Status] = 1 -- Pending
  AND [ExpiresAt] IS NOT NULL
  AND [ExpiresAt] BETWEEN @NotBefore
  AND @NotAfter
ORDER BY [ExpiresAt];
