Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

CI: stop grep -c || echo 0 producing a two-line count (#10232)

Daniel Han568b73621e61
diff --git a/.github/workflows/notebooks-ci.yml b/.github/workflows/notebooks-ci.yml
index 407c80b88fe..5aea83131db 100644
--- a/.github/workflows/notebooks-ci.yml
+++ b/.github/workflows/notebooks-ci.yml
@@ -613,7 +613,11 @@ jobs:
echo "::warning::bulk resolve failed (exit $rc), falling back to per-pin best effort"
grep -E "^ERROR: (Could not find|No matching|Ignored)" /tmp/install_seed.log | head -20 || true
- total=$(grep -c . /tmp/seed_pins.txt || echo 0)
+ # `|| true`: grep -c prints 0 and exits 1 on no match, so `|| echo 0`
+ # appended a second line and the annotations below became multi-line,
+ # which GitHub truncates after the first.
+ total=$(grep -c . /tmp/seed_pins.txt || true)
+ total=${total:-0}
done_n=0; failed_n=0
# Bounded, because an unbounded fallback is how this job spent 112 days
# being scored `cancelled`. Running out of budget is a failure with a
diff --git a/.github/workflows/studio-frontend-ci.yml b/.github/workflows/studio-frontend-ci.yml
index 5c836fb34de..e3c5565291c 100644
--- a/.github/workflows/studio-frontend-ci.yml
+++ b/.github/workflows/studio-frontend-ci.yml
@@ -182,11 +182,21 @@ jobs:
- name: Built bundle must not contain Unsloth's unstable_Provider call site
run: |
set -e
- JS=$(ls dist/assets/index-*.js | head -1)
- HITS=$(grep -c 'unstable_Provider:' "$JS" || echo 0)
+ # `ls | head` takes its status from head, so a missed glob leaves JS
+ # empty and set -e never sees it. grep would then exit 2 on "" and the
+ # guard would pass on a bundle nobody looked at.
+ JS=$(ls dist/assets/index-*.js 2>/dev/null | head -1)
+ if [ ! -f "$JS" ]; then
+ echo "::error::no dist/assets/index-*.js to scan, so the build produced no main bundle"
+ exit 1
+ fi
+ # `|| true`, not `|| echo 0`: on no match grep -c PRINTS 0 and exits 1,
+ # so the fallback appended a second line and the -gt below died with
+ # "integer expression expected" on every green run.
+ HITS=$(grep -c 'unstable_Provider:' "$JS" || true)
echo "main bundle: $JS"
- echo "unstable_Provider: hits=$HITS (assistant-ui internals contribute up to 3)"
- if [ "$HITS" -gt 3 ]; then
+ echo "unstable_Provider: hits=${HITS:-0} (assistant-ui internals contribute up to 3)"
+ if [ "${HITS:-0}" -gt 3 ]; then
echo "::error file=studio/frontend/src/features/chat/runtime-provider.tsx::Unsloth bundle still passes unstable_Provider through useRemoteThreadListRuntime; this is the 2026.5.1 chat-history regression. Pass adapters directly into useLocalRuntime instead."
exit 1
fi