Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions eval/review/eval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ judges:
body for body in ((item.get("body") or "") for item in state.get("comments") or [])
if body.split("\n", 1)[0].rstrip("\r") == marker
]
if not stickies and any(
(item.get("body") or "").split("\n", 1)[0].rstrip("\r") == "<!-- fullsend:review-notice -->"
for item in state.get("comments") or []
):
# fullsend post-review posts stale-head and failure notices under their
# own marker (fullsend-ai/fullsend#9399), so the prior-review fetchers
# never read a notice as the last review. A run whose only output is a
# notice wrote no findings to judge: abstain.
return None, "Not scored: the run posted only a review notice (stale-head or agent failure)"
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
Resolved
if len(stickies) != 1:
return False, f"Findings not attributable to this run: expected one review-agent sticky comment, found {len(stickies)}"
# Edits keep earlier runs below the first history sentinel; only the
Expand Down Expand Up @@ -280,6 +289,15 @@ judges:
body for body in ((item.get("body") or "") for item in state.get("comments") or [])
if body.split("\n", 1)[0].rstrip("\r") == marker
]
if not stickies and any(
(item.get("body") or "").split("\n", 1)[0].rstrip("\r") == "<!-- fullsend:review-notice -->"
for item in state.get("comments") or []
):
# fullsend post-review posts stale-head and failure notices under their
# own marker (fullsend-ai/fullsend#9399), so the prior-review fetchers
# never read a notice as the last review. A run whose only output is a
# notice wrote no review action: abstain, as for a notice in the sticky.
return None, "Not scored: the run posted only a review notice (stale-head or agent failure)"
if len(stickies) != 1:
return False, f"Action not attributable to this run: expected one review-agent sticky comment, found {len(stickies)}"
# Edits keep earlier runs below the first history sentinel; only the
Expand Down
15 changes: 15 additions & 0 deletions eval/scripts/finding-expectations-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ns = {}
exec("def check(outputs):\n" + textwrap.indent(open(sys.argv[1]).read(), " "), ns)

MARKER = "<!-- fullsend:review-agent -->"
NOTICE = "<!-- fullsend:review-notice -->"
PROJECTION = "<!-- fullsend:review-findings-v2:eyJ2ZXJzaW9uIjoyfQ== -->"


Expand Down Expand Up @@ -134,6 +135,20 @@ cases = [
{"forbidden": ["logic-error"]}, False, "found 2"),
("failed capture is not a clean review",
None, None, {"forbidden": ["logic-error"]}, False, "found 0"),
# fullsend-ai/fullsend#9399: a run that only posted a stale-head or failure
# notice (its own marker, no review-agent sticky) has no findings to judge.
("notice-only run is not scored",
[comment(NOTICE + "\n## Review\n\n**Reason:** stale-head")], [],
{"required": ["logic-error"]}, None, "only a review notice"),
("failure-notice-only run is not scored",
[comment(NOTICE + "\n## Review\n\n**Reason:** agent-failure")], [],
{"forbidden": ["logic-error"]}, None, "only a review notice"),
("a notice beside the run's review: the review is judged",
[comment(NOTICE + "\n## Review\n\n**Reason:** stale-head"), sticky(LOGIC)], [],
{"required": ["logic-error"]}, True, "Finding expectations met"),
("notice marker not on the first line is not a notice",
[comment("Quoting:\n" + NOTICE)], [],
{"required": ["logic-error"]}, False, "found 0"),
]

failures = 0
Expand Down
18 changes: 17 additions & 1 deletion eval/scripts/state-and-action-checks-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,14 @@ def comment(body):
return {"author": "eval-bot", "body": body, "created_at": "2026-01-01T00:00:00Z"}


NOTICE = "<!-- fullsend:review-notice -->"


def notice(reason):
"""A stale-head or failure notice as fullsend post-review posts it after #9399 (postreview.go)."""
return comment(NOTICE + "\n## Review\n\n**Reason:** " + reason)


def review(state):
return {"author": "eval-bot", "state": state, "body": "See the review comment."}

Expand Down Expand Up @@ -157,8 +165,16 @@ ACTION_CASES = [
[sticky(COMMENT + "\n" + APPROVE)], ["comment"], False, "found 2"),
# post-review omits the marker on purpose in these: abstain, don't fail.
("no marker in the sticky is not scored", [sticky("No marker here.")], ["comment"], None, "Not scored"),
("stale-head notice is not scored",
("stale-head notice in the sticky is not scored (fullsend before #9399)",
[sticky("**Reason:** stale-head")], ["comment"], None, "Not scored"),
# fullsend-ai/fullsend#9399: notices post as their own comment under the
# review-notice marker, and the run leaves no review-agent sticky.
("stale-head notice comment is not scored", [notice("stale-head")], ["comment"], None, "only a review notice"),
("failure notice comment is not scored", [notice("agent-failure")], ["comment"], None, "only a review notice"),
("a notice beside the run's review: the review is scored",
[notice("stale-head"), sticky(COMMENT)], ["comment"], True, "is allowed"),
("notice marker not on the first line is not a notice",
[comment("Quoting:\n" + NOTICE + "\n**Reason:** stale-head")], ["comment"], False, "found 0"),
("marker text mid-line is not a marker",
[sticky("See <!-- fullsend:review-findings-v2:Zm9v -->")], ["comment"], None, "Not scored"),
# Malformed markers never pass.
Expand Down
Loading