UPDATE [dbo].[AgentOutcomeLearningProposals]
SET [Status] = @NewStatus, [StatusUpdatedAt] = @StatusUpdatedAt, [StatusChangedByUserId] = @StatusChangedByUserId, [StatusReason] = @StatusReason, [ExpiresAt] = @ExpiresAt, [UpdatedAt] = SYSUTCDATETIME()
    OUTPUT inserted.[Id], inserted.[WorkspaceId], inserted.[AgentId], inserted.[DecisionKey], inserted.[Action], inserted.[Summary], inserted.[Rationale], inserted.[Confidence], inserted.[ScoreDelta], inserted.[SupportingSignalsJson], inserted.[MetadataJson], inserted.[GeneratedAt], inserted.[Status], inserted.[StatusUpdatedAt], inserted.[StatusChangedByUserId], inserted.[StatusReason], inserted.[ExpiresAt], inserted.[CreatedAt], inserted.[UpdatedAt]
WHERE [WorkspaceId] = @WorkspaceId
  AND [Id] = @ProposalId
  AND [Status] = @ExpectedStatus;
