open-swe/agent/utils
Johannes du Plessis 82852f9eda
feat: tune reviewer for precision — web/wiki tools + recalibrated prompt (#1312)
* feat: tune reviewer for precision — web/wiki tools + recalibrated prompt

Reviewer agent now has web_search, fetch_url, and http_request alongside the
finding tools, so it can verify library semantics and consult the DeepWiki
auto-generated wiki for public repos (https://deepwiki.com/<owner>/<repo>)
before flagging cross-file or architectural concerns.

Prompt rewritten to push precision over recall:
- explicit severity ladder pushing reviews toward bimodal high/low instead of
  defaulting to medium
- ≤200-char description target (gold set averages ~186 chars; we were at ~436)
- mandatory docs / wiki / code lookup before flagging concurrency, security,
  or perf — the three categories that dominated false positives
- "do not flag" list covering compiler/linter-catchable nits, speculative
  claims without a concrete attacker/interleaving/scale, style preferences
  the codebase doesn't share, and test-quality nits on non-test diffs
- smart file-selection guidance for large PRs (deprioritize generated /
  vendored / pure-rename hunks)

Eval config switched to openai:gpt-5.5 + high reasoning effort for the next
benchmark run.

* trim prompt

* subagent prompting

* confidence ratings

* added medium

* enforce confidence threshold

* .

* reviewer: precision-tuned prompt + drop confidence gate

Rewrites the reviewer system prompt around a defensibility bar (anchor +
failure mode + maintainer wouldn't say "not a bug"), an explicit do-not-file
list (style nits, speculation, scope-policing, same-bug fan-out), and a
checklist of 10 bug archetypes drawn from a per-PR audit of the eval golden
set. The audit showed 145 FPs in the last eval split ~28% speculative, ~26%
style-nit, ~31% real-but-unscored (mostly same-archetype fan-out); the new
prompt targets each class directly.

Confidence is still recorded on every finding for post-hoc calibration but
no longer gates publication — the audit showed the gate was a no-op (agent
self-rated 65% of findings "high" regardless), and the prompt's defensibility
bar is the actual discipline. Drops CONFIDENCE_ORDER, CONFIDENCE_THRESHOLD,
the confidence_threshold kwarg on filter_findings_for_publish, the
confidence_filtered score_mode, and the min_confidence kwarg on the eval
target's _extract_comments — all dead once the gate is gone.

Also removes the "informational" severity tier from the Severity enum,
SEVERITY_ORDER, and all validators / tests / docstrings. It was reserved for
FYI observations the dataset never rewards.

* benchmax

* adding google provider

* slight steering

* tuning

* more tuning

* fix

* cleanup

* reducing overfitting

* Add per-repo review style profiles and inject them into the reviewer.

Dashboard users can analyze historical PR review feedback per repository,
edit the resulting style guide, and have it loaded from LangGraph Store at
reviewer runtime (including Martian eval runs) keyed by owner/name.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix review style job errors leaking exception details to clients.

Return generic dashboard messages while logging full stack traces server-side.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-20 18:35:00 +00:00
..
auth.py feat: TTL and revocation handling for cached GitHub OAuth tokens [closes AB-2322] (#1280) 2026-05-08 22:57:01 +00:00
authorship.py Revert "fix: Auto assign PRs to creator (#1211)" (#1214) 2026-04-22 13:46:44 -07:00
comments.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
github_app.py feat: TTL and revocation handling for cached GitHub OAuth tokens [closes AB-2322] (#1280) 2026-05-08 22:57:01 +00:00
github_comments.py feat: TTL and revocation handling for cached GitHub OAuth tokens [closes AB-2322] (#1280) 2026-05-08 22:57:01 +00:00
github_org_membership.py feat: gate @open-swe mentions on public repos to org members (#1273) 2026-05-08 11:38:29 -07:00
github_token.py feat: TTL and revocation handling for cached GitHub OAuth tokens [closes AB-2322] (#1280) 2026-05-08 22:57:01 +00:00
github_user_email_map.py adding myself as user (#1162) 2026-04-03 15:52:04 -07:00
langsmith.py feat: add Slack reaction feedback to LangSmith (#1231) 2026-05-08 14:24:12 -07:00
linear.py fix: use thread-level LangSmith URLs instead of run-level URLs to fix broken trace links (#1217) 2026-04-23 13:46:28 -07:00
linear_team_repo_map.py chore: Add langsmith deployments data plane linear project (#1044) 2026-03-09 18:36:00 -07:00
messages.py chore: Drop monorepo (#1029) 2026-03-06 16:10:34 -08:00
model.py feat: tune reviewer for precision — web/wiki tools + recalibrated prompt (#1312) 2026-05-20 18:35:00 +00:00
multimodal.py feat: add Slack image support with url_private auth and content-type validation [closes: OPE-23] (#1073) 2026-03-20 14:34:14 -07:00
repo.py feat: extract repo parsing into shared util, add linear comment repo override (#1103) 2026-03-20 13:34:00 -07:00
sandbox.py fix: keep sandbox backend stable across recovery (#1294)w 2026-05-11 16:03:38 -07:00
sandbox_paths.py fix: better custom backend support (#1071) 2026-03-17 11:55:36 -07:00
sandbox_state.py fix: keep sandbox backend stable across recovery (#1294)w 2026-05-11 16:03:38 -07:00
slack.py chore: remove slack assistants api feature flag (#1295) 2026-05-12 00:41:51 +00:00
slack_feedback.py feat: add Slack reaction feedback to LangSmith (#1231) 2026-05-08 14:24:12 -07:00