Files
junction/tests
Hermes aaa289ab01 review: anchor every round to the user's question, and let one request set the depth
The review prompt was generic ("check for factual errors, missing
constraints..."), and a long tool history pulled the reviewer toward whatever
the last tool returned: a mikronix session answered with makronix tasks, and
the rounds grew the wrong answer instead of correcting it. Each round now
carries the last user message and the answer so far, says to keep the same
question, scope and language, and says this is not a spelling or style check.

A request may also set its own depth without editing the rule:

    X-Junction-Review-Rounds: N                 0..12
    X-Junction-Effort: off|low|medium|high|max  0/4/7/9/12

The explicit number wins over the name, invalid values fall back to the rule,
and both headers are stripped before the upstream call. 0 disables the review
for that request (one provider call, no review headers). The rule stays the
default, so nothing changes for clients that send neither header.

tests/review.sh: the prompt carries the question and the answer and says it is
not a spelling check; depth 0, 3, effort medium and an out-of-range 99 are
checked against the stub's call counts. tests/run.sh: 550 OK, PASS. Measured
against a 4B on kontron: 0 rounds 7.4s, 2 rounds 34.9s, 4 rounds 62.3s, 7
rounds 104.3s -- all with the same correct answer, so the depth is a latency
knob, not a quality fix for a model that already answers the question.
2026-11-19 11:37:04 +00:00
..