You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
review_runner: surface real crash cause instead of "(see pod log)" (#55)
## Problem
A UI review of `huggingface/peft#3395` on `zai-org/GLM-5.2` failed twice
with only:
```
LLMResponseError: review crashed (see pod log)
```
…and the pod log was **unrecoverable**. Two compounding issues:
1. **`review_runner.py` discarded the detail.** Its catch-all reported
the generic `"{type}: review crashed (see pod log)"`, throwing away
`str(exc)` — which for `LLMResponseError` already carries the LLM
endpoint's status + body excerpt. (`task_runner.py`, the write-capable
path, already handled this correctly; the read-only review path had
regressed.)
2. **`(see pod log)` is a dead reference.** On the self-reported-error
path the Job watcher sees `status=error` from the callback and reaps the
runner pod immediately — it never waits for `ttlSecondsAfterFinished`,
and skips the `collect_task_result` log-tail capture the *crash* path
uses. The pod (and its traceback) is gone within seconds.
Net effect: an upstream HF-router failure for GLM-5.2 left the operator
with no legible cause.
## Fix
Bring `review_runner.run()` to parity with `task_runner`:
- `except LLMResponseError` → `format_llm_error(exc)` (status + body
excerpt: 429/400/auth become legible).
- `except requests.HTTPError` → `format_github_http_error(exc)`.
- catch-all now embeds `crash_detail(exc)` (cause + crashing frame)
instead of `(see pod log)`.
- `crash_detail` moves to `errors.py` (its shared home); `task_runner`
imports it — one copy for both entrypoints.
## Also
`make format`/`test` built a **Python 3.9** venv because bare `python3`
is 3.9 on stock macOS, violating `requires-python >=3.10` (and stalling
dependency resolution). The Makefile now selects the newest available
≥3.10 interpreter and hard-fails with a clear message otherwise. CI
(3.12) unaffected.
## Tests
`tests/test_review_runner.py`: strengthened the crash test (asserts the
cause travels, never `"see pod log"`) and added one proving a 429's
status + body land on the job. Full suite: **398 passed**, ruff clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments