Fix MCP dep tool parameter names to match CLI (issue_id/depends_on_id)
- Changed from confusing from_id/to_id to clear issue_id/depends_on_id - Matches CLI convention: bd dep add [issue-id] [depends-on-id] - Updated all tests and implementations - Fixes GH #113 where Claude Code was creating dependencies backwards Closes bd-58 Amp-Thread-ID: https://ampcode.com/threads/T-f01aca11-a10f-4908-9ce6-7e1734f2068f Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -548,7 +548,7 @@ async def test_add_dependency(bd_client, mock_process):
|
||||
mock_process.communicate = AsyncMock(return_value=(b"Dependency added\n", b""))
|
||||
|
||||
with patch("asyncio.create_subprocess_exec", return_value=mock_process):
|
||||
params = AddDependencyParams(from_id="bd-2", to_id="bd-1", dep_type="blocks")
|
||||
params = AddDependencyParams(issue_id="bd-2", depends_on_id="bd-1", dep_type="blocks")
|
||||
await bd_client.add_dependency(params)
|
||||
|
||||
# Should complete without raising an exception
|
||||
@@ -564,7 +564,7 @@ async def test_add_dependency_failure(bd_client, mock_process):
|
||||
patch("asyncio.create_subprocess_exec", return_value=mock_process),
|
||||
pytest.raises(BdCommandError, match="bd dep add failed"),
|
||||
):
|
||||
params = AddDependencyParams(from_id="bd-2", to_id="bd-1", dep_type="blocks")
|
||||
params = AddDependencyParams(issue_id="bd-2", depends_on_id="bd-1", dep_type="blocks")
|
||||
await bd_client.add_dependency(params)
|
||||
|
||||
|
||||
@@ -575,7 +575,7 @@ async def test_add_dependency_not_found(bd_client):
|
||||
patch("asyncio.create_subprocess_exec", side_effect=FileNotFoundError()),
|
||||
pytest.raises(BdNotFoundError, match="bd CLI not found"),
|
||||
):
|
||||
params = AddDependencyParams(from_id="bd-2", to_id="bd-1", dep_type="blocks")
|
||||
params = AddDependencyParams(issue_id="bd-2", depends_on_id="bd-1", dep_type="blocks")
|
||||
await bd_client.add_dependency(params)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user