Skip to content

fix(workbench): bound JupyterLab cell-run retry timeout#534

Merged
samcofer merged 1 commit into
mainfrom
fix/jupyter-retry-timeout
Jul 24, 2026
Merged

fix(workbench): bound JupyterLab cell-run retry timeout#534
samcofer merged 1 commit into
mainfrom
fix/jupyter-retry-timeout

Conversation

@samcofer

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #532. The JupyterLab type-and-run retry loop in jupyterlab_executes_code waited the full TIMEOUT_CODE_EXEC (30s) on every attempt, so a genuinely stuck cell took up to ~90s to reach the skip.

Retries exist to recover a lost keystroke against an already-live kernel, which resolves in seconds — only the first attempt needs the full cold-kernel budget. This gives attempt 1 TIMEOUT_CODE_EXEC and subsequent attempts the shorter TIMEOUT_DIALOG (10s), bounding the worst-case failure path without changing the happy path.

Verification

  • ruff 0.15.0 + mypy clean.
  • Live vip verify --filter launch_jupyter runs on the installed build:
    • pwb.demo.soleng.posit.it (Workbench 2026.07, interactive) — 3/4 passed; the one failure was an upstream session-never-reached-Active-in-90s startup timeout, unrelated to this change.
    • workbench-helm.local.cofer.me (Workbench 2026.06, headless, 5× serial) — 4/5 passed; the one skip was the accurate "UI-interaction timeout, not kernel death" message on a 140s-slow session start.

Known follow-up

On very slow cold starts the shortened retry budget can still lose (helm run 5). A future improvement is to gate retries on the kernel-status indicator reaching idle before re-running, so a still-connecting kernel waits rather than burning a short retry.

🤖 Generated with Claude Code

The type-and-run retry loop waited the full TIMEOUT_CODE_EXEC (30s) on every
attempt, so a genuinely stuck cell took up to ~90s to reach the skip. Retries
exist to recover a lost keystroke against an already-live kernel, which
resolves in seconds — only the first attempt needs the full cold-kernel
budget. Give attempt 1 TIMEOUT_CODE_EXEC and subsequent attempts the shorter
TIMEOUT_DIALOG, bounding the worst-case failure path without changing the
happy path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@samcofer
samcofer enabled auto-merge (squash) July 24, 2026 18:59
@samcofer
samcofer merged commit ec22572 into main Jul 24, 2026
33 checks passed
@samcofer
samcofer deleted the fix/jupyter-retry-timeout branch July 24, 2026 19:04
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-24 19:05 UTC

@github-actions

Copy link
Copy Markdown

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.

1 participant