voyage/lib
Kjell Tore Guttormsen def6c05384 fix(research-loop-cap): floor the turn cap before the guard, not after
A fractional TREKRESEARCH_MAX_CONV_TURNS below 1 cleared the `n <= 0`
guard on its raw value and only then floored, so '0.5' and '0.9' became
0 and the budget became 0 x MAX_TOTAL_DIMENSIONS = 0: every turn denied,
the loop silently dead rather than bounded.

README.md:229 and docs/architecture.md:15 both promise that invalid
values fall back to 3. docs/command-modes.md:42 enumerated "empty,
non-numeric, zero, or negative" and happened to sidestep the case; the
enumeration is now exhaustive about it.

Measured before: '0.5' -> 0, '0.9' -> 0, '2.7' -> 2, '' / 'abc' / '-2'
/ '0' -> 3. Measured after: '0.5' -> 3, '0.9' -> 3, '2.7' -> 2, and
'Infinity' -> 3 (it is not a cap either).

A cap of 0 is not a narrower cap, it is an off switch. The tests pin
both directions: the fraction falls back, and allowTurn cannot report a
budget of 0 under it.

Review finding fc516799e6042e246a4b62d81903ac27c2efab84 (MINOR).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LuGhWAbWyRFBFeemfhxoVv
2026-08-12 22:46:35 +02:00
..
exporters feat(trekresearch): emit and export the five STORM measurement fields 2026-08-09 15:01:15 +02:00
parsers feat(profiles): add built-in fable profile (all six phases on fable) 2026-07-02 16:59:26 +02:00
plan feat(voyage): S12 — NW3 synthesis-agent built + measured → declined per measurement [skip-docs] 2026-06-18 17:58:39 +02:00
profiles feat(profiles): add built-in fable profile (all six phases on fable) 2026-07-02 16:59:26 +02:00
review feat(eval): SKAL-1·4b offline gold-scored output eval 2026-06-30 09:00:33 +02:00
stats feat(stats): add claude-fable-5 to PRICE_TABLE 2026-07-02 17:15:36 +02:00
util fix(research-loop-cap): floor the turn cap before the guard, not after 2026-08-12 22:46:35 +02:00
validators fix(validators): hard-block the token formats the run-length patterns missed 2026-08-12 22:03:43 +02:00