Watch
0
0
Fork
You've already forked hyperhive
0

review classifier: re-post a clean verdict on a same-head re-request

A review request for a head whose newest recorded review approved or
requested changes now runs nothing: the classifier account posts that
verdict and table again, opening "Already reviewed <sha>, verdict
unchanged". A head whose newest review had no clean verdict, a failed
post, or no record gets a fresh run, as before.

An accepted request now keeps its key until its record is written, so a
request right after a run finishes reads that run's verdict instead of
starting a second run.

Part of #5387; the restart-loss half waits on #5219.
This commit is contained in:
atlas 2026-10-17 11:29:15 +02:00 • committed by mara
commit eb92e83c95
3 changed files with 374 additions and 10 deletions

View file

@ -98,6 +98,15 @@ A verdict belongs to the commit it ran on. A push starts no run. Once the
PR's head moves, requesting the service account as a reviewer again starts a
fresh run on the new head.
Requesting the account again on a head it already reviewed depends on that
head's newest recorded review, as the [run store](#run-store-and-retention)
holds it. When that review approved or requested changes, nothing runs: the
account posts the same verdict and result table again, opening with
"Already reviewed `<sha>`, verdict unchanged." When it had no clean
verdict, or its post failed, the request starts a fresh run. A head with no
recorded review, such as one whose runs have dropped out of the newest 100, or
a run store the controller can't read, gets a fresh run too.
The re-request also retires the account's earlier review. The forge clears
the `official` flag on a reviewer's earlier reviews when it's requested
again, and only official reviews count toward the required approvals or
@ -111,7 +120,8 @@ default (see [Swarm-level settings](#swarm-level-settings)). Up to eight more
wait in the controller's memory, a bound that isn't configurable, so a
controller restart drops them, and nothing gets posted for them. Waiting
reviews start in no guaranteed order. A request for a PR and head that's
already running or waiting starts nothing. A request with every running place
already running, waiting or re-posting starts nothing, and the head stays
taken until the controller writes its record. A request with every running place
and all eight waiting places taken starts no run: the account posts a
`**No verdict:**` comment saying so.
@ -556,8 +566,11 @@ The route answers **201** with `branch`, `path` (the file written) and
`swarm-controller` records every run when it ends: a try-out when the
classifier's reply arrives, a requested review once the controller has posted
its review or the post has failed, and a request turned away because the
queue was full once its comment is on the forge or the post has failed. A review request for a head that's already
running or waiting starts nothing and isn't recorded. A run still going isn't
queue was full once its comment is on the forge or the post has failed. The
controller records a re-posted verdict the same way, with the outcome and answer of
the run it repeats and that run's id in its `detail`. A review request for a
head that's already running, waiting or re-posting starts nothing and isn't
recorded. A run still going isn't
in the list, and a controller restart drops a run in progress.
The newest 100 runs are one JSON array under the key `recent` in the