swarm-controller: record the review classifier's runs and list them
Every run is recorded when it ends: a try-out when its reply settles it, a requested review once its review is posted or the post fails, and a request turned away by a full queue once its comment is posted. A duplicate request that starts nothing is not recorded. The newest 100 are one JSON array under `recent` in a new controller-owned KV bucket, `review-classifier-runs`, written with compare-and-set as `schedule-definitions` is (five attempts). A failed write is logged; the review is already posted by then. Each recorded run is also one info event, "review classifier run finished", with the record's fields as tracing fields. The controller logs natively to the journal, so they reach VictoriaLogs as F_<NAME>. GET /api/review-classifier/runs returns the list, newest first, gated by the gateway like the try-out GET. post_classifier_review now returns the posted review's html_url, which the record keeps as review_url. Closes #5153, part of #5096.
This commit is contained in:
parent
7ee6e776a3
commit
2fc0166427
14 changed files with 1138 additions and 66 deletions
|
|
@ -57,6 +57,12 @@ The swarm's control plane. The swarm UI and `swarmctl` are its clients.
|
|||
(`GET`/`PUT`/`DELETE /api/agents/{name}/limits`); the hive running the
|
||||
agent reads it, and each cap replaces the hive's own answer for that field →
|
||||
[`docs/scheduler/coordinator.md`](../docs/scheduler/coordinator.md#container-resource-limits).
|
||||
- **Review classifier** — try-outs from the swarm UI and reviews on review
|
||||
requests, and the newest 100 finished runs, one document in the
|
||||
`review-classifier-runs` KV bucket, which this daemon alone writes
|
||||
(`POST /api/review-classifier/try-out`, `GET /api/review-classifier/try-out/{id}`,
|
||||
`GET /api/review-classifier/rules`, `GET /api/review-classifier/runs`) →
|
||||
[`docs/swarm/review-classifier.md`](../docs/swarm/review-classifier.md).
|
||||
- **Relays** — each agent's terminal and turn-state header as SSE, agent
|
||||
icons, the cross-repo issue report, and the UI's quick links.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue