using System.Collections.Immutable;
using StellaOps.Feedser.Models;

namespace StellaOps.Feedser.Core;

/// <summary>
/// Result emitted by <see cref="CanonicalMerger"/> describing the merged advisory and analytics about key decisions.
/// </summary>
public sealed record CanonicalMergeResult(Advisory Advisory, ImmutableArray<FieldDecision> Decisions);

/// <summary>
/// Describes how a particular canonical field was chosen during conflict resolution.
/// </summary>
public sealed record FieldDecision(
    string Field,
    string? SelectedSource,
    string DecisionReason,
    DateTimeOffset? SelectedModified,
    ImmutableArray<string> ConsideredSources);
