//! Async post-validation attestation placeholder (ADR-026 / D14).
//!
//! When an operation declares `validation_sla = 'EventualWithin _` or
//! `'Background`, the runtime schedules post-validators off the critical
//! path and emits an attestation op once they return. The full pipeline
//! (op kind + materialisation into the substrate) lands alongside the
//! runtime in O2; this module reserves the type and api surface so the
//! validation framework can refer to it without forward-referencing
//! work that has not yet happened.

use serde::{Deserialize, Serialize};

use crate::validation::verdict::Verdict;

/// A single async attestation result — what a post-validator returned
/// after the op had already committed. Materialises as an
/// `OpPayload::AttestationOp` variant once the runtime lands.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct AttestationResult {
    /// Id of the operation whose post-validation produced this result.
    pub op_id: String,
    /// Id of the validator that produced the verdict.
    pub validator_id: String,
    /// The verdict itself.
    pub verdict: Verdict,
    /// Hex-encoded `state_root` at the time the attestation was emitted.
    pub state_root_hex: String,
}
