feat(python/robomp): added followup thread context to comment handling

- Normalized reviewer-bot matching by stripping a trailing `[bot]` suffix when resolving configured bot logins.
- Fetched PR thread history for followup comments without directives and carried it through task execution.
- Updated followup prompt rendering to include prior conversation context for handle_comment tasks.
This commit is contained in:
can1357
2026-05-25 20:09:26 +02:00
parent 7a867a5e85
commit 4cd86383c0
8 changed files with 117 additions and 11 deletions
+21
View File
@@ -102,6 +102,27 @@ def test_directive_prompt_embeds_thread_and_directive_body() -> None:
assert "PR #1080 is open" in out
def test_followup_comment_prompt_embeds_thread_context() -> None:
thread = (
ThreadMessage(kind="pr_body", author="roboomp", body="PR body", created_at=""),
ThreadMessage(kind="comment", author="can1357", body="prior request", created_at="2026-05-01T10:00:00Z"),
)
out = persona.followup_comment(
repo=_Repo(),
issue=_Issue(),
comment=_Comment(body="current request"),
workspace=_Workspace(),
pr_status="PR #1080 is open",
pr_number=1080,
thread=thread,
)
assert "Prior conversation" in out
assert "PR body" in out
assert "prior request" in out
assert "current request" in out
def test_kickoff_directive_prompt_embeds_thread_and_classify_instruction() -> None:
thread = (ThreadMessage(kind="issue_body", author="alice", body="failing on macos", created_at=""),)
out = persona.kickoff_directive(