"""Immutable analysis result for the analysis framework.

This module defines :class:`AnalysisResult`, the output of a single
analyzer execution.  Results contain no database or file logic.
"""

from __future__ import annotations

from dataclasses import dataclass

from analyzer.feature import FeatureSet


@dataclass(frozen=True)
class AnalysisResult:
    """Immutable output of one analyzer run.

    Attributes:
        analyzer_name: Name of the analyzer that produced this result.
        analyzer_version: Version of the analyzer.
        execution_time_ms: Wall-clock execution time in milliseconds.
        success: Whether the analyzer completed without errors.
        warnings: Tuple of warning messages produced by the analyzer.
        feature_set: :class:`FeatureSet` containing all features.
    """

    analyzer_name: str
    analyzer_version: str
    execution_time_ms: float
    success: bool
    warnings: tuple[str, ...]
    feature_set: FeatureSet
