UPDATE [dbo].[TaskExecutions]
SET [ExecutionMode] = @ExecutionMode, [WorkKind] = @WorkKind, [ExecutionType] = @ExecutionType, [AssignedAgent] = @AssignedAgent, [QueuedAt] = @QueuedAt, [StartedAt] = @StartedAt, [FinishedAt] = @FinishedAt, [Status] = @Status, [InputDataJson] = @InputDataJson, [OutputDataJson] = @OutputDataJson, [OutputDataRef] = @OutputDataRef, [ErrorMessage] = @ErrorMessage, [CorrelationId] = @CorrelationId, [ReplayedFromTaskId] = @ReplayedFromTaskId, [WorkspaceId] = @WorkspaceId, [AssignmentType] = @AssignmentType, [ConfidenceScore] = @ConfidenceScore, [RetryCount] = @RetryCount, [LastRetryAt] = @LastRetryAt, [MaxRetryAttempts] = @MaxRetryAttempts, [RetryReason] = @RetryReason, [Priority] = @Priority, [RetryOfTaskId] = @RetryOfTaskId, [SuggestionLogId] = @SuggestionLogId, [CreatedAt] = @CreatedAt, [SuggestedPatchJson] = @SuggestedPatchJson, [AiReviewEvidenceManifestJson] = @AiReviewEvidenceManifestJson, [AiReviewStatus] = @AiReviewStatus, [CreatedVia] = @CreatedVia, [Language] = @Language, [Domain] = @Domain, [RepositoryUrl] = @RepositoryUrl, [Branch] = @Branch, [FilePath] = @FilePath, [Prompt] = @Prompt, [OutputFormat] = @OutputFormat, [TriggerSource] = @TriggerSource, [ExternalId] = @ExternalId, [ExternalSystem] = @ExternalSystem
WHERE [Id] = @Id
  AND [RowVersion] = @RowVersion;
