Skip to content

Commit 5516665

Browse files
larsgebclaude
andcommitted
Pages: add per-cell progress log to diagnose SIGSEGV in demo.py subprocess
Each cell now prints its number and first-line preview to the real stdout (bypassing the capture buffer) before exec-ing. This survives hard crashes and will show us exactly which cell triggers the SIGSEGV in demo.py. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8676782 commit 5516665

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/render_notebooks.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ def _patched_show(*_args, **_kwargs) -> None:
8282
if not src:
8383
continue
8484

85+
# Progress line bypasses stdout_buf so it survives a crash mid-cell.
86+
preview = src.splitlines()[0][:60]
87+
print(f" [cell {exec_count}] {preview}", file=sys.__stdout__, flush=True)
88+
8589
cell_images.clear()
8690
stdout_buf = io.StringIO()
8791

0 commit comments

Comments
 (0)