fix: improve prompts, error messages, and workspace concurrency

- Externalize coordinator, notification, and planning prompts to separate files
- Add workspace mutex for concurrent file operations
- Improve error messages across file_tools, issue_tools, and pr_tools
- Add logging to tool modules for better debugging
- Update tests to match new error message strings
This commit is contained in:
meeks
2026-07-19 17:49:33 +02:00
committed by Michael
parent ee01487ce3
commit dfdd8c0931
11 changed files with 300 additions and 107 deletions
+9 -4
View File
@@ -37,7 +37,8 @@ def test_get_file_content_failure() -> None:
file_tools: FileTools = FileTools(mock_client)
res: str = file_tools.get_file_content("owner", "repo", "path/to/file")
assert "Error getting file content: API Error" in res
assert "Could not retrieve file" in res
assert "path/to/file" in res
def test_get_file_content_with_ref_string_success() -> None:
@@ -73,7 +74,8 @@ def test_get_file_content_with_ref_failure() -> None:
res: str = file_tools.get_file_content_with_ref(
"owner", "repo", "path/to/file", "main"
)
assert "Error getting file content: API Error" in res
assert "Could not retrieve file" in res
assert "path/to/file" in res
def test_commit_file_success() -> None:
@@ -98,7 +100,8 @@ def test_commit_file_failure() -> None:
res: str = file_tools.commit_file(
"owner", "repo", "path/to/file", "msg", "content", "branch"
)
assert "Error committing file: API Error" in res
assert "Could not commit file" in res
assert "path/to/file" in res
def test_update_file_success() -> None:
@@ -123,11 +126,13 @@ def test_update_file_failure() -> None:
res: str = file_tools.update_file(
"owner", "repo", "path/to/file", "msg", "content", "branch"
)
assert "Error updating file: API Error" in res
assert "Could not update file" in res
assert "path/to/file" in res
def test_get_file_content_uses_local_file_when_available(tmp_path: str) -> None:
import os
mock_client = _create_mock_client()
repo_dir = tmp_path / "owner" / "repo"