Watch
0
0
Fork
You've already forked hyperhive
0

request the review classifier's review when a PR's head moves

The router gets a request_reviewer node and a pull_request_sync source;
the built-in head-classifier flow asks swarm-controller, over
$SWARM.router.sink.request-reviewer, to request review-classifier on
every push, unless its review of the head already stands. The controller
subscribes to pull_request_sync on its pull-request hook and answers
the router; nats-auth grants the router the publish and the controller
the subscribe.
This commit is contained in:
atlas 2026-10-24 14:28:27 +02:00
commit 0b1669a364

View file

@ -55,6 +55,7 @@ mod otel_http_client;
mod pulls;
mod queue_identity;
mod read_policy;
mod request_reviewer;
mod review_classifier;
mod routes;
mod schedules;
@ -239,9 +240,11 @@ async fn main() -> Result<()> {
serve(listener, state).await
}
/// Start taking the queued review requests, then serve `state` on `listener`.
/// Start taking the queued review requests and answering the notification
/// router's, then serve `state` on `listener`.
async fn serve(listener: tokio::net::UnixListener, state: AppState) -> Result<()> {
review_classifier::review::spawn_queue(&state);
request_reviewer::spawn(&state);
axum::serve(listener, build_app(state))
.await
.context("serving swarm-controller")