Repository navigation
pysimlin: run the notebook journey on a kernel that answers - #1079
Conversation
The journey's remaining flake was the kernel, not the page. ipykernel through 7.3 sends shell replies raw on the shell ROUTER that its ZMQStream reads; the send drains the socket's edge-triggered read edge, so a request arriving at that moment is never dispatched and the kernel sits idle for good (ipython/ipykernel#1529, first released in 7.4.0). JupyterLab sends a burst of shell requests when it connects a notebook, so the victim is a notebook's first cell: Lab sends the execute_request, the prompt shows [*], and nothing comes back. A websocket trace and a kernel stack dump of a reproduced failure show exactly that. The e2e extra requires ipykernel>=7.4. A cell run is an action with a checked effect: runCell waits for a new execution count and otherwise fails at the run, saying whether Lab sent the cell or never ran it, with the kernel state and the server log. The setup waits out a server runtime file that is still being written, and the failure artifact, which was always empty because upload-artifact skips the hidden .output directory, includes hidden files.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Review summaryNo blocking issues found. The kernel-wedge diagnosis (ipython/ipykernel#1529) is well-supported by the kernel-level reproducer, the ipykernel>=7.4 pin is appropriate, and the Overall correctness: correct |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1079 +/- ##
=======================================
Coverage 92.66% 92.66%
=======================================
Files 308 308
Lines 188506 188506
=======================================
+ Hits 174672 174673 +1
+ Misses 13834 13833 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Why
The JupyterLab journey kept failing after #1074, always the same way: a notebook's first cell was run and produced no output at all. It failed once on main and three times across open pull requests. #1074 fixed a real race in the harness (the kernel session start); this is a second cause, and it is in the kernel, not the harness.
ipykernel through 7.3 writes shell replies raw on the shell ROUTER socket that its
ZMQStreamreads. The raw send drains the socket's edge-triggered read edge, so a request arriving at the same moment is never dispatched and the kernel sits idle for good (ipython/ipykernel#1529, first released in 7.4.0). JupyterLab sends a burst of shell requests when it connects a notebook (history, debug, the widget manager's comm), which makes a notebook's first cell the likely victim: Lab sends theexecute_request, the prompt shows[*], and nothing ever comes back.What
e2eextra requiresipykernel>=7.4(the lock moves ipykernel 7.2.0 to 7.4.0, with jupyter-client and tornado at 7.4.0's own floors).runCellwaits for a new execution count and otherwise fails at the run, saying which side never acted ([*]: Lab sent it and the kernel has not answered; no new count: Lab never ran it), with the kernel state and the server log's last lines. There is no retry: a wedged kernel answers nothing, so pressing again cannot help.jupyter_serverwrites it in place; this failed the setup once in 121 runs).actions/upload-artifact@v4skips hidden files, and the journey writes toe2e/.output. The upload includes hidden files, so the trace, screenshots and server log reach the artifact.Evidence
execute_requestsent on the notebook's own connection and never answered, and a stack dump of that kernel shows every thread idle inselect().jupyter_client, shell requests pipelined eight deep): ipykernel 7.2.0 wedged in 10 of 10 trials; 7.4.0 in 0 of 10 trials of 3,000 requests each.kernel-session.spec.tscover every arm of the new pure decisions (every truncation of a runtime file, the prompt forms, each before-and-after pair of a cell run, both report verdicts).What this does not establish
🤖 Generated with Claude Code
https://claude.ai/code/session_01LYR7N9WZwQuFnZFW8JDUgx