agent queue: re-run the check only after an accepted verification

The verify job re-ran the pull request check after any /verified
comment, including refused ones: the author's own, a non-verifier's, a
stale or unknown head or a malformed SHA. decide now marks only an
accepted verification of the current head, and the job re-runs the check
only when should-rerun confirms it. A test checks that what re-runs the
check is exactly what the check counts.

Replay decides a comment listed twice only once. Tests cover duplicate
and out-of-order listings, and every arrival order of a five-claim burst
grants exactly one of two overlapping claims.

Fixes #210, fixes #211

Signed-off-by: elforeign <324243036+elforeign@users.noreply.github.com>
This commit is contained in:
elforeign committed 2026-11-24 00:56:00 -06:00
1 parent e37c8566c6
commit 9fda5aab18
8 files changed
+96 -5

No files matched your search

+1
View File
@@ -45,6 +45,7 @@ def replay(state, cfg, now, bots=L.BOT):
if (c.get("pull_request") or c["id"] in done or c["user"] in bots
or parse_time(c["created_at"]) < since):
continue
done.add(c["id"]) # a comment listed twice is decided once
actions = decide({"kind": "issue", "number": c["issue"], "actor": c["user"], "body": c["body"]}, state, cfg)
if not actions:
continue