open-swe/tests/test_report_platform_issue_tool.py
Ramon Nogueira 9e86dec579
feat: add platform issue reporting tool (#1685)
Adapted from upstream langchain-ai/open-swe #1685 to the fork's
direct-import tool registry. Adds the report_platform_issue tool
(stdlib-only: returns a locally generated UUIDv7 report id, no external
network call) and wires it into get_agent's curated tool list.

Dropped upstream's test_task_retry_wraps_inside_tool_error_middleware
assertion, which references ToolRetryMiddleware that this fork does not
wire into the middleware stack.

(cherry picked from commit 88b62322b44103335773002d0745704cd96e9160)
2026-07-08 16:58:25 -04:00

20 lines
553 B
Python

from __future__ import annotations
import uuid
async def test_report_platform_issue_returns_uuid7_report_id() -> None:
from agent.tools.report_platform_issue import report_platform_issue
result = await report_platform_issue()
assert set(result) == {"report_id"}
report_id = uuid.UUID(result["report_id"])
assert report_id.version == 7
assert report_id.variant == uuid.RFC_4122
def test_report_platform_issue_exported() -> None:
from agent.tools import report_platform_issue
assert callable(report_platform_issue)