Watch
0
0
Fork
You've already forked hyperhive
0

swarm-controller: start a review try-out on a PR and read its result

POST /api/review-classifier/try-out validates the run (owner/name repo,
a PR number, one to ten classifications with distinct names, thresholds
up to 100), reads the PR's head commit, commits and diff with the
controller's forge token, sends one request to the review classifier on
the queue and answers 202 with an id. GET .../try-out/{id} reports the
run as running, done (rows and overall verdict) or failed (the error).
Results live in memory for an hour after the reply; there is no run
store. POST then GET because a run can outlast the gateway's 60-second
proxy read timeout. Both routes are utoipa-annotated, so they show on
/api/docs/.
This commit is contained in:
atlas 2026-10-12 03:29:54 +02:00 • committed by mara
commit d70ed41537
9 changed files with 824 additions and 3 deletions

1
Cargo.lock generated
View file

@ -4850,6 +4850,7 @@ dependencies = [
"swarm-queue-client",
"swarm-secret-client",
"tokio",
"tower",
"tracing",
"url",
"utoipa",