mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 09:13:14 +00:00
Part of the domain-reorg adoption (build plan step C2): fork content,
upstream layout. Nine 1:1 module moves (reviewer_diff/eval_store/
findings/groups/publish/reconcile/trace_context + review_style_
collector/guidance) into agent/review/, with internal relative
imports re-wired to the new package depth. agent/review/__init__.py
mirrors upstream's thin re-export shim (one of the 21 verified "A"
structural adds).
Rewrote the 38 grep hits across importer files (agent/{analyzer,
ci_autofix,reviewer,webapp}.py, agent/dashboard/*, agent/middleware/
settle_review_check.py, agent/tools/*, agent/utils/github_feedback.py,
agent/webhooks/github.py, evals/reviewer/*, and the reviewer test
suite) to point at agent.review.*; 4 of the 38 hits were name
collisions (list_reviewer_findings, reviewer_outcomes,
_reviewer_thread_id, reviewer_thread_id — not the moved modules) and
were left untouched. tests/test_github_checks.py's module-alias
import (`from agent import reviewer_publish`) follows upstream's own
`from agent.review import publish as reviewer_publish` pattern so
downstream `reviewer_publish.*` call sites needed no changes.
agent/reviewer.py and agent/webapp.py stay in place per the hard
rule (fork content, import-only rewire) and are not part of this
package.
Gates: ruff check + ruff format --check, pytest --co -q (1637
collected), full unit suite (1637 passed), and the reviewer/findings
suite in isolation (pytest -k "review or finding", 421 passed).
24 lines
871 B
Python
24 lines
871 B
Python
"""Shared constants for the reviewer-eval status record.
|
|
|
|
Kept deliberately light (no dashboard/server imports) so the eval harness in the
|
|
GitHub Action can publish progress to the store without importing the FastAPI
|
|
dashboard. Both ``agent.dashboard.eval_jobs`` (reader) and
|
|
``evals.reviewer.store_reporter`` (writer) import from here.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import re
|
|
|
|
EVALS_NAMESPACE: list[str] = ["evals"]
|
|
REVIEWER_EVAL_KEY = "reviewer"
|
|
DEFAULT_EVAL_PROJECT = "open-swe-evals"
|
|
|
|
_LOG_TAIL_CHARS = 12000
|
|
_EXPERIMENT_URL_RE = re.compile(r"https://\S*smith\.langchain\.com/\S+")
|
|
|
|
# The running Action refreshes the heartbeat this often; a record is only
|
|
# reconciled as failed once its heartbeat is older than the stale threshold, so
|
|
# a brief dashboard/Action lag doesn't kill a live run.
|
|
_HEARTBEAT_INTERVAL_SECONDS = 10
|
|
_HEARTBEAT_STALE_SECONDS = 60
|