Repository navigation
Description
Problem
model_raw() returns 1 with no log line when jq is missing system-wide, so every downstream consumer of the model tier sees an unexplained unavailable verdict.
The guard is at packages/base/bin/stuck-pane-sweep.sh:781:
[ "$have_jq" = "1" ] || return 1
That return happens before the STUCK_MODEL_CMD seam branch (:782) and before the curl path, so on a box with no jq:
- the
seam-exitcall site (:812) is never reached, because the seam subprocess is never run, and - the three transport / http-error / unparseable-envelope call sites (
:875and below) are never reached for the same reason.
model_judge() (:885) then takes the bare || return 1 at :902 and reports unavailable with nothing in CLASSIFIER_ERROR_LOG to say why. Every other failure path in this tier logs something, which is the same class of gap the recent logging change closed one layer up.
The comment at :778 is right that jq is load-bearing on both paths and that the guard is not a new requirement, so this is not a request to make the model tier work without jq.
Evidence
Read directly in packages/base/bin/stuck-pane-sweep.sh on main at 81a7169. Confirmed by inspection that the guard at :781 precedes both the seam branch and every classifier_error_log call site reachable from model_raw().
Found while reviewing the malformed-verdict logging fix on PR #19; reported there as an out-of-scope edge case and deliberately not fixed inside that PR.
Fix
Pick one, whichever the implementer can defend:
- Log a distinct kind from the guard itself, for example
kind=jq-missing, so the unavailable verdict is diagnosable from the log alone. This is the smallest change and matches how the neighbouring call sites behave. - Or fail loudly and earlier: have
model_judge()distinguish "cannot attempt" from "attempted and failed" in what the caller sees.model_preconditions_ok()(:530) already makes that distinction for the credential and the caller currently cannot tell the two apart.
Not in scope: making the model tier function without jq. That would need the ledger and verdict parsing to move off jq as well.
Acceptance criteria
- The model tier still fails closed when
jqis absent fromPATH. No change to which verdicts are produced. - One line is written to
CLASSIFIER_ERROR_LOGon the absent-jqpath, distinguishable from a transport failure and from an unparseable envelope. - A test covers the absent-
jqpath, holdingPATHto a copy withoutjqand skipping cleanly if no copy can be produced on the host.
Related context, not a dependency: one of the docs issues in the current queue covers the jq-missing note already written to the state file (jqnote at :1297); if that documentation lands first, reuse its wording rather than inventing a second one.
Activity