From ca57722ba149f320a5c96fc4efb1e7c7b87da888 Mon Sep 17 00:00:00 2001 From: wittekin <6079900+wittekin@users.noreply.github.com> Date: Sat, 7 Mar 2026 17:25:45 -0800 Subject: [PATCH] Block --split-task for remote providers Remote tasklist backends (Jira/Linear/GitHub) manage task structure natively, so local task splitting is not applicable. Exit early with a clear error message directing users to their provider's interface. Generated with millstone orchestrator --- src/millstone/runtime/orchestrator.py | 11 +++++++++++ tests/test_orchestrator.py | 20 ++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/src/millstone/runtime/orchestrator.py b/src/millstone/runtime/orchestrator.py index fae89a2..2d9a0f8 100755 --- a/src/millstone/runtime/orchestrator.py +++ b/src/millstone/runtime/orchestrator.py @@ -4325,6 +4325,17 @@ def main(): # Handle --split-task: analyze a task and suggest subtasks if args.split_task is not None: + using_remote_provider = config.get("tasklist_provider", "file") != "file" + if using_remote_provider: + print( + "Task splitting is not supported for remote providers.", + file=sys.stderr, + ) + print( + "Use your provider's native interface to manage tasks.", + file=sys.stderr, + ) + sys.exit(1) orchestrator = Orchestrator( tasklist=args.tasklist, dry_run=False, diff --git a/tests/test_orchestrator.py b/tests/test_orchestrator.py index 691e9ee..314a466 100644 --- a/tests/test_orchestrator.py +++ b/tests/test_orchestrator.py @@ -16277,6 +16277,26 @@ def mock_run_claude(prompt, **kwargs): finally: orch.cleanup() + def test_split_task_remote_provider_exits_with_error(self, temp_repo, monkeypatch, capsys): + """--split-task with remote provider prints error and exits 1.""" + import sys + + from millstone.runtime.orchestrator import main + + # Configure remote provider + config_dir = temp_repo / ".millstone" + config_dir.mkdir(exist_ok=True) + (config_dir / "config.toml").write_text('tasklist_provider = "mcp"\n') + + monkeypatch.setattr(sys, "argv", ["millstone", "--split-task", "1"]) + + with pytest.raises(SystemExit) as exc_info: + main() + + assert exc_info.value.code == 1 + captured = capsys.readouterr() + assert "not supported for remote providers" in captured.err + class TestProgressEstimation: """Tests for progress estimation functionality."""