Feature: Resume model coverage boost As a developer I want full test coverage for the resume domain models So that the record_checkpoint error path and as_cli_dict method are verified # --- ResumeMetadata.record_checkpoint error path --- Scenario: Recording a checkpoint with negative step_index raises ValueError Given I have a ResumeMetadata instance with 5 total steps When I record a checkpoint with step_index -1 Then a ValueError should be raised with message "Checkpoint step_index must be >= 0" # --- ResumeSummary.as_cli_dict base case --- Scenario: as_cli_dict returns base fields when no optional fields are set Given I have a ResumeSummary with no optional fields When I call as_cli_dict on the resume summary Then the cli dict should have key "plan_id" And the cli dict should have key "phase" And the cli dict should have key "processing_state" And the cli dict should have key "last_completed_step" And the cli dict should have key "next_step_index" And the cli dict should have key "total_steps" And the cli dict should lack key "decision_id" And the cli dict should lack key "last_checkpoint_id" And the cli dict should lack key "sandbox_ref" # --- ResumeSummary.as_cli_dict with decision_id --- Scenario: as_cli_dict includes decision_id when set Given I have a ResumeSummary with decision_id "DEC001" When I call as_cli_dict on the resume summary Then the cli dict value for "decision_id" should be "DEC001" # --- ResumeSummary.as_cli_dict with last_checkpoint_id --- Scenario: as_cli_dict includes last_checkpoint_id when set Given I have a ResumeSummary with last_checkpoint_id "01JCHKPT0000000000000CHKPT" When I call as_cli_dict on the resume summary Then the cli dict value for "last_checkpoint_id" should be "01JCHKPT0000000000000CHKPT" # --- ResumeSummary.as_cli_dict with sandbox_ref --- Scenario: as_cli_dict includes sandbox_ref when set Given I have a ResumeSummary with sandbox_ref "/tmp/sandbox-abc123" When I call as_cli_dict on the resume summary Then the cli dict value for "sandbox_ref" should be "/tmp/sandbox-abc123" # --- ResumeSummary.as_cli_dict with all optional fields --- Scenario: as_cli_dict includes all optional fields when all are set Given I have a ResumeSummary with all optional fields set When I call as_cli_dict on the resume summary Then the cli dict should have key "decision_id" And the cli dict should have key "last_checkpoint_id" And the cli dict should have key "sandbox_ref" And the cli dict should have exactly 9 keys # --- ResumeSummary.as_cli_dict verifies correct base values --- Scenario: as_cli_dict base field values match the model Given I have a ResumeSummary with plan_id "01JABCDE1234567890ABCDEFGH" and phase "execute" and state "processing" and last_step 2 and next_step 3 and total 5 When I call as_cli_dict on the resume summary Then the cli dict value for "plan_id" should be "01JABCDE1234567890ABCDEFGH" And the cli dict value for "phase" should be "execute" And the cli dict value for "processing_state" should be "processing" And the cli dict integer for "last_completed_step" should be 2 And the cli dict integer for "next_step_index" should be 3 And the cli dict integer for "total_steps" should be 5