fix(studio): suppress fatal error when prebuilt manifest is missing

When DEFAULT_PUBLISHED_REPO is ggml-org/llama.cpp, the prebuilt
resolver fails because ggml-org releases do not include a
llama-prebuilt-manifest.json asset. This raised a PrebuiltFallback
exception that was caught by the generic Exception handler and
printed as "fatal helper error" to stderr, which triggers a
NativeCommandError on PowerShell and looks alarming.

Catch PrebuiltFallback separately and exit with EXIT_FALLBACK (code 2)
instead of EXIT_ERROR (code 1). The message is still logged but
without the "fatal helper error" prefix. The shell scripts already
handle non-zero exits gracefully and fall back to source builds.
This commit is contained in:
Daniel Han 2026-04-02 19:14:00 +00:00
commit 90724f6dab

View file

@ -4733,6 +4733,12 @@ if __name__ == "__main__":
f"fatal helper busy conflict: {textwrap.shorten(str(exc), width = 400, placeholder = '...')}"
)
raise SystemExit(EXIT_BUSY)
except PrebuiltFallback as exc:
# Expected when the published repo (e.g. ggml-org/llama.cpp) has no
# prebuilt manifest. Exit quietly with EXIT_FALLBACK so the caller
# falls back to source build without a noisy "fatal helper error".
log(textwrap.shorten(str(exc), width = 400, placeholder = "..."))
raise SystemExit(EXIT_FALLBACK)
except Exception as exc:
message = textwrap.shorten(str(exc), width = 400, placeholder = "...")
log(f"fatal helper error: {message}")