fix(route-selftest): re-point section 14's CLI gate at the fact row_advisor() actually depends on

The pre-existing failure (route-selftest 72/73, verified with git stash
against clean main) was measuring the wrong direction: it checked whether
"claude --advisor fable" is rejected, but route.sh's row_advisor() never
emits --advisor fable at all - it depends on the opposite fact, whether
opus/sonnet can advise a FABLE main model. Both checks happened to agree
when written; they diverged once the CLI's capability ordering changed.

Measured against the installed CC 2.1.226: opus/sonnet advising a fable
main is still rejected ("cannot advise ... must be at least as capable"),
which is the fact rows 5-6's advisor suppression rests on and now stays
pinned. Also pinned row 1-2's check to an explicit --model sonnet rather
than the ambient default. Separately worth flagging to the operator (not
acted on here): fable itself is now accepted as an advisor for opus/sonnet
mains, which CLAUDE.md's standing note about CC 2.1.220 does not reflect.

route-selftest.sh: 73/73.
This commit is contained in:
Kjell Tore Guttormsen 2026-08-09 21:45:12 +02:00
commit 4821ba8d4b

View file

@ -518,17 +518,24 @@ if command -v claude >/dev/null 2>&1; then
# valid advisor fails on the missing prompt, an invalid one fails on itself.
# --help cannot gate this - it short-circuits before option validation, so
# even an unknown flag exits 0 and the gate would pass without testing.
ADVOUT="$(claude --advisor opus -p "" 2>&1 | head -3)"
# Row 1-2's trigger is "sonnet main + opus advisor" specifically, so the
# main model is pinned rather than left to the ambient default.
ADVOUT="$(claude --model sonnet --advisor opus -p "" 2>&1 | head -3)"
if printf '%s' "$ADVOUT" | grep -q 'unknown option'; then rc=1; else rc=0; fi
check "installed claude accepts the --advisor flag at all" "$rc"
if printf '%s' "$ADVOUT" | grep -q 'cannot be used as an advisor'; then rc=1; else rc=0; fi
check "installed claude accepts opus as an advisor" "$rc"
if printf '%s' "$ADVOUT" | grep -q 'cannot advise'; then rc=1; else rc=0; fi
check "installed claude accepts opus advising a sonnet main" "$rc"
# The suppression on rows 5 and 6 is load-bearing only while this holds.
FABOUT="$(claude --advisor fable -p "" 2>&1 | head -3)"
printf '%s' "$FABOUT" | grep -q 'cannot be used as an advisor'
check "installed claude still rejects fable as an advisor" $?
# row_advisor() never emits '--advisor fable' - it depends on the opposite
# direction: whether opus can advise a FABLE main model. That is the fact
# rows 5-6's suppression rests on, so that is what must be gated. (Measured
# at CC 2.1.226: fable is now itself accepted as an advisor for opus/sonnet
# mains - a capability-ordering change worth flagging to the operator, but
# not what this check exists to pin.)
FABOUT="$(claude --model fable --advisor opus -p "" 2>&1 | head -3)"
printf '%s' "$FABOUT" | grep -q 'cannot advise'
check "installed claude still rejects opus advising a fable main" $?
else
echo " skip - claude not on PATH, advisor flag gate not run"
fi