A new service crate. It reads its queue client secret from the store at start, takes try-outs on the review classifier subject in its queue group, and for each run reads the Anthropic API key from the store, builds the shared context (commits with full messages, diff with lockfiles collapsed), runs one claude --print per classification with no session, no tools, no MCP server and the key in the child's environment only, validates the JSON answer and aggregates the rows. A missing key or a run where no classification got an answer fails the run; one failed classification is an excluded row with its error. One journal line per run names the operator, repo, PR, head SHA, rows and overall verdict. swarm-secret-client gains the two paths the service reads.
29 lines
750 B
TOML
29 lines
750 B
TOML
[package]
|
|
name = "swarm-review-classifier"
|
|
version.workspace = true
|
|
readme = "README.md"
|
|
edition.workspace = true
|
|
|
|
[[bin]]
|
|
name = "swarm-review-classifier"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
async-nats.workspace = true
|
|
# StreamExt::next on the subscription.
|
|
futures-util.workspace = true
|
|
# One `claude --print` per classification.
|
|
hive-claude.workspace = true
|
|
hive-log.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
# The try-out subject and the shapes the controller sends and reads back.
|
|
swarm-queue-client.workspace = true
|
|
# The API key and queue client secret paths, and the store login.
|
|
swarm-secret-client.workspace = true
|
|
tokio.workspace = true
|
|
tracing.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|