Coverage for src/pipeline/issue_result.py: 100%

1"""Issue result dataclass for MalaOrchestrator.

2

3 This module contains the IssueResult dataclass which holds the result

4 of a single issue implementation.

5"""

6

7 from __future__ import annotations

8

9 from dataclasses import dataclass

10 from typing import TYPE_CHECKING

11

12 if TYPE_CHECKING:

13 from pathlib import Path

14

15 from src.core.models import IssueResolution

16 from src.core.protocols import ReviewIssueProtocol

17

18

19@dataclass

20 class IssueResult:

21 """Result from a single issue implementation."""

22

23 issue_id: str

24 agent_id: str

25 success: bool

26 summary: str

27 duration_seconds: float = 0.0

28 session_id: str | None = None # Claude SDK session ID

29 gate_attempts: int = 1 # Number of gate retry attempts

30 review_attempts: int = 0 # Number of Codex review attempts

31 resolution: IssueResolution | None = None # Resolution outcome if using markers

32 low_priority_review_issues: list[ReviewIssueProtocol] | None = None # P2/P3 issues

33 session_log_path: Path | None = None # Path to session log file

34 review_log_path: str | None = None # Path to Cerberus review session log