Watch
0
0
Fork
You've already forked hyperhive
0

review classifier: truncate an over-long reason instead of dropping the verdict

An answer whose reason ran past 500 characters was rejected whole, so the
verdict was lost and the one error row turned the review into no_verdict.
The reason is cut to the cap, ending in an ellipsis; verdict and certainty
are kept.
This commit is contained in:
atlas 2026-10-13 14:30:03 +02:00 • committed by mara
commit 3f5f348270
3 changed files with 34 additions and 19 deletions

View file

@ -18,9 +18,9 @@ forge and holds no forge credential.
- 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.
- An answer is a JSON object with a verdict, a certainty and a reason of at
most 500 characters. A failed run, a timeout or an answer that doesn't
validate leaves that row without a verdict, and it doesn't count.
- An answer is a JSON object with a verdict, a certainty and a reason; a
reason over 500 characters is cut to 500, ending in `…`. A failed run, a
timeout or an answer that doesn't validate leaves that row without a verdict, and it doesn't count.
- A run with no API key, or with no classification answered, fails as a
whole: the caller sees an error, never a verdict.