diff --git a/CHANGELOG.md b/CHANGELOG.md index 6146d9c..3590e87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +- **The inert `claudetm start --checkpointing` flag, `TaskOptions.enable_checkpointing`, and the `enable_checkpointing` REST/MCP config field.** Nothing read the option and no checkpoint manager was wired into a run, so the flag advertised rollbacks that never existed. The REST `POST /config` request and `/status` options response and the MCP `update_config` tool no longer carry the field, and the docs and examples that presented checkpointing as a feature are gone. A `state.json` that still contains `enable_checkpointing` under `options` loads normally (the key is ignored) and is dropped on the next save. - **Removed the dead public helper `get_context_window` from `claude_task_master.core`.** Defined in `core/agent_models.py`, re-exported through the `core` package facade and referenced by a docstring clause in `core/config.py`, it had no caller anywhere in the codebase, and its return value set no compaction threshold and no SDK context window — a model-to-window mapping nothing consumed. The data behind it is retained: `MODEL_CONTEXT_WINDOWS`, `MODEL_CONTEXT_WINDOWS_STANDARD`, `DEFAULT_COMPACT_THRESHOLD_PERCENT` and `ContextWindowsConfig` are unchanged; only the unreachable accessor and the text naming it are deleted. - **Removed the dead `_format_pr_comments` GraphQL formatter (`github/client_pr_helpers.py`).** The REST path `_format_pr_comments_from_rest` is the only PR-comment formatter with a caller; the GraphQL variant had no call site anywhere in the codebase and no test references it. Removed together with its entry in both `__all__` lists (`client_pr_helpers.py` and `client_pr.py`) and the corresponding `client_pr` backward-compat re-export; the five live sibling helpers are unchanged. diff --git a/docs/api-reference.md b/docs/api-reference.md index 2513619..6d36421 100644 --- a/docs/api-reference.md +++ b/docs/api-reference.md @@ -153,7 +153,6 @@ Get comprehensive status information about the current task. "max_sessions": 10, "max_prs": null, "pause_on_pr": false, - "enable_checkpointing": false, "log_level": "normal", "log_format": "text", "pr_per_task": false, @@ -175,8 +174,6 @@ Get comprehensive status information about the current task. } ``` -**Note:** `enable_checkpointing` is reported for compatibility only: it is accepted and stored, but has no effect because no checkpointing is implemented. - **Status Values:** - `planning` - Task is in planning phase @@ -422,7 +419,6 @@ Update runtime task configuration options. - `max_sessions` (integer, 1-1000) - Maximum work sessions before pausing - `max_prs` (integer, 1-100) - Maximum number of pull requests to create - `pause_on_pr` (boolean) - Whether to pause after creating PR -- `enable_checkpointing` (boolean) - Accepted and stored, but has no effect because no checkpointing is implemented - `log_level` (string) - Log level: `quiet`, `normal`, `verbose` - `log_format` (string) - Log format: `text`, `json` - `pr_per_task` (boolean) - Create PR per task vs per group diff --git a/docs/mcp-tools.md b/docs/mcp-tools.md index d9c97f5..b7471f1 100644 --- a/docs/mcp-tools.md +++ b/docs/mcp-tools.md @@ -444,7 +444,6 @@ Update task configuration options at runtime. | `max_sessions` | integer | No | Max work sessions before pausing | | `max_prs` | integer | No | Max pull requests to create | | `pause_on_pr` | boolean | No | Pause after creating PR | -| `enable_checkpointing` | boolean | No | Accepted and stored, but has no effect because no checkpointing is implemented | | `log_level` | string | No | Log level: quiet, normal, verbose | | `log_format` | string | No | Log format: text, json | | `pr_per_task` | boolean | No | Create PR per task vs per group | diff --git a/examples/08-advanced-workflows.md b/examples/08-advanced-workflows.md index 6110952..3d9ab5a 100644 --- a/examples/08-advanced-workflows.md +++ b/examples/08-advanced-workflows.md @@ -334,15 +334,6 @@ claudetm start "Add pagination to API" --model sonnet claudetm start "Design and implement microservice architecture" --model opus ``` -### 5. Checkpointing for Safety - -```bash -# Enable checkpointing for risky changes -claudetm start "Major database schema refactor" --checkpointing - -# If something goes wrong, checkpoint allows rollback -``` - ## Handling Edge Cases ### CI Failures During Multi-Step Process diff --git a/examples/README.md b/examples/README.md index 05171a5..fff321d 100644 --- a/examples/README.md +++ b/examples/README.md @@ -102,15 +102,6 @@ claudetm start "Complex task" --max-sessions 10 # Stops after 10 work sessions ``` -## Checkpointing (Experimental) - -Enable file checkpointing for safe rollbacks: - -```bash -claudetm start "Risky refactor" --checkpointing -# Can rollback changes if things go wrong -``` - ## Troubleshooting ### Check System Setup diff --git a/src/claude_task_master/api/models_task.py b/src/claude_task_master/api/models_task.py index 7606e6b..ba33e65 100644 --- a/src/claude_task_master/api/models_task.py +++ b/src/claude_task_master/api/models_task.py @@ -114,8 +114,6 @@ class ConfigUpdateRequest(_RemovedFieldGuard): max_sessions: Maximum number of work sessions before pausing. max_prs: Maximum number of pull requests to create. pause_on_pr: Whether to pause after creating PR for manual review. - enable_checkpointing: Accepted and stored, but has no effect because no - checkpointing is implemented. log_level: Log level (quiet, normal, verbose). log_format: Log format (text, json). pr_per_task: Whether to create PR per task vs per group. @@ -154,12 +152,6 @@ class ConfigUpdateRequest(_RemovedFieldGuard): default=None, description="Whether to pause after creating PR for manual review", ) - enable_checkpointing: bool | None = Field( - default=None, - description=( - "Accepted and stored, but has no effect because no checkpointing is implemented" - ), - ) log_level: LogLevel | None = Field( default=None, description="Log level (quiet, normal, verbose)", @@ -291,8 +283,6 @@ class TaskOptionsResponse(BaseModel): max_sessions: Maximum number of work sessions before pausing. max_prs: Maximum number of pull requests to create. pause_on_pr: Whether to pause after creating PR for manual review. - enable_checkpointing: Accepted and stored, but has no effect because no - checkpointing is implemented. log_level: Current log level. log_format: Current log format. pr_per_task: Whether to create PR per task vs per group. @@ -305,7 +295,6 @@ class TaskOptionsResponse(BaseModel): max_sessions: int | None max_prs: int | None pause_on_pr: bool - enable_checkpointing: bool log_level: str log_format: str pr_per_task: bool diff --git a/src/claude_task_master/api/routes_info.py b/src/claude_task_master/api/routes_info.py index a777627..23dbd36 100644 --- a/src/claude_task_master/api/routes_info.py +++ b/src/claude_task_master/api/routes_info.py @@ -161,7 +161,6 @@ async def get_status(request: Request) -> TaskStatusResponse | JSONResponse: max_sessions=state.options.max_sessions, max_prs=state.options.max_prs, pause_on_pr=state.options.pause_on_pr, - enable_checkpointing=state.options.enable_checkpointing, log_level=state.options.log_level, log_format=state.options.log_format, pr_per_task=state.options.pr_per_task, diff --git a/src/claude_task_master/api/routes_task.py b/src/claude_task_master/api/routes_task.py index 97bdabf..660d789 100644 --- a/src/claude_task_master/api/routes_task.py +++ b/src/claude_task_master/api/routes_task.py @@ -112,7 +112,6 @@ async def init_task( max_sessions=task_init.max_sessions, max_prs=task_init.max_prs, pause_on_pr=task_init.pause_on_pr, - enable_checkpointing=False, # Default to False log_level="normal", # Default to normal log_format="text", # Default to text pr_per_task=False, # Default to False diff --git a/src/claude_task_master/cli_commands/workflow_start.py b/src/claude_task_master/cli_commands/workflow_start.py index 1b756f4..24cf376 100644 --- a/src/claude_task_master/cli_commands/workflow_start.py +++ b/src/claude_task_master/cli_commands/workflow_start.py @@ -96,11 +96,6 @@ def start( "--pause-on-pr", help="Pause after creating PR for manual review", ), - enable_checkpointing: bool = typer.Option( - False, - "--checkpointing", - help="Accepted and stored, but has no effect because no checkpointing is implemented", - ), log_level: str = typer.Option( "normal", "--log-level", @@ -253,7 +248,6 @@ def start( max_sessions=max_sessions, max_prs=max_prs, pause_on_pr=pause_on_pr, - enable_checkpointing=enable_checkpointing, log_level=log_level.lower(), log_format=log_format.lower(), pr_per_task=pr_per_task, diff --git a/src/claude_task_master/core/control_ops.py b/src/claude_task_master/core/control_ops.py index 6a7e282..c17d28c 100644 --- a/src/claude_task_master/core/control_ops.py +++ b/src/claude_task_master/core/control_ops.py @@ -245,8 +245,6 @@ def update_config(self, **kwargs: Any) -> ControlResult: - auto_merge: bool - Whether to auto-merge PRs - max_sessions: int | None - Maximum number of sessions - pause_on_pr: bool - Whether to pause on PR creation - - enable_checkpointing: bool - Accepted and stored, but has no effect - (no checkpointing is implemented) - log_level: str - Log level (quiet, normal, verbose) - log_format: str - Log format (text, json) - pr_per_task: bool - Whether to create PR per task diff --git a/src/claude_task_master/core/state.py b/src/claude_task_master/core/state.py index 0fabf59..476aad7 100644 --- a/src/claude_task_master/core/state.py +++ b/src/claude_task_master/core/state.py @@ -413,8 +413,6 @@ def update_options( - auto_merge: bool - Whether to auto-merge PRs - max_sessions: int | None - Maximum number of sessions - pause_on_pr: bool - Whether to pause on PR creation - - enable_checkpointing: bool - Accepted and stored, but has no effect - (no checkpointing is implemented) - log_level: str - Log level (quiet, normal, verbose) - log_format: str - Log format (text, json) - pr_per_task: bool - Whether to create PR per task diff --git a/src/claude_task_master/core/state_models.py b/src/claude_task_master/core/state_models.py index a0b4f5b..be0ac0f 100644 --- a/src/claude_task_master/core/state_models.py +++ b/src/claude_task_master/core/state_models.py @@ -38,7 +38,6 @@ class TaskOptions(BaseModel): max_sessions: int | None = None max_prs: int | None = None pause_on_pr: bool = False - enable_checkpointing: bool = False log_level: str = "normal" # quiet, normal, verbose log_format: str = "text" # text, json pr_per_task: bool = False # If True, create PR per task; if False, PR per group diff --git a/src/claude_task_master/mcp/server_specs.py b/src/claude_task_master/mcp/server_specs.py index 901dbcf..9897e17 100644 --- a/src/claude_task_master/mcp/server_specs.py +++ b/src/claude_task_master/mcp/server_specs.py @@ -192,8 +192,6 @@ " max_sessions: Maximum number of work sessions before pausing.\n" " max_prs: Maximum number of pull requests to create.\n" " pause_on_pr: Whether to pause after creating PR for manual review.\n" - " enable_checkpointing: Accepted and stored, but has no effect because\n" - " no checkpointing is implemented.\n" " log_level: Log level (quiet, normal, verbose).\n" " log_format: Log format (text, json).\n" " pr_per_task: Whether to create PR per task vs per group.\n" diff --git a/src/claude_task_master/mcp/tool_handlers_control.py b/src/claude_task_master/mcp/tool_handlers_control.py index 9a04c4b..c9c1587 100644 --- a/src/claude_task_master/mcp/tool_handlers_control.py +++ b/src/claude_task_master/mcp/tool_handlers_control.py @@ -185,7 +185,6 @@ def update_config( max_sessions: int | None = None, max_prs: int | None = None, pause_on_pr: bool | None = None, - enable_checkpointing: bool | None = None, log_level: str | None = None, log_format: str | None = None, pr_per_task: bool | None = None, @@ -207,8 +206,6 @@ def update_config( max_sessions: Maximum number of work sessions before pausing. max_prs: Maximum number of pull requests to create. pause_on_pr: Whether to pause after creating PR for manual review. - enable_checkpointing: Accepted and stored, but has no effect because no - checkpointing is implemented. log_level: Log level (quiet, normal, verbose). log_format: Log format (text, json). pr_per_task: Whether to create PR per task vs per group. @@ -235,8 +232,6 @@ def update_config( kwargs["max_prs"] = max_prs if pause_on_pr is not None: kwargs["pause_on_pr"] = pause_on_pr - if enable_checkpointing is not None: - kwargs["enable_checkpointing"] = enable_checkpointing if log_level is not None: kwargs["log_level"] = log_level if log_format is not None: diff --git a/tests/api/test_auth.py b/tests/api/test_auth.py index 4eee115..c3bf36d 100644 --- a/tests/api/test_auth.py +++ b/tests/api/test_auth.py @@ -95,7 +95,6 @@ def state_file(state_dir: Path) -> Path: "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -170,7 +169,6 @@ def test_health_returns_degraded_for_blocked_task( "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, diff --git a/tests/api/test_doc_field_lists.py b/tests/api/test_doc_field_lists.py index a4b790e..19761cb 100644 --- a/tests/api/test_doc_field_lists.py +++ b/tests/api/test_doc_field_lists.py @@ -69,25 +69,6 @@ # uses for its parameter tables. _ROW_RE = re.compile(r"^\|\s*`(?P[A-Za-z_][A-Za-z0-9_]*)`(?P.*)$") -# Phrases that tell the reader the option is accepted and stored but does -# nothing - nothing in the tree implements checkpointing. -_INERT_PHRASES = ( - "no effect", - "no checkpointing", - "not implemented", - "unimplemented", - "not supported", - "unsupported", - "inert", - "no-op", - "does nothing", - "ignored", -) - -# Phrases that tell the reader the option is still accepted and stored. -_ACCEPTED_PHRASES = ("accepted", "stored") - - # ============================================================================= # Markdown parsing # ============================================================================= @@ -197,26 +178,6 @@ def _table_fields(block: list[str]) -> list[tuple[str, str]]: return fields -def _prose(section: list[str]) -> list[str]: - """The lines of a section that are not inside a fenced code block. - - Args: - section: The lines of a section. - - Returns: - The prose lines only. - """ - prose: list[str] = [] - in_fence = False - for line in section: - if line.strip().startswith("```"): - in_fence = not in_fence - continue - if not in_fence: - prose.append(line) - return prose - - def _json_blocks(section: list[str]) -> list[str]: """The bodies of the fenced code blocks of a section. @@ -274,41 +235,6 @@ def _assert_same_fields( ) -def _assert_inert(text: str, label: str) -> None: - """Assert that an option is documented as accepted but without effect. - - Args: - text: The documented text of the option. - label: How the option is named in the failure message. - - Raises: - AssertionError: If the text does not say the option is inert. - """ - lowered = text.lower() - assert any(phrase in lowered for phrase in _ACCEPTED_PHRASES), ( - f"{label}: the option must be documented as accepted and stored, got: {text.strip()!r}" - ) - assert any(phrase in lowered for phrase in _INERT_PHRASES), ( - f"{label}: the option must be documented as having no effect, got: {text.strip()!r}" - ) - - -def _field_text(fields: list[tuple[str, str]], name: str) -> str: - """The documented text of one field. - - Args: - fields: The parsed ``(name, text)`` pairs of a documented list. - name: The field to look up. - - Returns: - The text that follows the field name, or an empty string. - """ - for field_name, rest in fields: - if field_name == name: - return rest - return "" - - def _tool_parameters(fn: Callable[..., Any]) -> set[str]: """The parameters an MCP tool exposes to clients. @@ -417,35 +343,6 @@ def test_mcp_tools_expose_no_parameters_beyond_the_model_fields_plus_state_dir() ) -# ============================================================================= -# Checkpointing -# ============================================================================= - - -def test_checkpointing_is_documented_as_accepted_but_inert() -> None: - """Both config surfaces document `enable_checkpointing` as inert: nothing implements it.""" - surfaces = { - "docs/api-reference.md PATCH /config": _bullet_fields( - _block_after_label(_API_REFERENCE, "#### `PATCH /config`", "**Supported Options:**") - ), - "docs/mcp-tools.md update_config": _table_fields( - _block_after_label(_MCP_TOOLS, "#### `update_config`", "**Parameters:**") - ), - } - for label, fields in surfaces.items(): - text = _field_text(fields, "enable_checkpointing") - assert text, f"{label}: enable_checkpointing is not documented" - _assert_inert(text, f"{label} enable_checkpointing") - - -def test_status_sample_reports_checkpointing_as_inert() -> None: - """The `GET /status` note says the reported checkpointing flag does nothing.""" - prose = _prose(_section(_API_REFERENCE, "#### `GET /status`")) - mentions = " ".join(line for line in prose if "enable_checkpointing" in line) - assert mentions, "docs/api-reference.md GET /status does not mention enable_checkpointing" - _assert_inert(mentions, "docs/api-reference.md GET /status enable_checkpointing") - - # ============================================================================= # Server behaviour # ============================================================================= diff --git a/tests/api/test_routes_config.py b/tests/api/test_routes_config.py index a96eeac..23bd7a0 100644 --- a/tests/api/test_routes_config.py +++ b/tests/api/test_routes_config.py @@ -35,7 +35,6 @@ def test_patch_config_success(api_client, api_complete_state, api_state_file, ap "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -72,7 +71,6 @@ def test_patch_config_success(api_client, api_complete_state, api_state_file, ap assert updated_state["options"]["max_sessions"] == 20 assert updated_state["options"]["pause_on_pr"] is True # Other options should remain unchanged - assert updated_state["options"]["enable_checkpointing"] is False assert updated_state["options"]["log_level"] == "normal" @@ -94,7 +92,6 @@ def test_patch_config_single_field(api_client, api_complete_state, api_state_fil "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -158,7 +155,6 @@ def test_patch_config_with_enum_values(api_client, api_complete_state, api_state "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -198,7 +194,6 @@ def test_patch_config_invalid_max_sessions(api_client, api_complete_state, api_s "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -231,7 +226,6 @@ def test_patch_config_all_fields(api_client, api_complete_state, api_state_file) "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -245,7 +239,6 @@ def test_patch_config_all_fields(api_client, api_complete_state, api_state_file) "auto_merge": False, "max_sessions": 50, "pause_on_pr": True, - "enable_checkpointing": True, "log_level": "verbose", "log_format": "json", "pr_per_task": True, @@ -255,14 +248,13 @@ def test_patch_config_all_fields(api_client, api_complete_state, api_state_file) assert response.status_code == 200 data = response.json() assert data["success"] is True - assert len(data["details"]["updated"]) == 7 # All fields updated + assert len(data["details"]["updated"]) == 6 # All fields updated # Verify all fields were updated updated_state = json.loads(api_state_file.read_text()) assert updated_state["options"]["auto_merge"] is False assert updated_state["options"]["max_sessions"] == 50 assert updated_state["options"]["pause_on_pr"] is True - assert updated_state["options"]["enable_checkpointing"] is True assert updated_state["options"]["log_level"] == "verbose" assert updated_state["options"]["log_format"] == "json" assert updated_state["options"]["pr_per_task"] is True @@ -286,7 +278,6 @@ def test_patch_config_none_values(api_client, api_complete_state, api_state_file "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, diff --git a/tests/api/test_routes_control.py b/tests/api/test_routes_control.py index ce9c5b5..0f7cad1 100644 --- a/tests/api/test_routes_control.py +++ b/tests/api/test_routes_control.py @@ -32,7 +32,6 @@ def test_post_control_stop_success(api_client, api_complete_state, api_state_fil "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -82,7 +81,6 @@ def test_post_control_stop_with_cleanup( "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -128,7 +126,6 @@ def test_post_control_stop_from_planning(api_client, api_complete_state, api_sta "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -163,7 +160,6 @@ def test_post_control_stop_from_blocked(api_client, api_complete_state, api_stat "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -198,7 +194,6 @@ def test_post_control_stop_from_paused(api_client, api_complete_state, api_state "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -245,7 +240,6 @@ def test_post_control_stop_from_success(api_client, api_complete_state, api_stat "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -281,7 +275,6 @@ def test_post_control_stop_from_failed(api_client, api_complete_state, api_state "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -317,7 +310,6 @@ def test_post_control_stop_optional_fields(api_client, api_complete_state, api_s "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -358,7 +350,6 @@ def test_post_control_resume_from_paused(api_client, api_complete_state, api_sta "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -399,7 +390,6 @@ def test_post_control_resume_from_blocked(api_client, api_complete_state, api_st "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -434,7 +424,6 @@ def test_post_control_resume_from_stopped(api_client, api_complete_state, api_st "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -469,7 +458,6 @@ def test_post_control_resume_from_working(api_client, api_complete_state, api_st "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -516,7 +504,6 @@ def test_post_control_resume_from_success(api_client, api_complete_state, api_st "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -552,7 +539,6 @@ def test_post_control_resume_from_failed(api_client, api_complete_state, api_sta "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -593,7 +579,6 @@ def test_patch_config_after_stop(api_client, api_complete_state, api_state_file) "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -637,7 +622,6 @@ def test_patch_config_after_resume(api_client, api_complete_state, api_state_fil "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -686,7 +670,6 @@ def test_stop_and_resume_workflow(api_client, api_complete_state, api_state_file "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -735,7 +718,6 @@ def test_pause_stop_resume_workflow(api_client, api_complete_state, api_state_fi "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -788,7 +770,6 @@ def test_config_update_preserves_status(api_client, api_complete_state, api_stat "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, diff --git a/tests/api/test_routes_status.py b/tests/api/test_routes_status.py index bbc0680..68dace8 100644 --- a/tests/api/test_routes_status.py +++ b/tests/api/test_routes_status.py @@ -29,7 +29,6 @@ def test_get_status_success(api_client, api_complete_state, api_state_file, api_ "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -55,7 +54,6 @@ def test_get_status_success(api_client, api_complete_state, api_state_file, api_ assert data["options"]["auto_merge"] is True assert data["options"]["max_sessions"] == 10 assert data["options"]["pause_on_pr"] is False - assert data["options"]["enable_checkpointing"] is False assert data["options"]["log_level"] == "normal" assert data["options"]["log_format"] == "text" assert data["options"]["pr_per_task"] is False @@ -80,7 +78,6 @@ def test_get_status_with_tasks(api_client, api_complete_state, api_plan_file, ap "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -133,7 +130,6 @@ def test_get_status_different_statuses(api_client, api_complete_state, api_state "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -167,7 +163,6 @@ def test_get_status_invalid_status_enum(api_client, api_complete_state, api_stat "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -203,7 +198,6 @@ def test_get_status_no_workflow_stage(api_client, api_complete_state, api_state_ "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -239,7 +233,6 @@ def test_get_status_with_workflow_stage(api_client, api_complete_state, api_stat "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -275,7 +268,6 @@ def test_get_status_no_plan(api_client, api_complete_state, api_plan_file, api_s "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -409,7 +401,6 @@ def test_get_logs_success(api_client, api_complete_state, api_log_file, api_stat "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -446,7 +437,6 @@ def test_get_logs_with_tail(api_client, api_complete_state, api_log_file, api_st "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -484,7 +474,6 @@ def test_get_logs_tail_one(api_client, api_complete_state, api_log_file, api_sta "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -519,7 +508,6 @@ def test_get_logs_tail_max(api_client, api_complete_state, api_log_file, api_sta "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -551,7 +539,6 @@ def test_get_logs_tail_invalid(api_client, api_complete_state, api_state_file): "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -596,7 +583,6 @@ def test_get_logs_no_log_file(api_client, api_complete_state, api_log_file, api_ "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -630,7 +616,6 @@ def test_get_logs_default_tail(api_client, api_complete_state, api_log_file, api "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -678,7 +663,6 @@ def test_get_logs_with_multiline_entries( "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -930,7 +914,6 @@ def test_get_healthy_status(api_client, api_complete_state, api_state_file): "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -966,7 +949,6 @@ def test_get_health_degraded_status(api_client, api_complete_state, api_state_fi "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -1008,7 +990,6 @@ def test_get_health_failed_status(api_client, api_complete_state, api_state_file "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -1068,7 +1049,6 @@ def test_all_info_endpoints_together(api_client, api_complete_state, api_state_f "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -1117,7 +1097,6 @@ def test_status_and_plan_consistency(api_client, api_complete_state, api_plan_fi "auto_merge": True, "max_sessions": 10, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, diff --git a/tests/cli/test_mailbox_commands.py b/tests/cli/test_mailbox_commands.py index 33ee797..fcad99d 100644 --- a/tests/cli/test_mailbox_commands.py +++ b/tests/cli/test_mailbox_commands.py @@ -58,7 +58,6 @@ def mailbox_task_options() -> TaskOptions: auto_merge=True, max_sessions=None, pause_on_pr=False, - enable_checkpointing=False, log_level="normal", log_format="text", pr_per_task=False, diff --git a/tests/cli_commands/test_control.py b/tests/cli_commands/test_control.py index fd96679..209a7bf 100644 --- a/tests/cli_commands/test_control.py +++ b/tests/cli_commands/test_control.py @@ -43,7 +43,6 @@ def task_options(): auto_merge=True, max_sessions=None, pause_on_pr=False, - enable_checkpointing=False, log_level="normal", log_format="text", pr_per_task=False, diff --git a/tests/cli_commands/test_workflow.py b/tests/cli_commands/test_workflow.py index e65fa41..ac00097 100644 --- a/tests/cli_commands/test_workflow.py +++ b/tests/cli_commands/test_workflow.py @@ -13,8 +13,7 @@ README = Path(__file__).resolve().parents[2] / "README.md" -# --checkpointing is dead and being removed, so it is deliberately undocumented. -_UNDOCUMENTED_START_FLAGS = {"--checkpointing", "--help"} +_UNDOCUMENTED_START_FLAGS = {"--help"} def _normalize(text: str) -> str: @@ -139,6 +138,13 @@ def test_budget_negative_rejected(self, cli_runner): result = cli_runner.invoke(app, ["start", "Task", "--budget", "-2.5"]) assert result.exit_code == 2 + def test_checkpointing_flag_removed(self, cli_runner): + """--checkpointing no longer exists: not in help, and passing it is a usage error.""" + assert "--checkpointing" not in _live_start_flags() + result = cli_runner.invoke(app, ["start", "Task", "--checkpointing"]) + assert result.exit_code == 2 + assert "--checkpointing" in _normalize(result.output) + def test_empty_goal_rejected(self, cli_runner): """An empty goal argument is rejected at parse time.""" result = cli_runner.invoke(app, ["start", ""]) diff --git a/tests/core/test_state.py b/tests/core/test_state.py index f6dadfe..c5bd031 100644 --- a/tests/core/test_state.py +++ b/tests/core/test_state.py @@ -86,7 +86,6 @@ def test_model_dump(self): "max_sessions": 3, "max_prs": 2, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -2460,7 +2459,6 @@ def test_load_state_without_pr_tracking_fields_uses_defaults(self, temp_dir): "max_sessions": None, "max_prs": None, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -2480,6 +2478,39 @@ def test_load_state_without_pr_tracking_fields_uses_defaults(self, temp_dir): assert loaded.prs_created == 0 assert loaded.prs_merged == 0 + def test_load_state_with_removed_enable_checkpointing_key(self, temp_dir): + """A state.json written before the option was removed still loads cleanly.""" + state_dir = temp_dir / ".claude-task-master" + state_dir.mkdir(parents=True) + state_file = state_dir / "state.json" + state_file.write_text( + json.dumps( + { + "status": "working", + "workflow_stage": None, + "current_task_index": 0, + "session_count": 1, + "current_pr": None, + "created_at": "2025-01-15T12:00:00", + "updated_at": "2025-01-15T12:00:00", + "run_id": "20250115-120000", + "model": "sonnet", + "options": {"auto_merge": True, "enable_checkpointing": True}, + } + ) + ) + + manager = StateManager(state_dir) + loaded = manager.load_state() + + assert loaded.options.auto_merge is True + assert not hasattr(loaded.options, "enable_checkpointing") + + # Round trip: the stale key is dropped from what gets written back. + manager.save_state(loaded) + saved = json.loads(state_file.read_text()) + assert "enable_checkpointing" not in saved["options"] + def test_prs_created_not_negative(self, initialized_state_manager): """Test that prs_created can be set to 0 or positive values.""" state = initialized_state_manager.load_state() diff --git a/tests/integration/test_api_cli_integration.py b/tests/integration/test_api_cli_integration.py index f3c6cc8..e0abff8 100644 --- a/tests/integration/test_api_cli_integration.py +++ b/tests/integration/test_api_cli_integration.py @@ -45,7 +45,6 @@ def working_state( "auto_merge": True, "max_sessions": None, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False, @@ -101,7 +100,6 @@ def stopped_state( "auto_merge": True, "max_sessions": None, "pause_on_pr": False, - "enable_checkpointing": False, "log_level": "normal", "log_format": "text", "pr_per_task": False,