//! `FactOutcome` - per-fact resolution result of the finalize walk.
//!
//! Split out of `finalize_session.rs` (R8). The enum body was split when
//! the misleading-`finalized`-log bug was fixed: the historical `Finalized`
//! variant conflated two semantically distinct outcomes (true promotion to
//! `Accepted` vs. staying `Pending` because the validation gate rejected
//! the promotion), which is exactly why an operator seeing `finalized: 7`
//! could not tell whether 7 facts became searchable or zero did.

/// Per-fact resolution outcome. Internal to the use case; surfaced in
/// [`super::FinalizeStats`] via the `tally` step.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum FactOutcome {
    /// Pending fact was reclassified standalone (no candidate, or only
    /// neutral NLI verdicts) AND the recomputed confidence cleared the
    /// accept threshold — the fact is now `Accepted` and searchable.
    Accepted,
    /// Pending fact was reclassified standalone but the recomputed
    /// confidence stayed below the accept threshold (e.g. single source,
    /// no NLI bonus). Status remains `Pending`; the fact will be picked up
    /// by the next finalize cycle once additional evidence arrives.
    RemainedPending,
    /// Pending fact was merged into an existing accepted fact and the twin
    /// was marked `Rejected`.
    Merged,
    /// Pending fact drifted (contradiction) and was bidirectionally flagged
    /// against an existing fact. Status unchanged on both sides.
    Conflict,
    /// Pending fact could not be resolved (NLI unavailable, save failed, ...).
    /// Stays `Pending` for the next cycle. NOT tallied into any counter so
    /// operators can detect "facts stuck in pending" via `processed - (finalized
    /// + merged + conflicts)`.
    Skipped,
}
