docs(jupyter-live-kernel): document zmq transport fallback and disable_check_xsrf pitfalls - #27283
Conversation
…e_check_xsrf pitfalls Add two pitfalls discovered when running the skill against a fresh Jupyter server: - Pitfall NousResearch#9: When the websocket reply channel hangs on every execute even though the kernel actually ran (REST shows execution_state=idle and execution_count increments), force zmq transport with --transport zmq. The zmq transport uses jupyter_client directly and sidesteps the broken websocket layer. - Pitfall NousResearch#10: A fresh ServerApp rejects POST /api/sessions with "_xsrf argument missing from POST" unless you start it with --ServerApp.disable_check_xsrf=True. Needed for REST-only flows where no browser/cookie is establishing the XSRF token.
This comment was marked as spam.
This comment was marked as spam.
|
Thanks for the focused documentation update. Current main still creates a notebook session through a direct REST The proposed ZMQ guidance matches the helper's current transport behavior: the upstream helper raises the stated unsafe-auto-fallback message at This is an automated hermes-sweeper review. |
|
Thanks @upicat — both pitfalls are now on main via #70482, which cherry-picked your commit directly so your authorship is preserved in history (a4fa699). The skill moved and was renamed while your PR was open (skills/data-science/jupyter-live-kernel → optional-skills/data-science/jupyter-notebook, #70431), so a direct merge was no longer possible — the salvage applied your change to the new path and added the regenerated docs page + zh-Hans translation on top. Closing this one; the content is fully landed. |
What\n\nAdd two pitfalls to the
jupyter-live-kernelskill, both encountered when running against a freshly started Jupyter server.\n\n### Pitfall #9 — Force zmq transport when websocket hangs\n\nOn some hosts the websocket reply channel hangs on everyexecuteeven though the kernel actually ran (REST showsexecution_state=idleandexecution_countincrements). The symptom from the skill side is the error message:\n\n> Websocket execution may already have reached the kernel, so auto fallback was skipped\n\nThe workaround is to pass--transport zmqso the skill talks to the kernel throughjupyter_clientdirectly and sidesteps the broken websocket layer.\n\n### Pitfall #10 —disable_check_xsrffor REST-only flows\n\nA freshServerApprejectsPOST /api/sessionswith:\n\n>_xsrfargument missing from POST\n\nThe skill drives the server purely over REST, so no browser/cookie ever establishes an XSRF token. The fix is to start the server with--ServerApp.disable_check_xsrf=True.\n\n## Why\n\nBoth failure modes are easy to misdiagnose — pitfall #9 in particular looks like the kernel hung, when in fact only the reply path is broken. Documenting the symptom + the one-flag fix in the same place as the rest of the pitfalls section saves the next user from re-tracing the same investigation.\n\n## Scope\n\nPure docs change toskills/data-science/jupyter-live-kernel/SKILL.md— no code or behavior changes. +11 lines, 0 deletions, 0 lint targets.