Watch
0
0
Fork
You've already forked hyperhive
0

review classifier: it reads the PR's title and description, and a rule on closing keywords

The controller reads the PR's title and description with the rest of it and
puts both in the run's shared context, ahead of the commits. An empty
description reads as `(none)`. `TryOut` carries them as optional fields, so a
controller that sends none still gets its run answered.

New rule `closes-only-finished-issues`: a description that carries a closing
keyword for an issue and also says the PR leaves part of it undone is a
violation, because the keyword closes the issue when the PR merges.
This commit is contained in:
argus 2026-11-23 00:49:11 +01:00 • committed by mara
commit 8a0615ccfc

View file

@ -4,18 +4,19 @@ The review classifier's try-out service, in the `swarm-review-classifier`
container on the host that sets `deploy.review-classifier.enable`. The
design is [`docs/4-implementation/swarm/review-classifier.md`](../docs/4-implementation/swarm/review-classifier.md).
swarm-controller reads a PR (its head commit, its commits and its diff) and
sends it, with the operator's classifications, as a request on the queue.
This service asks a small model one classification at a time and answers
with the result table and the overall verdict. It writes nothing to the
forge and holds no forge credential.
swarm-controller reads a PR (its head commit, title, description, commits and
diff) and sends it, with the operator's classifications, as a request on the
queue. This service asks a small model one classification at a time and
answers with the result table and the overall verdict. It writes nothing to
the forge and holds no forge credential.
## What a run is
- The shared context first: a system prompt, the PR's commits with their full
messages, and the diff with lockfiles collapsed as `hive-forge diff` does.
Every classification's prompt starts with the same bytes, and `claude` gets
that part as a content block of its own, with a cache breakpoint at its end.
- The shared context first: a system prompt, the PR's title and description,
its commits with their full messages, and the diff with lockfiles collapsed
as `hive-forge diff` does. Every classification's prompt starts with the same
bytes, and `claude` gets that part as a content block of its own, with a
cache breakpoint at its end.
- One `claude --print` per classification, with no session, no tools
(`--tools ""`), no MCP server, its own empty directory and
`ANTHROPIC_API_KEY` in its environment only.