Skip to content

os: the gguf row says which of its three situations it is in - #596

Merged
bong-water-water-bong merged 1 commit into
mainfrom
1bit/gguf-row-honest
Oct 26, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
1bit/gguf-row-honest

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Candidate 10's first hardware run reported:

SKIP  gguf : no /data/models/*.gguf on the data partition

while ls /data/models/*.gguf found the file. The row never looked at the partition. It took its else
branch because $MODELS was empty — and $MODELS is filled from Lemonade's model list, which had come back
401 because /data/lemonade/lemond.conf carried two LEMONADE_API_KEY= lines: the check read the first
(stale) one with head -1, while a shell sourcing that file honours the last.

So a missing model list was reported as a missing file, and whoever read it went looking at the data partition
instead of at the key.

Fix: the three situations get their own row text.

situation row
no *.gguf on /data SKIP no /data/models/*.gguf on the data partition
a *.gguf, but Lemonade listed no models SKIP '<name>.gguf' is on the data partition, but Lemonade listed no models, so it cannot be checked (see the lemonade row)
listed / not listed PASS / FAIL as before

--self-test PASS, bash -n clean.

Not in this PR — the key read itself

release-check.sh:130 takes the first ^LEMONADE_API_KEY= line; a shell honours the last. Reading the key from
the running process (/proc/<pid>/environ) removes the ambiguity entirely; tail -1 would only make the guess
match shell semantics. Left to the key-handling change so the two do not collide on the same line.

On candidate 10's first hardware run the row reported

  SKIP gguf : no /data/models/*.gguf on the data partition

while `ls /data/models/*.gguf` found the file. The row had never looked at the data partition: it took its
else branch because $MODELS was empty, and $MODELS is filled from Lemonade's model list, which had come
back 401 because the conf carried two LEMONADE_API_KEY lines and the check read the first (stale) one
while lemond honours the last. So a missing model list was reported as a missing file, and the reader
went looking at the partition instead of at the key.

Same shape as the other rows that misled on this boot: one message covering conditions with different
causes. Split into three:

  no *.gguf on /data                      -> skip "no /data/models/*.gguf on the data partition"
  a *.gguf but Lemonade listed no models  -> skip "<name>.gguf is on the data partition, but Lemonade
                                              listed no models, so it cannot be checked (see the lemonade row)"
  listed / not listed                     -> pass / fail as before

self-test PASS, bash -n clean.

Not in this PR: the key read itself. release-check.sh:130 takes the FIRST '^LEMONADE_API_KEY=' line with
head -1, while a shell sourcing that file honours the LAST one, so a conf with two keys makes the check
test a key lemond is not using. Reading the key from the running process (/proc/<pid>/environ) removes
the ambiguity; `tail -1` would only make the guess match shell semantics.
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Logic Correction for GGUF Row Handling

The previous logic for handling the GGUF row was ambiguous and led to incorrect reporting when the $MODELS variable was empty due to a stale API key. The new implementation correctly distinguishes between three distinct situations: no GGUF file found, GGUF file present but not listed by Lemonade, and GGUF file both present and listed. This change prevents misreporting of missing models as missing files.

# Three different situations used to share one message. On candidate 10's first hardware run the gguf row
# said "no /data/models/*.gguf on the data partition" while `ls /data/models/*.gguf` plainly found the
# file: the row never looked at the partition at all. It took this else branch because $MODELS was empty -
# Lemonade's list had come back 401 with a stale key - so a missing model list was reported as a missing
# file, and the person reading it went looking at the data partition instead of the key.
if [ "$GGUF_NAME" = none ]; then
    skip gguf "no /data/models/*.gguf on the data partition"
elif [ -z "${MODELS:-}" ]; then
    skip gguf "'$GGUF_NAME.gguf' is on the data partition, but Lemonade listed no models, so it cannot be checked (see the lemonade row)"
elif have_model "$GGUF_NAME"; then
    pass gguf "the stick's own model '$GGUF_NAME' is listed"
else
    fail gguf "/data/models/$GGUF_NAME.gguf is on the data partition but Lemonade does not list it"
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant