moo.agent.tests.test_session_log

Tests for moo/agent/session_log.py.

Previously untested. Exercises the log-parsing fallbacks in read_prior_session including empty directories, goal extraction, special-token scrubbing, long-line truncation, the plan-done marker shortcut, and multi-line entry continuation.

Functions

test_empty_logs_dir_returns_empty(tmp_path)

test_goal_prefix_stripped(tmp_path)

test_last_goal_extracted(tmp_path)

test_long_line_truncated_to_120_chars(tmp_path)

test_most_recent_prior_log_chosen(tmp_path)

test_multi_line_entry_continuation(tmp_path)

test_no_goal_returns_empty_goal(tmp_path)

test_only_current_log_returns_empty(tmp_path)

test_plan_done_marker_overrides_summary(tmp_path)

test_recent_40_entries_cap(tmp_path)

test_resume_kinds_filtered(tmp_path)

test_session_label_in_summary_header(tmp_path)

test_short_line_not_truncated(tmp_path)

test_special_tokens_stripped_from_goal(tmp_path)

test_special_tokens_stripped_from_summary(...)