Coverage for little_loops / cli / issues / append_log.py: 0%
12 statements
« prev ^ index » next coverage.py v7.12.0, created at 2026-03-18 16:18 -0500
« prev ^ index » next coverage.py v7.12.0, created at 2026-03-18 16:18 -0500
1"""ll-issues append-log: Append a session log entry to an issue file."""
3from __future__ import annotations
5import sys
6from pathlib import Path
7from typing import TYPE_CHECKING
9if TYPE_CHECKING:
10 from little_loops.config import BRConfig
13def cmd_append_log(config: BRConfig, args: object) -> int:
14 """Append a correctly-formatted session log entry to an issue file.
16 Args:
17 config: Project configuration
18 args: Parsed arguments with issue_path and command attributes
20 Returns:
21 Exit code (0 = success, 1 = error)
22 """
23 from little_loops.session_log import append_session_log_entry
25 issue_path = Path(args.issue_path) # type: ignore[attr-defined]
26 success = append_session_log_entry(issue_path, args.log_command) # type: ignore[attr-defined]
27 if not success:
28 print(
29 "Warning: could not resolve session JSONL; entry not written.",
30 file=sys.stderr,
31 )
32 return 1
33 return 0