8000 Absent jq makes the model tier fail closed with no log line · Issue #70 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

Skip to content

Absent jq makes the model tier fail closed with no log line #70

Open

Description

@simon-inkie

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-exit call site (:812) is never reached, because the seam subprocess is never run, and
  • the three transport / http-error / unparseable-envelope call sites (:875 and 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:

  1. 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.
  2. 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 jq is absent from PATH. No change to which verdicts are produced.
  • One line is written to CLASSIFIER_ERROR_LOG on the absent-jq path, distinguishable from a transport failure and from an unparseable envelope.
  • A test covers the absent-jq path, holding PATH to a copy without jq and 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

  1. added
    bugSomething isn't working
    agentsAgent lifecycle / boot
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentsAgent lifecycle / bootbugSomething isn't workingpriority:P1Blocks a normal user

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0