Skip to content

Commit 2510eaa

Browse files
committed
🐛 fix(tests): update sdd prompt assertions + black format sdk_integration
1 parent ad767cf commit 2510eaa

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/claude/sdk_integration.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
# using the conversation's working directory (e.g. /workspace/_dm_xxx) as cwd,
1313
# not the application root (/app). A relative path like "src/mcp/telegram_server.py"
1414
# would fail to resolve in any user workspace.
15-
_TELEGRAM_SERVER_PATH = str(
16-
Path(__file__).parent.parent / "mcp" / "telegram_server.py"
17-
)
15+
_TELEGRAM_SERVER_PATH = str(Path(__file__).parent.parent / "mcp" / "telegram_server.py")
1816

1917
import structlog
2018
from claude_agent_sdk import (

tests/unit/test_sdd_handler.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,29 +135,26 @@ def test_build_sdd_prompt_working_dir_in_prompt():
135135

136136

137137
def test_build_sdd_prompt_contains_agent_file_instructions():
138-
"""Prompt instructs Claude to write all three .agent/<Type>/<BranchSlug>/ files."""
138+
"""Prompt instructs Claude to load the sdd skill file."""
139139
prompt = _build_sdd_prompt(
140140
arg="Some task",
141141
working_dir=Path("/repo"),
142142
protected_branches=["main"],
143143
is_url=False,
144144
)
145-
assert ".agent/<Type>/<BranchSlug>/planning.md" in prompt
146-
assert ".agent/<Type>/<BranchSlug>/files.md" in prompt
147-
assert ".agent/<Type>/<BranchSlug>/approach.md" in prompt
145+
assert "SKILL: Load `.claude/skills/sdd.md`" in prompt
148146

149147

150148
def test_build_sdd_prompt_restrictions_present():
151-
"""Prompt must explicitly forbid modifying source files, opening PRs, running tests."""
149+
"""Prompt must include protected branches and working directory."""
152150
prompt = _build_sdd_prompt(
153151
arg="Some task",
154152
working_dir=Path("/repo"),
155153
protected_branches=["main"],
156154
is_url=False,
157155
)
158-
assert "DO NOT modify any existing source file" in prompt
159-
assert "DO NOT open a Pull Request" in prompt
160-
assert "DO NOT run tests" in prompt
156+
assert "Protected branches" in prompt
157+
assert "/repo" in prompt
161158

162159

163160
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)