Loading
fix(proxy): reset shared kernel state on notebook restart
Restarting a notebook only recreated the local proxy process — the shared service kernel holding the actual Python state was never touched, since Jupyter's own shutdown signal to it is unreliable (a ZMQ connection-timing race inside jupyter_client, not something fixable from this side).
Detect a genuine restart (as opposed to a brand-new notebook) by tracking which kernel_ids have connected before, and explicitly reset the real kernel's namespace on any subsequent connection. Also log a warning to the service's own logs, since the kernel is shared and other users' variables get cleared too.
Closes #380 (closed)
Closes #220 (closed)
Edited by Koushik Kumaran