Skip to content

fix(orchestrate): bound run_render's wait and disambiguate its failure - #229

Merged
schmug merged 1 commit into
mainfrom
issue-64-71
Sep 10, 2026
Merged

schmug merged 1 commit into
mainfrom
issue-64-71

Conversation

@schmug

@schmug schmug commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add RENDER_TIMEOUT_S (~30 min) and pass it to run_render's subprocess call so an OS-level stall in render.py can't block the unattended cron indefinitely; a subprocess.TimeoutExpired is caught and re-raised as RenderError, following summarize_item's existing pattern (Add a subprocess timeout to run_render in orchestrate.py #64).
  • Split run_render's single merged failure branch into three distinguishable RenderError messages: non-zero exit, timeout, and exit-0-but-unparseable-stdout — so main()'s FAILED <reason> line names the actual cause instead of echoing whatever line happened to print last, which could be a late-success log line (Make run_render's RenderError message diagnostic instead of the last stdout line #71).

Both issues touch the same function, so they're landed together to avoid a guaranteed merge conflict.

Test plan

  • New tests added first (TDD): timeout is forwarded to the runner, a TimeoutExpired raises RenderError mentioning "timed out", and a returncode-0/unparseable-stdout case raises RenderError mentioning "unparseable" (not the bare last printed line).
  • test_run_render_raises_on_failure (non-zero exit) still passes unchanged.
  • python3 -m pytest -q — 1552 passed, 0 failed.
  • ruff check and ruff format --check — clean on both changed files.

Closes #64
Closes #71

🤖 Generated with Claude Code

… its failure

Add RENDER_TIMEOUT_S (~30 min) so an OS-level stall in render.py can no longer
block the unattended cron indefinitely (#64); a subprocess.TimeoutExpired is
caught and re-raised as RenderError, following summarize_item's existing
pattern. Also split run_render's merged failure branch into three distinguishable
RenderError messages - non-zero exit, timeout, and exit-0-but-unparseable-stdout
(#71) - so main()'s FAILED line names the actual cause instead of echoing
whatever happened to print last, which could be a late-success log line.

Closes #64
Closes #71

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@schmug
schmug merged commit bdea2e7 into main Sep 10, 2026
3 checks passed
@schmug
schmug deleted the issue-64-71 branch September 10, 2026 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make run_render's RenderError message diagnostic instead of the last stdout line Add a subprocess timeout to run_render in orchestrate.py

1 participant