Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/millstone/runtime/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
20 changes: 20 additions & 0 deletions tests/test_orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down