open-swe/agent
langsmith-forge[bot] 74f5df5df8
fix: publish_review tool returns generic "Failed to POST PR review" without GitHub API status/body, agent retries with no signal (#1299)
* fix(reviewer): surface HTTP status and body excerpt for non-dict GitHub PR review responses

When post_pull_request_review received a non-dict body, it returned
None and publish_review surfaced a generic 'Failed to POST PR review'
string with no signal for the agent to adapt — leading to blind
retries with permuted cap/severity_threshold args.

Now the non-dict-body path mirrors the existing HTTPStatusError /
HTTPError paths: it returns {'_error': 'HTTP <status>: non-dict
response body: <excerpt>'} so the user-facing tool can include the
underlying detail. The bare-None branch in publish_review.py is kept
as a defensive guard with a clearer message.

* ci: apply ruff format to reviewer_publish.py

Collapse the multi-line return dict into a single line so it matches the
output of `ruff format`, unblocking the Agent lint / format-check CI jobs.

Co-authored-by: Johannes du Plessis <51395795+johannes117@users.noreply.github.com>

---------

Co-authored-by: LangSmith Issues Agent <issues-agent@langsmith.dev>
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Johannes du Plessis <51395795+johannes117@users.noreply.github.com>
2026-05-12 13:55:39 -07:00
..
integrations feat: add idle TTL and delete-after-stop sandbox lifecycle controls (#1265) 2026-05-08 00:30:14 -04:00
middleware fix: keep sandbox backend stable across recovery (#1294)w 2026-05-11 16:03:38 -07:00
tools fix: publish_review tool returns generic "Failed to POST PR review" without GitHub API status/body, agent retries with no signal (#1299) 2026-05-12 13:55:39 -07:00
utils chore: remove slack assistants api feature flag (#1295) 2026-05-12 00:41:51 +00:00
encryption.py feat: support TOKEN_ENCRYPTION_KEY rotation via MultiFernet [closes AB-2323] (#1275) 2026-05-08 14:29:23 -07:00
prompt.py slack: move feedback-reaction ask out of every reply, into the tip rotation (#1279) 2026-05-08 21:59:14 +00:00
reviewer.py feat: TTL and revocation handling for cached GitHub OAuth tokens [closes AB-2322] (#1280) 2026-05-08 22:57:01 +00:00
reviewer_diff.py fix(open-swe): surface reviewer diff-prep failures instead of swallowing (#1260) 2026-05-07 18:20:27 -07:00
reviewer_findings.py feat(open-swe): always anchor findings to a single line (#1264) 2026-05-07 20:26:59 -07:00
reviewer_publish.py fix: publish_review tool returns generic "Failed to POST PR review" without GitHub API status/body, agent retries with no signal (#1299) 2026-05-12 13:55:39 -07:00
server.py fix: keep sandbox backend stable across recovery (#1294)w 2026-05-11 16:03:38 -07:00
webapp.py feat: remove eyes reaction on Slack invocation (#1289) 2026-05-11 15:07:02 -07:00