review-classifier: ask a check once more when its answer isn't valid JSON
An answer that fails to validate is asked for a second time, for that classification only, with a reminder to reply with the JSON object alone. The second ask comes out of the classification's CLASSIFICATION_DEADLINE: it gets what the first ask left, and is skipped when less than 20 seconds remain, so RUN_DEADLINE's bound still holds. A failed ask (runtime error, timeout) is not repeated. If the second answer does not validate either, the row has no answer, as before. Model::ask takes the deadline for the ask; the ACP runtime no longer holds its own. The parser also takes the first fenced block of a reply that has prose around the fence; prose around a bare object is still rejected.
This commit is contained in:
parent
b8897e7c7a
commit
ce7b3e055f
8 changed files with 345 additions and 66 deletions
|
|
@ -338,9 +338,16 @@ An answer:
|
|||
```
|
||||
|
||||
The verdict field holds `match`, `no-match` or `not-applicable`, and the
|
||||
certainty field a whole number. A runtime error, a timeout, or an answer that
|
||||
isn't that JSON object leaves the classification without a verdict: it's listed
|
||||
with its error, and doesn't count. A run with no key for its runtime, or in which no
|
||||
certainty field a whole number. The classifier reads the object from the
|
||||
reply, or from the first code fence in it. When an answer isn't that object,
|
||||
the classifier asks that classification once more, with a reminder to reply
|
||||
with the JSON object alone; the other classifications aren't asked again. The
|
||||
second ask runs on what the first left of the classification's three minutes,
|
||||
so a retry never lengthens the run, and it doesn't happen when the first ask
|
||||
leaves less than 20 seconds. The classifier also doesn't ask again after a
|
||||
runtime error or a timeout. A runtime error, a timeout, or an answer that
|
||||
still isn't that JSON object after the second ask leaves the classification without a verdict: it's listed with its error, and
|
||||
doesn't count. A run with no key for its runtime, or in which no
|
||||
classification got an answer, fails as a whole, and shows its error instead of a
|
||||
verdict.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue