Skip to content

ContributorsFor working on Ganymede itself.

Development log ​

NOTE

This is a history for contributors, not documentation. An entry describes the code as it was when the entry was written. For how Ganymede works now, read the guides and the reference; site search leaves this page out.

Findings from each step, newest last: what was built, what was checked against the reference implementations, what broke, and what was learned.

The design started as a single sketch.md, split on 2026-10-17 into Architecture, Replacing Python, Protocol and kernel host, User interfaces, The iPad use case, Roadmap, and Prior art. Older entries refer to the sketch by section number, and entries before the rename use the old jcore- crate names.

Adding an entry ​

Each pull request adds its own file to notes/, named YYYY-MM-DD-<topic>.md (for example 2026-10-18-request-body-limit.md), instead of appending to one shared file, so PRs open at the same time don't conflict. The file holds one entry that starts with ## YYYY-MM-DD, <topic> (#<issue>). Links are relative to notes/ (../architecture.md).

The docs site shows every entry on this page: first notes/archive.md, the log before it was split, then the dated files in name order (see .vitepress/notes.ts). On GitHub the entries are the files in notes/.

2026-10-17 ​

Starting point: question of what a Rust reimplementation of the Jupyter core (kernel host, web UI, protocol) would take and what is easy to miss.

Wrote sketch.md: components, what already exists in Rust, commonly missed pieces, and an order of work.

Findings while writing it:

  • Messaging spec is now v5.5: subshell_id in headers, iopub moved to XPUB with an iopub_welcome message, supported_features in kernel_info_reply (JEP 92).
  • The runtimed crates (jupyter-protocol, runtimelib, nbformat) are maintained and used by Zed's REPL. They cover protocol, ZMQ kernel client, and the file format. A new project should either build on them or use them as a conformance oracle.
  • No Rust equivalent of jupyter_server exists. That plus the frontend is the actual work.
  • The frontend cannot usefully be Rust-native if text/html outputs and widgets matter. TypeScript UI over a Rust server is the pragmatic shape. (Superseded by the scope clarification at the end of these notes: the UI was never meant to be Rust, and is pluggable.)

Open questions:

  • Is the goal a product, or understanding the system? Changes whether to reuse the runtimed crates.
  • Are widgets in scope? Largest single cost after the UI itself.
  • Windows support?
  • Must existing clients (JupyterLab, VS Code, papermill) connect to it? If yes, the REST and websocket surface is fixed by jupyter_server.

Nothing built.

2026-10-17, later ​

Goal clarified: a Jupyter server with no Python anywhere in the product, kernel-agnostic, with cdp-kernel (TypeScript on Node or Deno) as the first target. May become a project of its own.

Read cdp-kernel's install, architecture, and known-gaps pages. Relevant facts:

  • Speaks ZMTP over TCP via node:net; no ipc transport.
  • Installs kernelspecs to the standard Jupyter data dirs ($JUPYTER_DATA_DIR, ~/Library/Jupyter, XDG). Uninstall docs still point at the Python jupyter kernelspec CLI, so the server should ship kernelspec list/install/remove.
  • Interrupts over CDP internally; kernel.json contents (including interrupt_mode) are not documented. Read the generated file.
  • anywidget-style widgets and comms only; no ipywidgets controls.
  • Debugger on Node and Deno targets; needs a DAP client in the UI.
  • prompt() and confirm() over stdin.
  • Kernel inherits the server's environment. Windows unsupported.

Changes to sketch.md: revised goal paragraph, new section 3 (table of Python assumptions in the reference stack and their replacements, what cdp-kernel needs from a server, frontends that work today), order of work now validates the server with VS Code plus cdp-kernel before any UI, and more prior art (Jupyverse, VS Code Jupyter extension, anywidget, Datalayer jupyter-react).

Main conclusion: step 4 (the server) is a usable product on its own. VS Code's Jupyter extension against a Rust server running cdp-kernel is a fully Python-free TypeScript notebook environment with no UI work.

Open questions, updated:

  • Build on the runtimed crates or reimplement? Still open.
  • Which interrupt_mode does cdp-kernel declare?
  • Serve JupyterLab's static bundle (needs /lab/api/*) or target VS Code only for v1?
  • Widgets: anywidget-only manager in a custom UI, or rely on JupyterLab and VS Code's managers until a UI exists?

2026-10-17, ts-on-ipados as a use case ​

The ts-on-ipados plan is one intended use: this server is its remote tier on the Mac mini over the tailnet. Read the design note sections 04, 05, 09 and the review sections 3, 4, 6, 7. Added section 6 to sketch.md.

What the plan adds to the server's requirements:

  • REST API fidelity, because Juno Connect and JupyterLab in Safari are the Tier 0 clients.
  • Token auth baseline; tailscale serve identity headers as an option.
  • Kernels survive websocket drops (iPad suspension) and clients reattach by id; idle culling as the complement.
  • Files are truth: iCloud Drive writes under the server. Needs mtime conflict check on PUT, atomic writes, checkpoint dir outside the synced folder.
  • The websocket and channel-message shape become a public contract once the Swift client exists.
  • Library-first workspace so the iPad app can compile the protocol, nbformat, and document crates for iOS and drive its in-process kernel through the same types. ZMQ is one transport behind a trait.
  • An attach-to-existing-kernel provisioner, for driving the device kernel from a desktop JupyterLab during development.
  • Pass kernelspec metadata and kernel_info_reply through verbatim so capability manifests reach the client.

Tension noted: a server-side CRDT and iCloud file sync are two writers of one file. For this use case, file-as-truth with the mtime check is enough for v1.

2026-10-17, modules and profiles ​

Goal restated: pluggable modules composing a Jupyter-like environment on iPad, desktop, or server; TypeScript kernels as the focus; Python kernels possible on desktop and server but never assumed. Added section 7 to sketch.md: the one rule (the host knows no language), the seams with their implementations, the three profiles, a crate layout, and a ranked definition of ecosystem compatibility.

Decisions implied:

  • Kernel host boundary is "a stream of channel messages", with ZMQ, in-process, and websocket-client transports behind one trait.
  • The REST and websocket handlers are functions over traits, not axum handlers, so the iPad bridge and the HTTP server share them.
  • The widget manager is per profile: anywidget-only on iPad, the full ipywidgets manager where Python kernels are expected.
  • Extension compatibility (JupyterLab, jupyter_server) is out, by design.

Found two existing seams to match: jupyter_server's gateway client (remote provisioner) and @jupyterlab/services ServerConnection with custom fetch and WebSocket (how JupyterLite runs without a server). JupyterLite is the closest precedent for the iPad profile.

Test rule to adopt: the same scenarios run against cdp-kernel and ipykernel; no python string in host crates outside tests.

2026-10-17, code sketch ​

Started the code. Cargo workspace at the project root, crates/*, and a TypeScript package under frontend/. Everything builds, tests pass, clippy is clean. Test oracle: a scratch venv with ipykernel 7 and nbformat 5.11 (cdp-kernel needs Node 24; this container has 22).

Crates:

  • jcore-protocol: envelope, typed content with extra passthrough, ZMQ wire framing with HMAC-SHA256, connection file, websocket v1 and legacy codecs. No I/O. 12 tests, including an HMAC vector checked against Python and the v1 offset layout from jupyter_server.
  • jcore-nbformat (written by a subagent): nbformat 4.5 types, lenient reader, byte-exact writer matching nbformat.write. 24 tests against fixtures generated by Python nbformat.
  • jcore-kernel-host: kernelspec discovery over the Jupyter data dirs, the transport seam with an in-process pair, the ZMQ transport on the pure-Rust zeromq crate, subprocess and attach provisioners, the session state machine, and a fake kernel. 9 tests.
  • jcore-exec: headless executor over the two above. 2 tests.
  • jcore-cli: jcore kernelspec list|paths, jcore run, jcore attach, jcore exec.

Verified against ipykernel over real ZMQ:

  • jcore run --kernel python3 ...: launch, nudge, five cells, shutdown, about 1.6 s total.
  • --interrupt-after-ms: SIGINT to the process group interrupts a sleeping cell; interrupt_request on control does the same on the fake.
  • jcore attach <connection file> against a kernel started by jupyter_client.
  • jcore exec: a notebook generated by nbformat with streams, a display_id update, clear_output(wait=True), and an empty cell. The output validates with nbformat and is byte-identical after an nbformat rewrite.

Things learned:

  • tokio::sync::watch::Sender::send fails when no receiver exists; use send_replace for state that may have no watchers yet.
  • ipykernel 7 reports protocol 5.3 in kernel_info_reply while its kernelspec says 5.5. Do not gate on the version string.
  • ipykernel warns about unencrypted TCP and advertises supported_encryption: ["curve"] in kernelspec metadata. CurveZMQ is a future item for the ZMQ transport.
  • Python json.dumps float layout (1e-05, 2.5e-07) differs from serde_json; the nbformat writer has its own float formatter.
  • nbformat.write assigns ids to cells that lack them, so byte fidelity is only defined for notebooks with ids.

Frontend (written by a subagent): protocol types, the websocket v1 and legacy codecs, a ServerConnection with injectable fetch and WebSocket, a REST client, a KernelConnection with the two-part completion rule, a renderer registry, ANSI and stream handling, and widget manager interfaces. 45 tests on Node's test runner, typescript as the only dependency. No editor, no DOM tests, no app shell yet.

Not done, in the order the sketch suggests: the server crate (REST and websocket bridge over the session), the contents crate, the document model, an app shell for the frontend, cdp-kernel verification (needs Node 24), CurveZMQ, Windows.

2026-10-17, server crate ​

Added three crates. jcore-contents (subagent): the contents seam and a filesystem implementation with atomic writes, the mtime conflict check, checkpoints with a configurable directory outside the root, and path safety including symlink escapes; 30 tests. jcore-api: kernel and session managers, models, and the per-client bridge, with no HTTP; 6 tests. jcore-server: axum routes, token auth, websocket channels, TOML config, static assets; 5 integration tests including a real websocket round trip against the fake kernel.

Verified against ipykernel over ZMQ, through HTTP, from Node:

  • Our frontend/ client: kernelspecs, start, kernel_info, execute with stdout and stderr, result, error reply, shutdown.
  • @jupyterlab/services 7.5, the real JupyterLab client library: specs, start, info, execute, complete, signal interrupt of a sleeping cell, restart (it reconnects its websocket on its own), contents newUntitled, save, get, list, sessions bound to the kernel, shutdown, and the server's close frame when the kernel is gone.

Things learned:

  • JupyterLab's client POSTs JSON without Content-Type; axum's Json extractor answers 415. jupyter_server parses the body regardless. The server now has a lenient extractor for every body route.
  • A client holding an Arc to the running kernel keeps the broadcast hub alive, so "hub closed" can never signal shutdown; an explicit alive flag the client selects on does.
  • KernelSession::shutdown must not wait on or kill a process it does not own; attached kernels have no pid.
  • A kernel started with no path must run in the contents root, not the server's cwd.
  • pkill -f <pattern> matches the shell running it. Use process names.
  • The contents crate's checkpoint layout with an external directory mirrors the root's tree instead of jupyter_server's flat folder, so same-named files in different directories do not collide.

Not done: cookie login for a browser frontend, serving JupyterLab's static bundle (needs /lab/api/*), CurveZMQ, kernel autorestart on crash, cdp-kernel verification.

Scope clarification: the UI is not Rust (2026-10-17) ​

Only the core server is Rust. The UI was never meant to be, and should itself be pluggable: any Jupyter frontend, a TypeScript web UI, or a native shell, for example a Swift app on iPadOS with a web view doing the rendering. Earlier drafts read as if the presentation layer was part of the Rust project (scope line, section 2.6 weighing Rust UI frameworks, frontend/ described as "the" frontend). The sketch, README, and section 7 now treat the UI as a client of the core's API, with the TS package as shared rendering code for any web-view UI. No code changes: the Rust crates never depended on a UI.

2026-10-17, rename to ganymede- ​

Renamed the crates from jcore-* to ganymede-*, the CLI binary from jcore to ganymede, the server binary from jcore-server to ganymede-server, and the npm package to @ganymede/frontend. Entries above this one keep the old names.

Things learned:

  • The longer crate prefix pushes some use lines and signatures past rustfmt's width, so a rename needs cargo fmt before CI's fmt --check passes.

2026-10-17, validation against JupyterLab and VS Code ​

Pointed JupyterLab 4.6.4 and the VS Code Jupyter extension's remote-server flow at the server, with ipykernel 7 as the kernel (cdp-kernel needs Node 24; this container has 22). For JupyterLab, a real jupyter lab (jupyter_server 2.21.1) was the oracle: the same browser script ran against both and the request sets were diffed. Scripts are in validation/.

No real VS Code instance can run in this container. Instead, validation/vscode.cjs replays the extension's flow from its source (vscode-jupyter e116e22, src/kernels/jupyter and src/standalone/userJupyterServer): the same URL parsing, password probe, @jupyterlab/services settings, Request and WebSocket overrides, and manager calls. It passes all 13 steps against both servers.

Added:

  • JupyterLab mode. --static-dir pointed at JupyterLab's static/ directory is recognised by its index.html and package.json; the server then serves the page at /lab, /lab/tree/*, and /lab/workspaces/* with a page config, the bundle at /static/lab, schemas/ and themes/ from the sibling directories, and prebuilt extensions found in labextensions under the Jupyter data dirs or --labextensions-path. / redirects to /lab.
  • /lab/api/settings (JSON5 user settings under <config dir>/lab/user-settings), /lab/api/workspaces, /lab/api/translations (English only), /lab/api/listings, /lab/api/plugins, /lab/api/licenses (JSON format only), /lab/api/themes.
  • Core jupyter_server endpoints JupyterLab calls: GET /api (public, reports the API version matched), /api/me, /api/config/{section} (GET, PATCH with recursive merge, stored in <config dir>/nbconfig), /api/nbconvert (empty: nbconvert is Python), /api/events/subscribe (accepted, silent), and kernelspec resources with /kernelspecs/{name}/{file}.
  • --config-dir for that frontend state; default JUPYTER_CONFIG_DIR or ~/.jupyter, the same place jupyter_server keeps it.

Endpoints JupyterLab called, opening a notebook, running a cell, saving: /lab/workspaces/{ws}/tree/{path}, /static/lab/*, /lab/extensions/*, /lab/api/settings (plain and ?ids_only=true), /lab/api/settings/{id}, /lab/api/themes/{pkg}/index.css, /lab/api/translations, /lab/api/translations/default, /lab/api/workspaces (GET, PUT every few seconds), /api/me, /api/config/jupyterlabapputilsextensionannouncements, /api/nbconvert, /api/kernelspecs, /api/kernels, /api/sessions (GET, POST, PATCH twice), /api/contents (root listing, content=0&hash=0 polls, the notebook with hash=1, PUT), /api/contents/{path}/checkpoints (GET, POST), websockets /api/events/subscribe and /api/kernels/{id}/channels?session_id=, /lsp/status, and the kernelspec logo. Only against jupyter_server, because of its page config: /api/terminals and /lab/api/build. Every REST URL carries a cache-busting ?<timestamp> query.

VS Code's flow calls: GET / and GET /tree? without credentials (the password probe; 404 on /tree? means "no password"), /api/kernels, /api/kernelspecs, /api/sessions (GET, POST with a <name>-jvsc-<uuid>.ipynb path that never exists, DELETE), /api/kernels/{id}/interrupt, /api/kernels/{id}/restart, and the channels websocket with Authorization as a handshake header and token in the query. It never calls /api, /api/me, /api/status, or the contents API. It forces Content-Type: application/json on every request, GET and DELETE included, and pings the websocket every 30 s.

What broke:

  • stdin never reached the client. A kernel sends input_request on its stdin ROUTER to the routing identity that sent the execute_request on shell. The host's shell and stdin DEALERs had separate random identities, so the kernel addressed a peer the stdin socket was not. Fixed: one identity for shell, control, and stdin, as jupyter_client does, with a test. Neither earlier client test exercised input().
  • JupyterLab's websockets get 403 without cookie login. In a browser at the server's own origin, @jupyterlab/services sets appendToken to false, so the events and channels websockets carry no token and rely on the login cookie jupyter_server sets when the page is loaded with ?token=. REST calls are fine (the page config token goes in the Authorization header). The kernelspec logo <img> gets 403 for the same reason. With the token appended to websocket URLs by the script (WS_TOKEN=1), JupyterLab opens a notebook, starts ipykernel, runs a cell, and saves a notebook nbformat validates. This is step 3.
  • /lsp/status is 404, as with any jupyter_server without the jupyter-lsp extension. JupyterLab logs it and carries on; the oracle had jupyter-lsp installed, which lists Python language servers.
  • On restart, @jupyterlab/services reports autorestarting and reconnects twice; against jupyter_server it reports restarting and reconnects once. The restart still succeeds. Belongs with kernel lifetime (step 5).

Things learned:

  • JupyterLab's index.html is a Jinja template. The server renders the few constructs it uses; tojson must escape <, >, &, ' so the page config cannot close its <script>.
  • jupyterlab_server returns settings raw as the user's JSON5 text and settings parsed. Users write comments and trailing commas, so a JSON parser is not enough.
  • The page config's extensionManager set to read-only with can_install: false keeps the extension manager from offering PyPI installs. buildAvailable and terminalsAvailable false stop the /lab/api/build and /api/terminals calls.
  • jupyter_server serves /static/lab, themes, and extension assets without auth; the page, /lab/api/*, and kernelspec resources need it; GET /api is public.
  • Chromium does not apply Playwright's extraHTTPHeaders to websocket handshakes, so it cannot stand in for cookie auth.
  • @jupyterlab/services 7.5 appends Authorization: token even when the request already has one, giving token t, token t. jupyter_server rejects that; VS Code's Request subclass blocks the second append.

Not done: Notebook 7's /tree and /notebooks pages, the terminal and LSP endpoints, language packs, overrides.json and page_config.json from the app's settings/ dir, and a real VS Code instance.

2026-10-17, engine, CLI, and e2e parity with Jupyter ​

ganymede-engine is the one library a host embeds: Engine finds kernelspecs and starts, attaches, connects, or adopts kernels; Kernel is one running kernel (execute with a Handler for streamed iopub and stdin, complete, inspect, is_complete, comms, interrupt, restart, shutdown, run a notebook). The ganymede CLI is a thin layer over it, and ganymede serve replaces the separate server binary as the usual entry point.

ganymede-exec now follows nbclient where its behavior is observable in the saved file, so ganymede execute and jupyter execute write the same notebook. Checked on ipykernel 7.4 and cdp-kernel 0.5 with nbclient 0.11 and jupyter_server 2.21:

  • Python notebook: byte-identical after normalizing timestamps and ids.
  • TypeScript notebook: identical except stream chunking (below).
  • REST and websocket transcripts match jupyter server for kernelspecs, contents, sessions, execute, stdin, interrupt, and restart on both kernels, after the exclusions below.

nbclient details that decide the bytes:

  • execution_count counts cells executed in this run, not the kernel's counter; blank cells and cells tagged skip-execution are untouched.
  • metadata.execution timestamps are the message header dates reformatted to %Y-%m-%dT%H:%M:%S.%fZ.
  • display_id updates reach outputs in earlier cells; clear_output(wait) defers to the next output.
  • coalesce_streams defaults to false, so \r survives in saved output. With it on, adjacent streams merge and \r overwrites the line; nbclient's backspace handling never runs (its loop condition is false on entry), so neither does ours.
  • jupyter execute without --output or --inplace writes nothing, and a failing run writes nothing. The old ganymede exec overwrote its input; execute now matches Jupyter.
  • language_info from kernel_info goes into notebook metadata verbatim; widget state goes into metadata.widgets.

Findings:

  • cdp-kernel's stdout and stderr order within one cell is not deterministic (nbclient sees the same), and stream chunk boundaries depend on timing for any kernel. The parity test compares exactly first, then with adjacent same-name streams merged.
  • jupyter_client replaces the installed python3 kernelspec with ipykernel's own when ipykernel is importable, so argv and kernel_protocol_version differ from the file on disk. The host reads only the file, by design.
  • jupyter_server marks notebook cells metadata.trusted from its notary. Ganymede has no trust store, so JupyterLab may treat outputs as untrusted. Open.
  • Contents now returns hash and hash_algorithm (null unless ?hash=1, then SHA-256), and kernelspecs carry kernel_protocol_version, as jupyter_server 2.11+ does.
  • Restarting through the API relaunched the kernel in the server's cwd instead of the notebook's directory. Fixed.

Portability:

  • Features zmq and subprocess on kernel-host and engine gate sockets and child processes. Without them the protocol, nbformat, kernel host, executor, and engine build for wasm32-unknown-unknown (with uuid's js and chrono's wasmbind) and wasm32-wasip1/p2.
  • e2e/wasm-smoke runs a notebook on the in-process kernel inside wasm under Node's WASI: no sockets, processes, or threads.
  • With all features the engine, API, and contents build for aarch64-apple-ios and aarch64-linux-android. The server needs a C cross toolchain there (psm, via its dependencies).
  • A browser page needs more than a build: tokio's timers and spawn need a runtime seam (wasm-bindgen-futures and browser timers), and a kernel reaches the page over a websocket or postMessage transport behind the existing Transport trait. The iPad kernel from the ts-on-ipados plan is the same shape: an in-process Transport.

2026-10-17, release workflow ​

.github/workflows/release.yml packages the ganymede binary.

  • Trigger: a pushed v* tag publishes; pull requests touching the workflow and manual runs build and package without publishing, so the packaging is exercised before a tag exists.
  • The tag must equal v + [workspace.package] version, and each native build checks ganymede --version prints that version. Bump the version first, then tag. A prerelease tag (v0.1.0-rc.1) needs the same string in Cargo.toml.
  • Targets build natively on their own runners, no cross toolchains: Linux on ubuntu-22.04 and ubuntu-22.04-arm (older glibc than ubuntu-latest, so the binary runs on more distributions), macOS aarch64 on macos-latest, macOS x86_64 cross-compiled on the same arm64 runner with Apple's toolchain (not run, Rosetta is not guaranteed), Windows x86_64 MSVC. psm's C code needs only the runner's compiler.
  • Linux binaries are glibc, not musl. Nothing in the dependency tree needs OpenSSL (reqwest with rustls is dev-only), so a musl build is possible later if a fully static binary is wanted.
  • Archives hold ganymede[.exe] and README.md in a ganymede-<version>-<target>/ directory. The release job concatenates the per-archive .sha256 files into SHA256SUMS and verifies them before gh release create --generate-notes.
  • No code signing or notarization yet: macOS Gatekeeper quarantines a downloaded binary (xattr -d com.apple.quarantine ganymede).

2026-10-17, release tooling, changelog, issue tracking ​

  • scripts/release.sh <level> [--execute] wraps cargo-release (version bump across the workspace, Cargo.lock, commit, tag, push) and git-cliff (CHANGELOG.md). Dry run is the default. It refuses unless HEAD is origin/main. The release commit goes straight to main; it is the one commit without a PR.
  • cargo-release runs pre-release-hook once per crate, so the hook lives in ganymede-cli's [package.metadata.release], not release.toml. Hooks also run in dry runs with DRY_RUN=true, so the hook prints the changelog then instead of writing it. CHANGELOG.md must be tracked before the first release: cargo-release commits modified files, not new ones.
  • The changelog comes from merge commits, offline: GitHub's merge commit is Merge pull request #N from <branch> with the PR title as its body, and a squash merge's subject ends in (#N). Preprocessors turn both into <title> (#N); every other commit is dropped. No GitHub token needed. A rebase merge would leave no trace and drop the PR.
  • release.yml takes the notes from the version's CHANGELOG.md section (and fails without one) instead of --generate-notes, so the release page and the file agree.
  • Work is tracked in issues; pr-issue.yml fails a PR whose body has no Closes/Fixes/Resolves/Refs #N. Issue templates: bug, task.
  • Install check: ganymede run -k fake hello and ganymede serve + /api/status need no kernel, so they are the README's smoke test.

2026-10-17, project site and docs ​

A landing page in site/ and VitePress docs in docs/, both in cdp-kernel.org's design, built by .github/workflows/pages.yml on pull requests (so a dead link fails the PR) and deployed to GitHub Pages from main. sketch.md was split into docs pages and this log moved from notes.md to docs/notes.md; the README was rewritten around what exists.

  • The site is served at https://tlockney.github.io/ganymede/ until there is a custom domain, so paths are not at the root. SITE_URL in pages.yml sets it, and config.mts derives the docs' base (/ganymede/docs/) from it. The landing page uses only relative links, so it works under any prefix.
  • The repository has no root package.json; the docs carry their own (docs/package.json, VitePress only). VitePress skips node_modules inside its source directory, so it can live in docs/.
  • VitePress fails the build on links to .md files it doesn't publish. Links from docs to repository files (../README.md, ../validation/) are rewritten to GitHub URLs in config.mts, as cdp-kernel does.
  • The copied stylesheet's two-column grid used 1fr columns, whose minimum is the content's width, so a long code line widened the page on phones. minmax(0, 1fr) fixes it; cdp-kernel.org has the same issue.
  • The architecture diagrams are hand-written SVG in the same style as cdp-kernel's, with a prefers-color-scheme block for dark mode. Inside an <img> they follow the system setting, not the docs' theme switch.
  • GitHub Pages must be enabled with "GitHub Actions" as the source before the first deploy.

2026-10-17, survey of other Jupyter clients ​

Other Jupyter clients lists frontends beyond JupyterLab and VS Code and whether each could run against Ganymede.

  • Most non-browser clients only need token auth, /api/kernelspecs, /api/kernels and the channels websocket, which Ganymede already serves. Zed's REPL is one: it reads JUPYTER_SERVER and JUPYTER_TOKEN and sends the token in the websocket query.
  • Clients that load server HTML pages (Juno Connect wants the classic /tree page, jupynium drives a browser UI) are blocked on pages Ganymede doesn't serve, not on the API.
  • nteract is now a Tauri app on a Rust daemon that talks ZMQ to local kernels; it has no Jupyter server client. Its design records are useful for our own UI.
  • papermill launches kernels itself; to drive Ganymede it needs an engine using jupyter_server's GatewayKernelManager, which also exercises Ganymede as a kernel gateway.

2026-10-17, install script ​

site/install.sh wraps the Install steps: curl -fsSL https://tlockney.github.io/ganymede/install.sh | sh.

  • It lives in site/ so Pages serves it at the site root; the raw GitHub URL works too. Everything runs inside main(), so a truncated download executes nothing.
  • The latest version comes from the /releases/latest redirect, as in the manual steps. With no release published the redirect goes to /releases, and the script says so and points to cargo install.
  • The cdp-kernel step is on by default and never fatal: without Node 24+ or with an npm install -g that needs root, it prints the commands instead.
  • GANYMEDE_DOWNLOAD_BASE swaps the download base, so scripts/test-install.sh tests the script against a stub release over file:// on Linux and macOS, under sh, bash, and dash, without a published release.

2026-10-17, ganymede lab install ​

JupyterLab's frontend without Python (#15): ganymede lab install [--version X] downloads the jupyterlab wheel from PyPI, checks its SHA-256, and unpacks <name>.data/data/share/jupyter/lab/{static,schemas,themes} plus the dist-info LICENSE into ganymede/lab/<version>/ under the local data dir. ganymede serve without --static-dir serves the newest one, or --lab-version / lab_version, and only the API when none is installed.

  • The default is 4.6.4 (latest 4.x on PyPI at the time). Its wheel's SHA-256 is also pinned in the binary, so a changed PyPI listing for the default fails the install; other versions trust PyPI's JSON (/pypi/jupyterlab/<v>/json, the bdist_wheel entry of urls).
  • The wheel is about 17 MB and unpacks to 18 MB. Fetching on demand keeps it out of the release archives; bundling would make offline installs work.
  • HTTP is ureq 3 (blocking, run under spawn_blocking) with rustls on ring and rustls-platform-verifier, so there is no OpenSSL, no aws-lc/cmake/nasm in the release build, and the OS trust store is used: a corporate or sandbox proxy's CA installed there just works (it did here, through the agent proxy, with no extra flags). ureq reads HTTPS_PROXY/ALL_PROXY by default. The webpki roots compiled in by ureq's rustls feature are unused.
  • zip 9 with only deflate-flate2-zlib-rs: wheels use stored and deflate entries. enclosed_name() drops absolute and .. paths.
  • Installs unpack into .<version>-* beside the target and are renamed into place, so a bundle counts as installed once static/index.html exists and dot-directories are ignored. lab.rs already derives schemas/ and themes/ from static/'s parent, so the installed layout needed no server changes beyond picking the directory.
  • The lookup (lab::installs_dir, lab::installed, version ordering) lives in ganymede-server, which both binaries share; the network and zip code stay in the CLI, away from the wasm-built crates.
  • dirs::data_local_dir() rather than data_dir(): the same on Linux and macOS, but %LOCALAPPDATA% on Windows, so 18 MB doesn't roam. GANYMEDE_DATA_DIR overrides it; the tests use that.
  • The network test (tests/lab.rs) runs only with GANYMEDE_E2E_LAB=1, which CI's e2e job sets on Linux and macOS; cargo test stays offline.

JupyterLab in a browser now runs notebooks against ganymede serve without the WS_TOKEN=1 workaround: its websockets authenticate with the login cookie. Checked against jupyter_server 2.21.1 (tornado 6.5) and JupyterLab 4.6 in headless Chromium.

What jupyter_server does, and Ganymede now matches (the server e2e transcript records each of these, cookie attributes included):

  • Any token-authenticated request that arrives without a valid login cookie gets one, API calls included. The cookie is username-<host with non-alphanumerics as dashes>, a tornado version 2 signed value holding a JSON user, HttpOnly, Path=<base_url>, expiring in 30 days; signatures are accepted for 31.
  • A correct token wins over the cookie. An invalid cookie is answered 403 and cleared (name="" with a past expiry).
  • Pages redirect a browser with no login to login?next=<url-encoded path and query>; the API answers 403 {"message": "Forbidden"}.
  • /login renders a form with a hidden _xsrf field and sets the _xsrf cookie if missing. The POST needs that field (403 without it), answers 401 for a wrong token, and 302s to next with the cookie. next must be a path under base_url, else base_url. /logout clears the cookie and, being a rendered page, also sets _xsrf.
  • XSRF applies to methods other than GET, HEAD, and OPTIONS that did not send the token, and runs before the auth check, so an unauthenticated POST gets the XSRF message, not "Forbidden". The token comes from _xsrf (query or form), X-XSRFToken, or X-CSRFToken. Messages: '_xsrf' argument missing from POST, '_xsrf' argument has invalid format, XSRF cookie does not match POST argument. A cross-origin request fails first with 404. _xsrf values are 2|<4-byte mask>|<masked token>|<time> and compare by the unmasked token; any other numbered version is invalid, and an unnumbered value is a version 1 token, hex or verbatim. _xsrf is not HttpOnly, because JupyterLab reads it to set the header.
  • Cookie-authenticated API requests from another origin get 404, as jupyter_server's check_origin does when the token was not sent.
  • The page config still carries the token, so JupyterLab's REST calls are token-authenticated and need no XSRF header; only websockets and <img> loads (kernelspec logos, which were 403 before) rely on the cookie.

Choices where Ganymede differs:

  • The cookie secret is persisted, as jupyter_server does, in jupyter_cookie_secret in the runtime dir (owner-only), with the same derivation (HMAC-SHA256 of the file with an empty message, the no-password case). cookie_secret_file in the config moves it. Logins survive a restart; changing the token does not log browsers out, also as in jupyter_server. If the file can't be written, the key is per process.
  • The login cookie adds SameSite=Lax, which jupyter_server does not send. The e2e transcript ignores that attribute.
  • A page URL with a correct ?token= sets the cookie and redirects to the same URL without the token. jupyter_server renders the page with the token still in the address bar. API paths and websocket upgrades keep the parameter.
  • next is never followed to another origin, even one in allow_origins.
  • With auth disabled there is no XSRF check. jupyter_server still checks unless disable_check_xsrf is set.
  • /api/me still reports one anonymous identity; the cookie's user is not read back.

Findings:

  • Python's cookie formatting quotes values containing = (base64 padding), so jupyter_server's Set-Cookie sometimes has a quoted value and sometimes not. Browsers send the quotes back; the parser strips them.
  • tornado's _websocket_mask needs a 4-byte mask, so a shorter mask in a version 2 _xsrf is "invalid format", not a mismatch. The transcript caught this.
  • form_urlencoded::Serializer::new with a target that already ends in ? adds a &; build the query separately.

2026-10-17, notebook trust ​

Notebooks are signed and marked trusted as jupyter_server does, so JupyterLab runs the HTML and JavaScript outputs of a notebook it reopens (issue #18). ganymede-contents has trust::Notary, FsContents signs on save and marks cells on read, the server serves POST /api/contents/{path}/trust, and ganymede trust replaces jupyter trust.

  • Ganymede shares Jupyter's store instead of keeping its own: notebook_secret and nbsignatures.db in the Jupyter data dir (--notary-dir / notary_dir moves them). A user moving from Jupyter keeps their trusted notebooks, and jupyter trust and ganymede trust agree; parity.rs checks both directions.
  • There is no mature pure-Rust SQLite (turso_core is a pre-release), so the database goes through rusqlite with SQLite compiled from C. It sits behind the contents crate's sqlite feature, which only the server enables: ganymede-contents alone still checks for iOS and Android with no C cross compiler, and the engine, which does not depend on it, still builds for wasm. Without the feature signatures are kept in memory, as nbformat does when sqlite3 is missing.
  • The signature is an HMAC-SHA256 over nbformat's yield_everything: for each object, keys in sorted order each followed by its value; strings as UTF-8; everything else as Python's str() (True, None, 1e-05, so the writer's float repr is reused); metadata.signature skipped. List items are concatenated with no separator, so a source split into lines hashes the same as the joined string. The key is the secret file's bytes, trailing newlines included. Fixtures from tests/fixtures/generate_trust.py pin it.
  • What is hashed is the notebook as served, without trusted. On save Ganymede hashes the notebook as it will be read back rather than the client's JSON, which is what makes the save-then-reopen round trip verify. jupyter_server hashes the client's dict, so a trusted flag on a markdown cell, which nbformat drops on read, would make its own signature miss.
  • The save rule is check_cells: a code cell is trusted when its metadata.trusted is truthy (popped either way) or no execute_result or display_data output has a key besides output_type, execution_count and metadata. An empty data: {} counts as unsafe. JupyterLab sets trusted on cells it ran, which is how "every output was produced in this session" reaches the server.
  • Signatures are content-addressed, so a byte-identical copy of a trusted notebook is trusted too. The JupyterLab check in validation/trust.mjs changes the copy's metadata before saving it untrusted, or the control would pass for the wrong reason.
  • nbformat does not create the data dir before writing the key, so jupyter server --NotebookNotary.data_dir=<missing dir> answers 500 on every notebook read. Ganymede creates it; the parity test creates it for the reference.
  • jupyter trust --reset writes 1024 raw random bytes as the new key; the key Ganymede generates (then and on first use) is the base64 text nbformat writes on first use. Any bytes work as an HMAC key.
  • Checked with JupyterLab 4 in headless Chromium against ganymede serve: after save and reopen in a fresh page, the HTML output's <script> and the application/javascript output both run; in an edited copy saved without trusted flags neither does.

2026-10-17, releases through a PR ​

  • The first release.sh --execute could not push the release commit and tag to main: Claude sessions may push only their own branch (HTTP 403 from the proxy), and direct pushes also skip the PR-links-issue rule.
  • Now cargo-release only bumps and commits (tag = false, push = false in release.toml). The script moves that commit to release/vX.Y.Z, resets local main, pushes, and with gh opens an issue and a PR that closes it. A release can be cut by merging a PR from the GitHub app.
  • tag-release.yml runs on pushes to main that touch Cargo.toml. It tags only when the workspace version has a CHANGELOG.md section and no tag, so dependency changes and the untagged 0.0.1 are ignored.
  • A tag pushed with GITHUB_TOKEN triggers no workflows, but workflow_dispatch is exempt, so tag-release runs gh workflow run release.yml --ref vX.Y.Z (needs actions: write). Dispatched on a tag ref, github.ref_type is tag, so release.yml's version check and publish job behave as on a pushed tag.

2026-10-17, kernels that never answer under parallel starts (#25) ​

e2e (ubuntu-latest) failed with "timed out waiting for kernel_info_reply" on a PR that changed no Rust. Locally, 40 parallel ganymede run -k cdp-node failed about 1 in 10, as "timed out", "kernel died", or "zmq: Provided sockets combination is not compatible"; the kernels e2e binary failed 2 of 12 runs four at a time.

  • Ports are free when picked and taken by whoever binds first. Until the kernel binds, a host's connection can land on another socket on that port: another host's free-port probe, or another kernel's PUB.
  • The zeromq crate reconnects SUB sockets but not DEALERs. A DEALER whose first peer went away stayed unconnected, and every send failed with "Not connected to peers" until the timeout. DEALERs now reconnect on a failed send, and a failed handshake is retried, not fatal.
  • zeromq's connect retries a refused port with backoff up to 5 s, and cutting a handshake short with its connect_timeout can leave the kernel's ROUTER holding our routing id, so later connections with it are ignored (attach tests timed out that way). A plain TCP probe, retried every 20-250 ms, now waits for the port before zeromq connects.
  • ZmqTransport::connect returns at once; each socket connects in its task, so the startup timeout bounds the whole start. Shell sends nothing until stdin and iopub are connected (an input_request needs the stdin socket, a first request's outputs need iopub). The nudge keeps sending kernel_info_request on shell until iopub has delivered something, since the SUB socket can connect after shell and control answered.
  • Two kernels can still be given the same port; the loser exits or never answers. Relaunch::start (engine start and restart) launches again on fresh ports, up to 3 times, after KernelDied or a startup timeout.
  • Ports are picked at random from 20000-32767, below the ephemeral ranges, so a reconnecting socket cannot be given the kernel's port as its own source port.
  • Connecting lazily exposed a bug in the API's restart: the new kernel reuses the id and so the connection file path, and dropping the old launch afterwards deleted the new kernel's file. ipykernel that had not read it yet wrote its own with other ports. The old launch is now dropped before the new kernel starts.
  • Result: 0 failures and 0 relaunches in 320 parallel CLI starts, and the whole ganymede-cli e2e suite passes 12 of 12 runs four at a time. The API's own launch path gets the reconnects but not the relaunch yet.

The server parity test later failed once on CI with jupyter_server answering a DELETE with 400. Its contents manager sends files to the trash by default, and send2trash creates ~/.local/share/Trash by checking that it exists and then calling makedirs. On a fresh runner the cdp-kernel and ipykernel parity tests delete at the same moment, both see no trash directory, and one makedirs fails. Paired deletes into a fresh home failed 1 time in 30 locally. The reference server now runs with --FileContentsManager.delete_to_trash=False, which also matches ganymede, which deletes for good.

2026-10-17, prebuilt JupyterLab extensions from wheels ​

ganymede lab extension install|list|remove (#16) unpacks *.data/data/share/jupyter/labextensions/** from a package's PyPI wheel into ganymede/labextensions/ under the data dir, which serve searches after --labextensions-path and before the Jupyter data dirs. ganymede lab install installs jupyterlab_widgets and anywidget too, unless --no-default-extensions. cdp-kernel's counter widget from its docs/widgets.md renders in JupyterLab served this way, counts clicks, and the kernel reads the count back (validation/widgets.mjs).

  • anywidget does not require jupyterlab_widgets directly: it requires ipywidgets, which has no extension and requires jupyterlab_widgets. So "follow only dependencies whose wheel carries an extension" stops too early. The rule used: walk requires_dist from PyPI's JSON (no downloads), without extra markers, descending only through packages classified Framework :: Jupyter; download and unpack those classified Framework :: Jupyter :: JupyterLab :: Extensions. For anywidget that is about 20 JSON requests (ipython's dependencies are checked and dropped) and two wheels, under a second here. A named package is always downloaded and must carry an extension.
  • Dependencies get their latest release; specifiers like ~=3.0.17 are not checked. Other markers (sys_platform, ...) are ignored, which can only add a frontend package.
  • Only pure (py3-none-any, py2.py3-none-any) wheels are picked, which also applies to jupyterlab now.
  • Each package's record is labextensions/.packages/<name>.json (name, version, extension directories, and the package that pulled it in). find_extensions skips it because it has no package.json, as it skips the .<name>-* staging directories. Remove deletes only the named package's extensions; dependencies stay.
  • An extension is a top-level directory, or two levels for @scope/name. Reinstalling drops extensions the new version no longer ships; one that another package had installed is taken over and dropped from that package's record.
  • jupyterlab_widgets ships a settings schema under its extension's schemas/; /lab/api/settings already lists it (@jupyter-widgets/jupyterlab-manager:plugin).
  • lab::data_dir() is now the shared root for lab/ and labextensions/.

2026-10-17, ganymede lab ​

One command to start JupyterLab (#17): ganymede lab [--no-browser] [serve flags] in the notebook directory.

  • Command shape: lab already had install/list/remove, so the start flags are flattened onto lab itself with an optional subcommand and clap's args_conflicts_with_subcommands. Bare ganymede lab matches jupyter lab; ganymede lab list --port 1 is a usage error, not a silently ignored flag. A lab start subcommand would have been the same code with worse parity. The start code is in its own module (lab_start.rs) so lab.rs keeps only the bundle management.
  • The server side is serve::run_with(cfg, Startup); run is run_with with the default. Startup carries port_retries, require_lab, and an on_listening(url) callback, so the browser is opened by the CLI after the port is bound and nothing in the server knows about browsers.
  • Port fallback follows jupyter_server's port_retries (default 50) but sequentially, without its random ports after the first few, and also when --port was given. Only AddrInUse moves on; any other bind error fails at once. --port 0 never retries. serve keeps failing on a taken port.
  • The printed URL is /lab?token=…, as jupyter lab prints. The page's strip_token middleware turns that into the login cookie and a redirect to /lab, so the browser opened on it is logged in.
  • The browser is opened with open (macOS), xdg-open (elsewhere on Unix), or explorer (Windows), spawned with null stdio and reaped on a thread. A missing opener or a failing exit is a warning; the URL is on stdout. $BROWSER is not consulted, unlike Python's webbrowser.
  • No JupyterLab installed (or a --static-dir that isn't a Lab bundle) fails before binding, naming ganymede lab install. The "serving the API only" log moved from installed_lab to the caller so lab doesn't print it right before failing.
  • The test (tests/lab_start.rs) needs no network: Lab::detect only needs static/index.html containing jupyter-config-data and a package.json with a jupyterlab key, under $GANYMEDE_DATA_DIR/lab/<version>/. It holds a port open to check the fallback.

2026-10-17, workstation install with no Python ​

CI's workstation job (#20) follows Install on ubuntu-latest and macos-latest with Python hidden, through scripts/test-workstation.sh <binary>: the PR's release build, packaged as release.yml packages it and served over file:// with GANYMEDE_DOWNLOAD_BASE, installed with curl ... | sh -s -- --version; then npm install -g @tlockney/cdp-kernel, cdp-kernel install --runtime node, ganymede kernelspec list (must show cdp-node), ganymede run -k cdp-node, ganymede lab install, and ganymede lab --no-browser in a notebook directory. Playwright then runs validation/login.mjs (the printed URL lands on /lab with the login cookie, and the cookie alone lists cdp-node), trust.mjs with a TypeScript cell (jupyter.html with a <script>, plus a raw application/javascript bundle), and widgets.mjs with RELOAD=1.

  • Hiding Python: PATH is a shim dir, ~/.local/bin, npm's global bin, and a clean dir of symlinks to node, npm, npx, curl, tar, gzip, sha256sum/shasum, and coreutils. Shims named python, python3, pip, pip3, and jupyter log the call and exit 1. They miss absolute paths, so a sampler also logs, every 0.5 s, any process named python* that descends from the script. Sampling all processes would fail on runners, which run Python daemons of their own. Both were checked to fire by calling python3 and /usr/bin/python3 on purpose.
  • The script sets HOME to a new directory, as on a fresh machine, and unsets the XDG_*, JUPYTER_*, and GANYMEDE_DATA_DIR variables, so the kernelspec, JupyterLab, and extensions land under it and a local run touches nothing else. Playwright's browsers are found through PLAYWRIGHT_BROWSERS_PATH, defaulted from the real HOME. NPM_CONFIG_PREFIX points npm's global installs into that HOME; without it they go next to setup-node's node, which is not on the clean PATH.
  • install.sh installs cdp-kernel itself when Node 24 is present; the explicit npm and cdp-kernel install steps from "A kernel" then run again, which also checks that both are idempotent.
  • npm 11 (Node 24.22) skips install scripts not listed in allowScripts and warns about esbuild's postinstall. cdp-kernel runs without it.
  • Widgets after a reload need no saved widget state: JupyterLab's widget manager asks the running kernel (comm_info_request for jupyter.widget, then each model's state), and cdp-kernel answers, so the reopened page shows count is 3. The saved notebook holds only the application/vnd.jupyter.widget-view+json output.
  • The Playwright tooling (npm ci, playwright install --with-deps) is set up before Python is hidden; it is the test harness, not the workstation.
  • On macOS the script relies on /usr/bin/shasum (a Perl script with an absolute shebang) and BSD ps.
  • JupyterLab saves on Cmd+S on macOS, where Playwright's Chromium reports a Mac platform, so Control+s silently does nothing there. The scripts press ControlOrMeta+s.

2026-10-17, the workstation install page ​

Install on a workstation (#21) is the numbered path from a clean Linux or macOS machine to JupyterLab running TypeScript, for a reader who has never installed Jupyter. Its commands are the ones scripts/test-workstation.sh runs, and the page's source comment lists where the two differ and why.

  • To cover the page, the script gained three steps: ganymede execute first.ipynb --inplace on the page's first-notebook cell (an npm: import of date-fns and jupyter.display of jupyter.md; the output is checked in the saved file), ganymede serve with validation/vscode.cjs replaying the VS Code Jupyter extension's requests, and the uninstall (ganymede lab remove, lab extension remove, kernelspec remove, npm uninstall -g, rm ~/.local/bin/ganymede). It also runs ganymede kernelspec paths and ganymede info, which the troubleshooting section uses. The full script passed locally on Linux x86_64 with Node 24.22 and a debug build.
  • cdp-kernel list and cdp-kernel uninstall (cdp-kernel #251) are on cdp-kernel's main but not in 0.5.0 on npm, so the page gives ganymede kernelspec remove cdp-node and mentions them as the alternative for later releases. Add them to the script once released.
  • The VS Code Jupyter extension doesn't need the Python extension for an existing server: its package.json (2026.6.1) has no extensionDependencies, and its extensionPack is Keymap, Renderers, Cell Tags, and Slide Show. Not checked by running VS Code.
  • ganymede serve doesn't fall back to another port as lab does; it exits with binding 127.0.0.1:8888: Address already in use.
  • ganymede lab install honours HTTPS_PROXY through ureq; cdp-kernel's npm: imports run npm install, so npm's proxy settings apply.

2026-10-17, docs unstyled on the custom domain ​

Pages got the custom domain ganymede-server.com, and tlockney.github.io/ganymede/ now redirects there. The docs were still built with SITE_URL=https://tlockney.github.io/ganymede, so VitePress wrote every asset and link under /ganymede/docs/, which 404s on the custom domain: the docs rendered without styles. The landing page uses relative paths and kept working. SITE_URL (pages.yml, and the default in config.mts) is now the custom domain, and the install-script URLs point at it directly instead of through the redirect.

  • A project page (<user>.github.io/<repo>/) and a custom domain serve the same files at different path prefixes. Anything with an absolute base path has to be rebuilt when the domain changes; relative paths survive it.
  • With an Actions deployment the custom domain lives only in the Pages settings, not in a CNAME file in the repository, so nothing in the build sees a change there.
  • The deploy job now fetches the landing page, install.sh, a docs page, and the stylesheet that page links from SITE_URL after each deploy, so a base path that doesn't match the domain fails the deploy instead of shipping unstyled docs. Run against the old deploy, the stylesheet check 404s, as it should.
  • No site/CNAME: GitHub ignores a CNAME file in an Actions-deployed artifact, so it would not keep the domain set; the Pages settings are the only place it lives.

2026-10-17, auth off no longer means open to every web page (#41) ​

With --token "" the API middleware skipped every check, so any page in the user's browser could create files, trust notebooks, and start kernels with a cross-site text/plain POST (no preflight), and a DNS-rebinding page could read files. jupyter_server keeps two protections with auth off, and Ganymede now matches them:

  • XSRF applies to every state-changing request that did not send the token, whether or not auth is on (check_xsrf_cookie only skips token-authenticated requests). With auth off, a client that is not a browser must send _xsrf as a cookie and an X-XSRFToken header, or run with a token. Reads and websocket upgrades are unaffected; the websocket handlers already check Origin.
  • Host must be a loopback address or a name in local_hostnames (default localhost) unless allow_remote_access is on. It defaults to on only when ip is not loopback, as _default_allow_remote does; a host name for ip counts as loopback when every address it resolves to is. The check runs on every route, pages included, and a request with no Host passes, as tornado treats it as local.
  • A rebinding page is same-origin with itself (its Origin and Host agree), so the Origin check cannot catch it; only Host shows the request was meant for another name.
  • A reverse proxy in front of a loopback-bound server needs --allow-remote-access or its public name in local_hostnames, unless it rewrites Host.

2026-10-18, request body limit (#42) ​

axum caps every body extractor at 2 MB (DefaultBodyLimit) unless a layer says otherwise, and a notebook is saved in one PUT, so a notebook with one large image output could not be saved. The rejection's status was also thrown away: LenientJson mapped every body error to 400.

  • The limit is now max_body_size in the config file, 512 MiB by default as in jupyter_server (ServerApp.max_body_size), applied to every route in build_router.
  • Body rejections keep their own status, so an oversized body gets 413 instead of 400.
  • DefaultBodyLimit only affects extractors that read the body (Bytes, Json, Form, LenientJson); it does not limit websocket frames, which have their own caps in WebSocketUpgrade.

2026-10-18, websocket decoders and hostile frames (#48) ​

legacy::decode_binary indexed offsets[0] without checking the count, so a 4-byte binary frame of zeros on a legacy (no subprotocol) kernel websocket panicked the connection task. It now returns Malformed, and the server logs the frame and keeps the socket open, as it does for any undecodable frame.

  • Both decoders now have negative tests: empty and short frames, a zero or too-small count, a count past the frame, truncation, overlapping offsets, and an offset past the end. A decoder may fail with Json rather than Malformed when bad offsets still leave a parsable range (overlapping legacy offsets make the JSON part run into the buffers); the tests only require an error, never a panic.
  • An attacker-sized count (u64::MAX) does not allocate: the offset table is collected through Result, whose size hint starts at 0, and the first read past the frame stops it.

2026-10-18, numbers round-trip on save (#72) ​

The workspace serde_json had only preserve_order. Its default float parser is not correctly rounded, so reading a notebook and writing it back changed some doubles (5,389 of 20,000 random finite doubles in the new test), saves drifted further each pass, and integers beyond u64 became floats. Trust signatures hash the re-serialized numbers, so a notebook Jupyter signed could read back as untrusted. Both float_roundtrip and arbitrary_precision are on now.

  • arbitrary_precision keeps each number's source text in Value, so the writer's write_f64 hook no longer sees numbers from a parsed file; PythonFormatter::write_number_str does the work instead: floats go through python_float_repr, integers are written as read (-0 as 0, as Python's int does).
  • Number::is_f64 is true only for text with ., e or E, so the signing code's int/float split matches Python's for big integers.
  • float_roundtrip still matters with arbitrary_precision: it governs deserializing straight into typed f64 fields.
  • #[serde(flatten)] structs with typed integer fields still deserialize from text with arbitrary_precision on (checked on ExecuteResult); older serde releases failed there.
  • A JSON number Python reads as inf (1e400) keeps its text; Python would write the non-JSON Infinity.
  • The Python e2e notebook's JSON display now carries 17-digit floats, which fails the nbclient parity test without the fix.

2026-10-18, atomic notebook writes from the CLI (#74) ​

ganymede execute --inplace and -o wrote the notebook with std::fs::write, which truncates the file first. A crash, a full disk or Ctrl-C mid-write left a truncated or empty notebook, and an editor reading the file at the wrong moment saw half of it. The server's contents layer already wrote through a temp file and a rename; the CLI did not share it.

  • The temp-file, fsync, rename helper moved from ganymede-contents into ganymede-nbformat as atomic_write. Notebook::write_file (and so the CLI's write_notebook) and the contents layer both use it.
  • A symlink is followed to its target, which is replaced; the link stays. The old rename put a regular file in place of the link.
  • The temp name .~<name>-XXXXXX.tmp is cut to fit in 255 bytes, so a file with a long but legal name can still be saved.

Leftover temp files from a killed process are not cleaned up; tempfile removes its file on any error short of that.

2026-10-18, file I/O off the async workers; nbconfig PATCH serialized (#70) ​

Several HTTP handlers did blocking std::fs work on tokio's async workers: /api/config/{section}, /api/kernelspecs (which reads every kernelspec directory and its resource files on every call), and the JupyterLab settings, workspaces and licenses endpoints. A slow disk stalled every connection served by that worker.

  • A routes::blocking helper runs a closure on spawn_blocking; those handlers' bodies now run inside it.
  • PATCH /api/config/{section} was an unlocked read-merge-write with a plain fs::write: two PATCHes at once lost one update, and a crash mid-write left a truncated file. PATCHes now hold a mutex, and the file is replaced with the same temp-file-and-rename write_atomic the lab settings use. A test sends 16 concurrent PATCHes and fails without the lock.

Left as is: FsKernelspecs::list still reads the disk on each call (now off the async workers), as jupyter_client does.

2026-10-18, cdp-kernel 0.6.0 pin (#132) ​

  • CI's CDP_KERNEL_VERSION moves from 0.5.0 to 0.6.0; README and workstation.md follow.
  • 0.6.0 ships cdp-kernel list and cdp-kernel uninstall (cdp-kernel#249), so the workstation page's uninstall step uses cdp-kernel uninstall cdp-node in place of ganymede kernelspec remove, and scripts/test-workstation.sh runs both commands. It removes only kernelspecs cdp-kernel wrote, from the same kernels directory Ganymede reads, so the check that ganymede kernelspec list no longer shows cdp-node still holds.

2026-10-18, more cdp-kernel scenarios, a nudge that backs off (#69) ​

The startup nudge re-sent kernel_info_request every 500 ms until shell and control both answered. cdp-kernel answers on shell only once its runtime is up, on one serial loop, so a slow Node start queued a request per round for up to a minute and then answered each with a busy/idle pair. Each unanswered request now waits twice as long as the last (0.5 s up to 4 s), and shell and control are asked at the same time rather than one after the other. A fake kernel whose shell is silent for 30 s (paused clock) received 51 requests before and about ten now.

kernels.rs gained the cdp-kernel e2e.py scenarios that a Rust host can drive, on cdp-node and python3 alike: queued cells aborted after an error (and not with stop_on_error: false), input without stdin, an interrupt while blocked in a prompt, the runtime exiting mid-cell (cdp relaunches it; for ipykernel the kernel dies and the session says so), interrupt_request and shutdown_request on shell, a silent execute publishing nothing, comms to an unknown target closed, a throwing handler, a frontend comm_close, binary buffers echoed through a comm, history tail and search, display then update in order with prints around them, and four kernels started at once.

The shell shutdown_request scenario failed on macOS with KernelDied: the kernel replies and exits, and the session saw the exit and failed every waiting request before the reply had come through the sockets. Now, when the process exits, requests still waiting get up to 500 ms for their replies before the session is marked dead. A jupyter_client client reads the reply off the socket whether the process has gone or not. A unit test has the process exit 50 ms before its reply.

Learned: ipykernel answers interrupt_request on shell by sending SIGINT to its own process group, which interrupts that handler, so no reply comes; that check runs on cdp-kernel only.

Not done: debugger requests, malformed stdin frames, kernel death and parallel starts through serve, and a CI run against cdp-kernel main.

2026-10-18, chunked uploads append (#52) ​

JupyterLab uploads files over 15 MB in 1 MB pieces, each a PUT with chunk: 1, 2, ... and -1 for the last. The contents layer ignored chunk and saved every PUT as the whole file, so an upload kept only its last megabyte, silently.

SaveRequest now carries chunk, and FsContents::save follows jupyter_server's LargeFileManager.save: chunk 1 writes the file (atomic replace, as a normal save), any other chunk appends its decoded text or base64 content. Only type: file can be chunked (400 otherwise), and chunks skip the last_modified conflict check, as jupyter_server does.

The HTTP status follows from the existing 201-if-new rule: chunk 1 of a new file is 201, later chunks 200, which is what jupyter_server answers.

2026-10-18, CI hygiene (#62) ​

CI ran every action by a movable tag, with no permissions: in ci.yml, no dependency audit, no MSRV, no timeouts, and the e2e pins only in the e2e job: the workstation and install-script jobs took whatever cdp-kernel npm had that day. Now:

  • Actions are pinned by commit SHA with the version in a comment, and Dependabot bumps them, the Cargo lockfiles, and the npm packages weekly. Checkouts don't keep the token (persist-credentials: false).
  • ci.yml is contents: read, PR runs cancel their older runs, and every job has a timeout.
  • rust-version = "1.95" and an msrv job. 1.95 is not a guess: rustyline 19 uses cfg_select!, stable since 1.95, without declaring a rust-version, so the highest one in cargo metadata (1.89) is wrong. Only building with the old toolchain finds that.
  • cargo deny for advisories, bans, and sources. Thirteen crates have two versions (base64, digest, getrandom, syn, thiserror...); they are warnings, not failures.
  • One env: block holds the e2e pins; test-workstation.sh and test-install.sh read CDP_KERNEL_VERSION (the latter with an npm shim, since site/install.sh installs the latest, as a user gets it). A weekly run uses the latest releases instead.
  • The e2e job runs cargo test --workspace (unit tests on macOS too) and fails if any test printed skipping:; the rust job lists its skips in the run summary. cargo doc with -D warnings found one broken intra-doc link.

See development for the rules.

2026-10-18, CLI behaviour: exit codes, stdin, --json gaps (#71) ​

The second half of the review's CLI list: places where the commands did something a script could not see or rely on.

  • ganymede run -k fake </dev/null ran an empty cell and exited 0. Empty or blank stdin is now a usage error, exit 2, like clap's own.
  • run --json printed nothing for a cell that timed out or whose kernel died, only an error on stderr, so "stopped here" looked like "ended". It now prints a line with "status": "incomplete" and the error.
  • execute stopped the whole run on an unreadable notebook or a kernel that would not start, but carried on past a failing one. Each kind is now reported and skipped, and the exit status is 1 if any failed.
  • Exit statuses are documented in --help and getting-started.md: 0, 1 for any failure (as jupyter execute), 2 for usage, 128+N for signals.
  • kernelspec remove asks first when stdin is a terminal, as jupyter kernelspec remove does; -f/-y skips the question. Scripts, with no terminal, are not asked.
  • jupyter execute's flag names (--kernel_name, --startup_timeout, --skip-cells-with-tag, --allow-error-names) are accepted as aliases.
  • Console: password prompts turn off echo (with stty, on a terminal), and history is saved after every cell, not only on :quit or Ctrl-D.

Not done: kernel list, server list and lab stop, which need a design; quieting the global flags on commands they don't affect; and moving the console history out of the Jupyter data dir.

2026-10-18, CLI gaps: completions, lab clean, extension toggles (#71) ​

The first half of the review's CLI list: commands a Python-free user had no way to run, and flags with no help text.

  • ganymede completions <shell> prints a completion script (via clap_complete) for bash, zsh, fish, PowerShell and elvish.
  • attach is listed and documented. It was hidden, though it is run --existing with a 60-second default timeout. run --interrupt-after-ms is listed too.
  • lab clean removes the .download-* and staging directories that interrupted installs leave. lab uninstall removes every JupyterLab version and extension lab install added.
  • lab extension disable/enable write disabledExtensions in labconfig/page_config.json under the Jupyter config dir, in JupyterLab 4's {"name": true} shape, as jupyter labextension disable does. The server now reads that file on each page load (both the map and the older list shape); it used to always send [].
  • lab list --json and lab extension list --json.
  • Help text for the positionals of kernelspec install/remove, lab remove, lab extension remove, execute, nb clear and trust; for kernel -k; and for serve's --ip, --root-dir, --kernelspec-root, --default-kernel and --cull-idle-secs.

2026-10-18, default config file, log flags, kernel output prefix (#55) ​

What the first #55 fix left for later:

  • Without --config, serve, lab and ganymede-server read ganymede.toml from the Jupyter config dir ($JUPYTER_CONFIG_DIR, else ~/.jupyter, as jupyter_config_dir()) when it exists, so a daemon needs no flags. The file read is logged at info. --config still wins.
  • --log-level takes tracing's names and Jupyter's WARNING and CRITICAL, and overrides -v and RUST_LOG. --log-file appends the log there, without colors, instead of stderr; stdout keeps only the URL. Both are ServeArgs flags, so lab has them too; the CLI installs the subscriber from them before dispatch.
  • The kernel host has a LaunchOptions.prefix_output: the kernel's stdout and stderr are piped and copied to the host's stderr a line at a time behind [kernel <first 8 of id>] . The kernel manager sets it; the CLI's single-kernel commands don't. "launched kernel" now logs the full kernel_id, so the short prefix can be traced back.

Learned: jupyter_server itself has no prefix (kernels inherit its stderr); the prefix is ours, for a server whose kernels share one log.

2026-10-18, connection files private from the start (#49) ​

write_connection_file wrote the file with the default mode (0644 under the usual umask) and only then chmodded it to 0600. In between, any local user could read the HMAC key and sign messages to the kernel. It now follows jupyter_core.paths.secure_write:

  • Remove any existing file, then create it with create_new and mode 0600, so the key is never readable by others and a symlink planted in a shared runtime dir is replaced instead of written through. Removing first keeps restarts working: a restart writes the same kernel-<id>.json again.
  • A runtime dir the host creates is made 0700. An existing dir keeps its mode; the user may have chosen it.
  • kernel_id goes into a file name, so it must be letters, digits, - and _ (128 at most). LaunchOptions.kernel_id is public, and callers other than the API's UUIDs could pass ../x.

2026-10-18, contents races, first checkpoint, trust key (#75) ​

The review found the last_modified conflict check misdocumented and unlocked, and a few smaller jupyter_server parity and race gaps in ganymede-contents.

  • docs/ipados.md said the mtime check on PUT is what jupyter_server does. It is not: jupyter_server has no such check, and JupyterLab compares timestamps itself before saving. The check stays as an opt-in extension: only a PUT that sends last_modified gets it, and a client echoing the value the server reported never gets a 409, since that value is the mtime cut to microseconds and the window is 500 ms. A stale echoed model does get 409 when the file changed since; that is the protection the iPad/iCloud case wants, so we kept it.
  • The conflict check and the write of one save now run under a per-path lock, so two saves of one path cannot both pass the check and then interleave.
  • The first save of a notebook creates its checkpoint (jupyter_server's "One checkpoint should always exist for notebooks"). Before, there was nothing to revert to until a client POSTed one.
  • GET ?hash=1 read the file twice; it reads once and hashes the bytes it serves.
  • new_untitled and copy picked a free name, then wrote over whatever was there. They now claim the name with create_new (create_dir for folders) and move on to the next name if someone else took it.
  • Trust: the key file was created, then written; a crash in between left an empty key that was accepted forever. The key is now written to a 0600 temp file and linked into place (no-clobber for a new key, rename for --reset), and an empty key file is replaced with a new key.

Left out: rename still checks that the target is free and then renames. Closing that needs a no-replace rename (renameat2 on Linux, renamex_np on macOS), which std does not offer for directories.

2026-10-18, Ctrl-C stops the server with requests open (#125) ​

Ctrl-C did not stop ganymede lab (v0.2.0). axum's with_graceful_shutdown waits for every open connection to finish its request, with no limit. Idle keep-alive connections close at once and upgraded websockets are no longer tracked, so a JupyterLab tab alone did not hang it in headless Chromium; one connection with a request still in progress did, indefinitely. Reproduced by sending headers without the closing blank line, then SIGINT: the server logged "shutting down kernels" and stayed up. A second Ctrl-C did nothing, because the signal future had already fired and nothing else listened.

serve_until now bounds the drain: after the first Ctrl-C or SIGTERM, open requests get 3 seconds, then the server stops serving and shuts kernels down; a second signal skips the wait. The signal handlers are installed once, before the port is bound, and feed a channel, which is also what the tests drive instead of real signals. Which request a real browser left open in Thomas's case was not established; the bound covers any of them.

2026-10-18, one file per log entry (#83) ​

Every PR appended to the end of docs/notes.md, so any two open PRs conflicted there and each merge made the others resolve it. Entries are now files in docs/notes/, named YYYY-MM-DD-<topic>.md; the log before the split is docs/notes/archive.md, unchanged apart from its links.

  • The site still has one log page. docs/.vitepress/notes.ts appends the entries to notes.md in a Vite plugin that runs before VitePress's Markdown plugin, so the outline and the dead-link check see the full page. srcExclude keeps the entries from becoming pages too.
  • Local search does not go through Vite: it reads each page from disk. Its _render option gets the same treatment, or the entries would be missing from search.
  • Entries link relative to docs/notes/ so they work on GitHub; the plugin rebases those links to docs/ for the page.
  • A file in docs/notes/ with another name fails the build, rather than silently dropping off the page.
  • Entries on the same day sort by topic, not by merge order.

2026-10-18, docs checked against what shipped (#66) ​

The review found docs promising what the code didn't do, and since then several of those promises have shipped. A pass over each claim:

  • Roadmap: cdp-kernel conformance, kernel lifetime (reconnect replay, death reporting, relaunch, shutdown steps), ganymede lab and its installs, install.sh, and the workstation job moved to Done. Open gained auto-restart, the remaining conformance gaps, nbformat 3, and musl.
  • Protocol stays a requirements list, but each item Ganymede doesn't meet now says so: no sys.prefix kernelspec root (on purpose), heartbeat only for attached kernels, no autorestart, no Windows job object, no terminals, assets from disk, no v3.
  • The language rule said a grep for python in the host crates "finds nothing". It finds nbformat's float layout, the trust signature, PyPI host names, and comments. The rule is about behaviour, and is reworded to say that: no code depends on a kernel's language.
  • metadata.execution.timeout on a cell was documented "as in nbclient" (nbclient has no such key) and never worked: timings reset metadata.execution before the timeout was read. It is read first now, with a test, and documented as Ganymede's own.
  • Crate READMEs: the api crate's broadcast hub is gone, nbformat's big-int and cell-id gaps are fixed, contents has a validation message, and the server checks Host. The README's crate table lost its hand-kept test counts. validation/ uses ganymede serve. The frontend README says the frontend isn't used yet, and that CI runs it on Node 24.

Already fixed before this pass: the iPad page's mtime-check wording, the byte-identical claim (#79, #73), and the log's structure (#83).

2026-10-18, the site deploys from releases, not main (#117) ​

ganymede lab printed its usage on v0.1.0: that tag predates #33, which added the bare command, but the docs site deployed from main on every merge, so the workstation page described it before any release had it. The CI workstation job builds the PR's own binary, so it could not see the gap.

  • pages.yml no longer deploys on push. release.yml dispatches it with the new tag after gh release create, and the build checks out that tag, so the docs and install.sh match what install.sh installs. A manual run with no ref deploys the latest release; with a ref it publishes a docs fix between releases.
  • The dispatch runs on main (--ref main, the workflow file's ref) and passes the tag as an input. Running the workflow on the tag itself would make the github-pages environment, which by default only allows the default branch, refuse the deploy.
  • A workflow started with GITHUB_TOKEN triggers nothing, except workflow_dispatch, which is why tag-release.yml and release.yml chain through gh workflow run.

The "Ganymede" title in the docs' top bar linked to the docs index. It now goes to the landing page at the site's root, through VitePress's themeConfig.logoLink. The link needs a target (_self): VitePress's router intercepts same-origin links without one and would try to load the root as a docs page. The nav's Home item uses the same trick.

2026-10-18, --existing finds kernels in the runtime dir (#56) ​

ganymede kernel writes kernel-<id>.json into jupyter_runtime_dir(), but run --existing kernel-<id>.json read the name relative to the current directory, so the README's own example failed anywhere else. The error also printed the OS error twice.

  • process::find_connection_file resolves the argument as jupyter_client.find_connection_file does, without its globbing: a path that exists is used as given; a bare name is tried as <runtime_dir>/<name> and <runtime_dir>/kernel-<name>.json. Engine::attach uses it.
  • --existing with no value attaches to the newest kernel-*.json, as jupyter console --existing does.
  • main prints the error chain with : but skips a cause whose text the error before it already contains. Our thiserror types print their source inline (io: {0}), so anyhow's {:#} repeated it.

2026-10-18, extension names from wheels are validated (#46) ​

extract took any directory under labextensions/ in a wheel as an extension name, so a wheel shipping labextensions/.packages/... made the install delete the record directory and put its own files there. A forged record could then point a later remove at any path, since record extensions entries were joined to the root unchecked.

  • An extension name is now name or @scope/name, each part of [A-Za-z0-9._~-] and not starting with . or _ (npm's rules, with uppercase allowed for old packages). That excludes ., .., the .packages records and the .<key>-* staging directories. A wheel with any other name fails to install rather than being partly unpacked.
  • The same check runs on every record read: a record naming anything else is ignored as if absent, and remove_extension refuses such a name, so nothing outside labextensions/ is ever removed.
  • Taking over another package's extension now needs --force; before, a dependency pulled in automatically could replace @jupyter-widgets/jupyterlab-manager with only a warning.
  • ZipFile::enclosed_name (zip 9) drops a leading / and . components rather than rejecting them, so /x and ./x land inside the staging directory; only .. that would escape returns None. Symlink entries are written as regular files holding the target text.

2026-10-18, frontend/ moves to ganymede-ui (#134) ​

frontend/ was TypeScript for a UI of Ganymede's own, and nothing in this repository used it. That UI now exists as tlockney/ganymede-ui, which took the package with its history (git subtree split --prefix=frontend) as packages/client. The package went with it, along with its CI job and Dependabot entry. The core keeps no TypeScript; the REST and websocket API is the only contract with any UI.

2026-10-18, If-Match on contents saves (#75) ​

The last open item of #75: the last_modified check lets an external write slip through when it lands within 500 ms of the client's copy, and it compares timestamps, not content. Thomas chose to add an exact, opt-in precondition.

  • A content GET /api/contents/{path} and every file or notebook PUT answer with ETag: "<sha256>", the same hash ?hash=1 reports. The body keeps jupyter_server's null hash unless ?hash=1 was asked, so the JSON is unchanged. ?content=0 gets no ETag, since that would mean reading the file only to hash it.
  • PUT with If-Match is 412 unless the file exists and its sha256 is one of the listed tags. * only needs the file to exist. Weak tags (W/"...") never match, per RFC 9110's strong comparison, so a header of only weak tags fails.
  • The check runs inside the per-path save lock with the write, so two saves naming the same tag cannot both pass. Chunked uploads check it on chunk 1 only; later chunks append to the upload in progress.
  • The hash comes back from Contents::save in the model's hash, so embedders (the Swift shell) get it without a second read; the server moves it to the header.
  • CORS now allows If-Match and exposes ETag, or a browser client on another origin could neither send nor read them.

Tornado already sets an Etag (sha1 of the response body) on jupyter_server's GET responses, and no Jupyter client sends If-Match on saves, so the header is additive: existing clients see no change.

2026-10-18, ganymede info shows Ganymede's own paths (#57) ​

info printed Jupyter's runtime, config and data dirs and nothing of Ganymede's own: not the data dir (GANYMEDE_DATA_DIR), the JupyterLab installs or extensions under it, the notary dir, the console history, or the --kernelspec-root extras. A bug report could not say where things were, and nothing gave the commit or target a build came from.

  • info and info --json add data_dir, lab_dir, lab_versions, labextensions_dir, extensions (name, version, dir), kernelspec_roots (extras first, as searched), notary_dir, console_history, and build (commit, target, profile). Existing keys are unchanged.
  • The build details are in info, not --version: the install scripts and the release workflow parse ganymede --version as one line, ganymede X.Y.Z. A build.rs reads them; outside a git checkout the commit can be passed in GANYMEDE_BUILD_COMMIT.
  • The paths come from the same functions the commands use (ganymede_server::lab::data_dir, console::history_path), so info cannot drift from what is actually read.

2026-10-18, one Install page (#150) ​

Install and Install on a workstation covered the same path: the install script, the fake check, cdp-kernel, and the macOS and glibc notes appeared on both. The workstation page's numbered steps are now docs/install.md, with the old Install page's own parts (script options, by hand, verifying a download, from source) in a closing "Other ways to install" section. Their anchors (#by-hand, #from-source, #verify-a-download) are unchanged, since other pages and cdp-kernel link them.

  • docs/workstation.md stays as a stub: on the site it redirects to /docs/install with the hash, so /docs/workstation#_5-start-jupyterlab lands on the same step (the numbered headings kept their text, so their slugs match). On GitHub it is a one-line link. search: false keeps it out of the search index.
  • VitePress prefixes a slug that starts with a digit with _ (#_9-troubleshooting); GitHub doesn't (#9-troubleshooting). A link that has to work in both places can't target a numbered heading, so known-gaps.md links the page instead.

2026-10-18, install script: libc check and kernel failures (#61) ​

The last two items of #61, left over from the release hardening entry, are in site/install.sh:

  • On Linux, target() checks the C library before downloading. getconf GNU_LIBC_VERSION gives the glibc version, and anything older than 2.35 (what ubuntu-22.04 builds link) is refused with a pointer to cargo install. Without glibc, musl is recognised from ldd --version or /lib/ld-musl-*. Detecting was chosen over shipping a musl build; a static musl target is still open if Alpine users show up.
  • A failing cdp-kernel install no longer fails the script after ganymede is in place. It prints what failed and the command to rerun, and on success prints cdp-kernel version, so an install log records which kernel went with which Ganymede.

scripts/test-install.sh covers both with stub getconf, ldd, node, npm, and cdp-kernel in front of PATH. Stubs go in a directory per case, since a shared one leaks a stub into the next case.

2026-10-18, interrupted prompt flake was ipykernel's abort queue (#137) ​

input_without_stdin_and_interrupt_while_prompting failed on macOS with an empty result for the cell after the interrupt. Under CPU load it reproduced on Linux too (3 of 40 runs). The failing cell's reply was {"status": "aborted"} with no output: the kernel never ran it.

Cause: the interrupted cell ends in an error, and with stop_on_error (the default) ipykernel 7 sets an aborting flag and posts a "stop aborting" marker through its shell channel thread. Any execute_request that reaches the subshell before that marker is answered aborted. A client that sends the next cell as soon as the error reply arrives can win that race on a slow machine. This is kernel behaviour, not a server bug; jupyter_client clients see the same thing.

Fix: the test sends the interrupted cell with stop_on_error: false, so no abort window opens. Queue aborts stay covered by stop_on_error_aborts_queued_cells. 80 of 80 runs passed under the same load.

Lesson: a cell that comes back aborted after an error is ipykernel's stop-on-error window, so a test that follows an error with another cell should either clear stop_on_error or expect the abort.

2026-10-18, kernel working directory stays under the root (#51) ​

KernelManager::start joined the client's path onto the root without validating it, so POST /api/kernels {"path": "../../etc"} or a session for ../../etc/x.ipynb started a kernel outside the contents root, and a path to a directory that did not exist failed the launch with a 500.

It now follows jupyter_server's cwd_for_path:

  • The path goes through the contents API-path validation (kernel_cwd). Anything that does not validate (.., absolute, backslashes) gives the root.
  • From there it walks up to the nearest existing directory, and falls back to the root. A directory that a symlink resolves outside the root also gives the root.
  • POST /api/kernels takes path as a directory, as jupyter_server does; sessions pass their notebook's parent (get_kernel_path). Before, both took the parent, so a kernel started for directory nb ran in the root.

ganymede-api now depends on ganymede-contents for this, so there is one definition of a valid API path.

2026-10-18, fake-kernel modes and real-process tests for the kernel host (#68) ​

The fake kernel spoke only what the first session tests needed. It now also covers kernel output and lifecycle that real kernels produce: exit prints, then vanishes mid-cell. display sends display, update and clear. Comms work: target echo sends each message back with its buffers, any other target is closed as ipykernel closes it, comm_info_request lists the open comms, and comm opens one from the kernel side. After an error under stop_on_error, queued execute_requests are answered aborted. Session tests use each of these.

ganymede-kernel-host gained a tests/ directory:

  • subprocess.rs launches shell scripts as kernels. Each one checks something the host does to a real process:
    • the cwd, kernelspec and launch env, JPY_SESSION_NAME and JPY_PARENT_PID, and a connection file that the kernel reads and that is removed with the kernel
    • SIGINT reaching both the kernel and the child it waits on
    • a shutdown that escalates to SIGTERM, then SIGKILL, and one that stops at SIGTERM
    • an exit noticed on its own
  • zmq_kernel.rs binds ROUTER, PUB and REP sockets with a signing key, then drives the startup nudge and the heartbeat against them. It sends binary buffers through the real framing: one equal to <IDS|MSG>, an empty one, all 256 byte values and 100 KB. They come back unchanged. A wrong key never completes a nudge.

Already covered elsewhere: the ws decoders' malformed-input tests (#48) and the server config tests (#55). Not covered here: binary buffers through the websocket layer, which belongs with the server tests.

Learned: a non-interactive sh starts & jobs with SIGINT ignored, and a trap cannot undo that, so a group-interrupt test needs a foreground child.

2026-10-18, kernel records freed, deaths reported, restart failures (#43, #44, #45) ​

Every kernel the API ever started stayed in memory: the task pumping a session into the kernel's hub held the RunningKernel, which held the session, which held the only sender of the channel the task waited on. A kernel that died on its own was never noticed above the session: the model said idle, no status: dead went out, and websockets stayed open. For an attached kernel (run --existing, Engine::connect) nothing noticed at all, because there is no process to wait on and the heartbeat had no caller.

  • The pump holds a Weak<RunningKernel> and exits when the session dies (KernelSession::watch_alive/dead). A test checks the Weak is dead after shutdown and after a death.
  • A session that dies while it is the kernel's current one, and no start, restart or shutdown is under way, removes the kernel from the map, publishes status: dead on the hub, and closes clients. That is what jupyter_server does when a kernel dies and is not restarted (its restarter would restart it first; auto-restart is still open). Clients drain the hub before they close, so they see the dead status. Sessions whose kernel is gone drop out of /api/sessions, as jupyter_server's "Kernel culled or died unexpectedly".
  • Heartbeat: a session with no owned process pings every 3 s and is dead after 3 misses in a row. Misses count only after the first answer, so a kernel that is still binding its ports, or never answers heartbeats, is not declared dead by it. With ipykernel 7.4 attached through run --existing, killing the kernel mid-cell ends the run with kernel died 7 s later; before, it waited for the cell timeout.
  • mark_dead closes the transport and ZmqTransport aborts its tasks on drop: a SUB socket otherwise keeps reconnecting to a dead kernel and route never ends. No deadline on connect_retrying: a closed transport stops it, and a deadline would race a slow kernel start.
  • execution_state ignores statuses for jupyter_server's untracked_message_types (kernel_info, interrupt, shutdown, comm_info, history, debug, usage). An interrupt or a frontend's kernel_info_request mid-cell no longer shows a busy kernel as idle, which could let culling take it. The startup nudge's statuses are untracked too, so a successful start sets idle itself.
  • Start and restart go through one boot: nudge, and on KernelDied or a timeout launch again on fresh ports, three tries, as the engine's Relaunch::start does (#25). A failed launch or a last failed nudge reports the kernel dead and removes it instead of leaving it "restarting". Twelve parallel POST /api/kernels with ipykernel all returned 201.
  • A per-kernel async lifecycle lock is held across start, restart and shutdown, and each re-checks the map once it has the lock, so a restart racing a DELETE or cull either finishes first or gets a 404; it can no longer launch a process into an entry nobody owns.
  • The control-channel interrupt waits 10 s for its reply: cdp-kernel waits up to 5 s for its target before replying, so the old 5 s reported a slow interrupt as failed.

2026-10-18, kernel shutdown steps, cancelled requests, stop signals (#70) ​

Several small lifecycle gaps from the review, fixed together:

  • Shutdown went from shutdown_request straight to SIGKILL of the process group. It now follows jupyter_client's finish_shutdown: the request, half the grace period to exit, SIGTERM, the other half, then SIGKILL. KernelProcess gained terminate(), Unsupported by default.
  • A request() future dropped by its caller (a lost select! branch, a cancelled handler) left its pending entry behind, and route kept appending that request's iopub output to it until the kernel died. A drop guard now removes the entry however the future ends.
  • Signals went to -pid even after the waiter task had reaped the kernel, when the pid (and so the group id) may already belong to someone else. The child process now checks it is still alive first, and KernelSession::interrupt refuses a dead kernel.
  • KernelManager::shutdown_all shuts kernels down concurrently, so N hung kernels take one grace period instead of N.
  • run, execute and console handle SIGTERM and SIGHUP: a kernel they launched is shut down (an attached one is interrupted), and they exit with 128 + the signal. The kernel is in its own process group, so before this timeout 60 ganymede execute ... or a closed terminal orphaned it.
  • A cell that hits --timeout is interrupted, so run --existing --timeout N no longer leaves a shared kernel busy.

Not done: PR_SET_PDEATHSIG (Linux sends it when the spawning thread exits, and a tokio worker or blocking-pool thread can retire while the kernel should live; doing it safely needs a dedicated long-lived spawner thread), and replay protection (digest_history), which is low value on a signed localhost connection. Moving blocking file I/O off the async handlers is a separate change.

2026-10-18, kernels die with the host, a second Ctrl-C stops (#70) ​

The rest of #70, after the kernel shutdown steps entry:

  • A host killed with SIGKILL, or one that panicked past its cleanup, orphaned every kernel; only kernels that watch JPY_PARENT_PID noticed. On Linux the kernel now asks for SIGKILL when its parent goes (PR_SET_PDEATHSIG, set between fork and exec). Linux sends that when the thread that forked the child exits, so kernels are no longer forked from whatever tokio thread called launch: one ganymede-kernel-spawner thread, started on first use and never stopped, does every spawn, inside the caller's runtime so tokio still watches the child. A test re-runs the test binary as a host, launches a kernel from it, SIGKILLs it, and checks the kernel goes; another checks a kernel outlives the thread that launched it. Elsewhere it is a plain spawn. The signal reaches the kernel only, not its process group.
  • Whatever a kernel left in its process group (a background job) is SIGKILLed when the kernel exits, as jupyter_client kills the group. Done right after the reap: a group id is not reused while the group has members.
  • run and execute: a second Ctrl-C within 2 s stops the kernel (a launched one is shut down, an attached one interrupted) and exits 130, so a cell that ignores interrupts no longer needs kill. The fake kernel's hang <ms> is a sleep that ignores interrupts.
  • Replay protection: like jupyter_client's digest_history, a signed message whose signature was already seen on the connection is dropped (wire::decode_once, DigestHistory, 65536 signatures, a tenth culled past that).

2026-10-18, limits on lab install downloads (#47) ​

lab install and lab extension install fetched whatever URL PyPI's JSON named, following redirects, with no timeouts and no size cap, and then unpacked the wheel with no cap either. They ignored yanked, and they dropped every version specifier, so a dependency always got its latest release.

What changed, all in a new lab/pypi.rs:

  • The agent is HTTPS only, with connect, response, body and overall timeouts. The API must answer from pypi.org and wheels from files.pythonhosted.org, checked on the final URL after redirects. GANYMEDE_PYPI_URL names a mirror (its host is allowed too), and GANYMEDE_PYPI_HOSTS adds more hosts.
  • Downloads are capped at 256 MB. Extraction is capped at 100,000 entries, 256 MB per file and 1 GB in all (Limits).
  • Yanked files and releases are skipped. An explicit == pin or lab install --version on a yanked release fails and gives the reason.
  • PEP 440 versions and specifiers (==, !=, <, <=, >, >=, ~=, ==X.*) apply on the command line and in Requires-Dist. An installed dependency is upgraded when it no longer matches. Pre-releases are picked only when asked for or when nothing else matches, with a note.
  • --no-deps, the wheel's URL and SHA-256 printed before install, and a JupyterLab reinstall that renames the old copy aside and restores it if the move fails.
  • frontends.md says what this trusts: the hash comes from the same response as the URL, so it guards against corruption, not a malicious release.

Not done: attestation or RECORD checks, a lock file, --from-wheel, extension-to-JupyterLab compatibility checks, and locking against concurrent installs.

2026-10-18, kernelspecs and headers parsed as leniently as jupyter_client (#58) ​

Ganymede rejected input that jupyter_client accepts, and the rejection was quiet: a bad kernel.json was only logged and vanished from /api/kernelspecs, and a kernel reply that failed to decode was dropped, so the host waited until its timeout.

  • kernel.json: display_name and language default to "". env is a loose dict in Jupyter; numbers and booleans are now stringified and other values (null, lists, objects) skipped with a warning.
  • Kernelspec names are the lowercased directory name, and directories whose lowercased name is outside [a-z0-9._-]+ are skipped, as in _list_kernels_in. install already enforced the same rule; it now shares the check.
  • install copies symlinked subdirectories (it used DirEntry::file_type, which does not follow links, and then fs::copy failed on a directory).
  • Message headers: username, date and version default to "" when missing. msg_id, session and msg_type are still required.
  • null metadata reads as {} on the wire, ws v1 and legacy ws paths.

What we learned: for a compatibility target, every required serde field is a place where we are stricter than the reference. Default what the reference defaults.

2026-10-18, login redirect with control characters (#50) ​

safe_next refused :, \ and a leading // in the next parameter but let tab, CR and LF through. Browsers remove those from a URL before parsing it, so Location: /\t/evil.example lands on //evil.example, a protocol-relative URL on another host. /login redirects at once when the browser is already logged in or auth is off, so one link was enough. This is the class of bug jupyter_server fixed for CVE-2023-39968.

  • next with any control character or whitespace now falls back to the base URL, before the other checks run. Checking for // alone is not enough when the browser rewrites the string afterwards.
  • A value that starts with a single / followed by anything else is a path on the same host however the browser normalizes it, so the checks that remain (no scheme, no backslash, no leading //, under base_url) are sufficient once the string is what the browser sees.

2026-10-18, MIT license file and third-party notices (#64) ​

README and Cargo.toml said MIT, but no LICENSE file shipped, so GitHub detected none and the release archives carried no copyright notice.

  • Audit before adding it: of the 329 crates in Cargo.lock, every license is permissive or offers a permissive choice. The ones that are not plain MIT/Apache: option-ext is MPL-2.0 (file-level copyleft; using it unmodified as a dependency puts nothing on Ganymede), r-efi offers LGPL only as one of three choices, webpki-roots is CDLA-Permissive-2.0 (the Mozilla root list), clipboard-win and ryu allow BSL-1.0, aws-lc-sys and ring combine ISC, Apache-2.0 and BSD-3-Clause. SQLite (bundled by rusqlite) is public domain. The npm packages in docs/, frontend/ and validation/ are dev tools, never shipped, and are MIT/BSD/ISC/ Apache anyway. JupyterLab (BSD-3-Clause) is downloaded by ganymede lab install at run time, not redistributed.
  • cargo about writes THIRD-PARTY-NOTICES from about.toml (accepted licenses) and about.hbs (plain-text template, triple-stash so names are not HTML-escaped). private = { ignore = true } drops the workspace's own crates; build and dev dependencies are ignored since they are not linked. The file is generated per target in release.yml (Windows and macOS trees differ) and is not committed, so dependency bumps never need a regenerated file.
  • CI runs the same generation with --fail and output to /dev/null: a new dependency under a license missing from about.toml fails the build.
  • cargo install cargo-about builds no binary without --features cli; CI uses taiki-e/install-action instead.

2026-10-18, nbformat reading as lenient as Python's (#73) ​

nbformat.read only logs validation errors, but our typed model rejected whole notebooks over one bad field: an unknown output_type, a stream without name, execution_count: 1.0 or -1, source: null, a lone surrogate escape. Such notebooks were "Unreadable Notebook" on GET and "Invalid notebook" on PUT. Missing and duplicate cell ids were never repaired either.

  • An output that does not fit the schema is kept as Output::Unknown(Value) and written back unchanged (fixture invalid_outputs.ipynb round-trips byte for byte against nbformat.write).
  • Missing name reads as "stdout" (new_output's default), missing ename/evalue as ""; null metadata, source, outputs and data read as empty.
  • execution_count: an integral float reads as that integer, anything else invalid (-1, 1.5, strings) as None, so it is saved as null. Keeping -1 would need a non-integer type for the field.
  • Lone surrogates read as U+FFFD (only after a failed parse, so valid files pay nothing). Python keeps them but then cannot write the file as UTF-8.
  • For nbformat 4.5+, ids are filled (8 hex digits) and duplicates replaced on read and on write, as validator._normalize does. Earlier minors are untouched.

Not done: jupyter_server's message field with the validation text. That needs a schema validator to report what was wrong; the reader now repairs instead of failing, so there is nothing to put in it yet.

2026-10-18, notebook validation message, unknown cells (#73) ​

Follow-up to the lenient nbformat reading entry above, which left three gaps.

  • An unknown cell_type (nbformat 3's heading, or anything newer) made the whole notebook unreadable. It is now Cell::Unknown(Value), kept and written back unchanged like Output::Unknown; so is a known cell whose fields do not fit even leniently (source: 5). Fixture invalid_cells.ipynb round-trips byte for byte against nbformat.write. Cell::source, metadata and cell_type now return Option.
  • jupyter_server adds message: "Notebook validation failed: ..." to the model of a notebook that breaks the schema, on GET with content and on save. The reader now returns a ReadReport (from_slice_with_report, from_value_with_report): a schema check of exactly the spots the lenient reader defaults, empties or keeps verbatim, worded like jsonschema and located like instance['cells'][1]['outputs'][0]. The contents model carries it as message, absent when valid. It is not a full schema validator, and the text is not jsonschema's word for word. Missing or duplicate cell ids are not reported, since nbformat repairs them before validating.
  • A lone surrogate in a PUT body failed with "invalid JSON body". The server's body parser now retries with lone surrogates read as U+FFFD, as the file reader already did.

2026-10-18, paths outside the contents root are 404 (#54) ​

The last item of the #54 parity fixes. jupyter_server's FileContentsManager._get_os_path answers HTTPError(404, "<path> is outside root contents directory") for a path that resolves outside root_dir; we answered 403, because escapes shared Error::Forbidden with read-only roots and writes to the root itself.

  • ganymede-contents has a new Error::OutsideRoot, status 404. .. components, absolute paths, backslashes and symlinks that resolve outside the root use it; the read-only and root-protection errors stay Forbidden (403), and a NUL byte stays 400, as in jupyter_server.
  • The message still names the API path, never the OS path.

Learned: jupyter_server checks with abspath, so it follows a symlink out of the root; we keep refusing those, only the status changed.

Left: /api/spec.yaml is still 404. Serving it means vendoring jupyter_server's OpenAPI file, and no client we target fetches it.

2026-10-18, landing page, README, and docs navigation (#67) ​

The review's presentation list, minus the GitHub repository settings (description, topics, https homepage, social preview), which only an owner can change from the repository's settings page.

  • The landing page's first install tab is the install script; cargo needs a Rust toolchain, which the audience for a Python-free server often doesn't have. A line under it says which platforms are tested.
  • cdp-kernel is in the top navigation and in a "who is this for" line in the hero, not only the footer.
  • The page has a canonical link, og:/twitter: tags, and an SVG favicon that the docs use too. og:image is images/jupyterlab.png, a JupyterLab screenshot; the pages workflow copies docs/images/ to /images/, so one file serves the README, the docs, and the card.
  • "No Python" is qualified where it's claimed: no Python runtime or dependency, with the three places Python does appear (the PyPI wheel lab install unpacks, the CI reference, the nbformat byte format) in the README's Status section and the landing page's feature card.
  • The landing page's client table said JupyterLab "Needs cookie login"; cookie login shipped in #30 (#66's last open item). The footer links the security page (#65's last open item) and the changelog.
  • The README gained badges, a Features list, and a Quick start, as cdp-kernel's has. It and the roadmap said JupyterLab extensions are unsupported while ganymede lab extension install exists; they now say server extensions.
  • Docs: a Changelog page that includes CHANGELOG.md (as cdp-kernel's does), and a Known gaps page collecting what was spread over frontends.md, python-free.md, install.md, and the roadmap. Sidebar groups start open, except Contributing, so "Replacing Python" no longer hides behind a fold.

Not done: a shared theme package or CI check against cdp-kernel's copy of the CSS (#67 item 9). The two sites' styles are still kept in step by hand.

2026-10-18, release hardening (#61) ​

A release shipped unstripped binaries without LTO, its only integrity check was a .sha256 fetched from the same place as the archive, the cross-built x86_64 macOS binary never ran, and a release that failed after its tag was pushed had no written way back. Now:

  • [profile.release] with strip = "symbols", lto = "thin", and codegen-units = 1. The x86_64 Linux binary goes from 19.8 MB to 12.8 MB, and a clean build takes about as long as before (2.5 min).
  • The release job attests build provenance for every archive (actions/attest-build-provenance), and install says what the checksum does and doesn't prove and how to run gh attestation verify.
  • The x86_64 macOS binary runs under Rosetta on the arm64 runner, so it gets the same --version check as the native ones.
  • Releasing is the recovery procedure: rerun, untag and retag (tag-release.yml now has workflow_dispatch for that, main only), or cut a patch release once a release is public.
  • Install documents Gatekeeper (what to do after a browser download) and musl (no build yet; install from source).

Not done here: site/install.sh still picks the glibc build on musl and still exits non-zero when cdp-kernel install fails after ganymede is in place. Both are changes to the install script.

2026-10-18, rename without the check-then-rename race (#75) ​

The first #75 change left rename checking that the target was free and then calling fs::rename, which replaces an existing file (and, on Unix, an empty directory). A file created in between was lost.

  • rename now asks the OS to refuse an existing target in the same call: renameat2(RENAME_NOREPLACE) on Linux and Android (the raw syscall, so glibc before 2.28 is fine), renamex_np(RENAME_EXCL) on macOS and iOS, through libc, which the contents crate now depends on for those targets. EEXIST is still jupyter_server's 409 "File already exists".
  • Where the flag is not available (other platforms, a kernel or a filesystem that answers ENOSYS, EINVAL or ENOTSUP, such as some network filesystems) it falls back to check-then-rename, as before.

Still open: an opt-in ETag or If-Unmodified-Since precondition on saves. That is a design decision, not a bug fix, so it is left for later.

2026-10-18, a security policy and a security page (#65) ​

Ganymede is a server that runs code, and nothing said so: no SECURITY.md, and no page with the default bind address, what --ip 0.0.0.0 exposes, what --token "" leaves in place, or how to put TLS in front of it.

  • SECURITY.md at the root: report privately through GitHub's advisory form, only the latest release is supported, and what is in scope. A kernel running code, or an extension you installed, is not a vulnerability.
  • Security in the docs, under Reference: the defaults table, tokens and cookies, --token "" (Host and XSRF checks still apply since #41, but any local process can connect), why not to use --ip 0.0.0.0 on its own, SSH forwarding, TLS through tailscale serve or a reverse proxy with local_hostnames and trust_xheaders, --allow-origin '*', and JupyterLab extensions as code with your session's access.
  • CONTRIBUTING.md, which points at development, so GitHub's Contributing tab isn't empty.

Writing the page meant reading auth.rs and config.rs claim by claim. Each setting it describes is one of jupyter_server's, with the same default.

2026-10-18, server config: unknown keys fail, global flags apply (#55) ​

A config file with tokn = "x" or cull_idle_sec = 30 started a server with a random token and culling off, and said nothing: Config was #[serde(default)] only. ganymede serve and ganymede lab also listed the global -q, -v and --startup-timeout in --help and ignored them, and serve logged at warn while the ganymede-server binary logs at info.

  • Config now has deny_unknown_fields; the error names the key and the file.
  • --startup-timeout and -q map onto startup_timeout_secs and a new quiet key (kernels' own stdout and stderr discarded), so they apply to kernels the server launches. Unset, the file's values stand: the global flag no longer has a clap default, so "not given" can be told apart.
  • serve and lab log at info by default, debug with -v; RUST_LOG still wins.
  • Flags for keys that were TOML-only: --base-url, --checkpoint-dir, --allow-origin (repeatable), --cookie-secret-file.

Learned: serve's own --kernelspec-root shares the global's name, and clap fills both from one occurrence, so the roots were listed twice.

Left for later: a default config file path, --log-level and --log-file, and a kernel-id prefix on kernel output.

2026-10-18, small auth and REST parity fixes (#54) ​

A group of low-severity gaps against jupyter_server, found in the project review:

  • The token was compared with == in three places (API auth, page-URL token stripping, the login form). All now use the same constant-time compare as the _xsrf check.
  • The login cookie never had Secure. It does now when the request came over HTTPS, which for this plain-HTTP server means a TLS-terminating proxy. X-Forwarded-Proto/X-Scheme are believed only with the new trust_xheaders config key, as tornado's xheaders, since any client can send them.
  • TraceLayer logged full URIs at debug, ?token= included. The span now records the URI with the token replaced by [secret] (_scrub_uri).
  • Error bodies named absolute OS paths (/tmp/.../root/link/secret.txt is outside the contents root, config write failures). They name the API path or section; the OS path goes to the server log.
  • allow_origins changed the origin check but sent no CORS headers, and a preflight got 403. A CorsLayer for the listed origins now echoes the origin and answers preflights before auth, with the methods and headers jupyter_server's API handlers allow.
  • 201 responses (kernels, sessions, contents create and PUT, checkpoints) carry Location, percent-encoded like url_escape.
  • Legacy text frames include "buffers": []; binary frames still carry the buffers outside the JSON.
  • /api/me?permissions= answers with the requested actions (the token grants all of them) and 400s on a malformed value.

Left: jupyter_server answers 404, not 403, for paths outside the root. That is the contents crate's Forbidden contract for escapes, shared with read-only and root-protection errors, so it needs its own variant; /api/spec.yaml is still 404.

2026-10-18, a shutdown_reply that only reached iopub (#122) ​

interrupt_and_shutdown_requests_on_shell failed now and then on macOS with KernelDied. The 500 ms linger after exit didn't help, because the reply was never coming. With ten copies of the test running in parallel it fails on Linux too, about 1 run in 100, always on python3. strace on the kernel showed that the shutdown_reply on shell was never written to the socket in the failing runs. Only the copy ipykernel broadcasts on iopub went out.

The cause is in ipykernel 7. A reply on shell goes from the main thread to the shell-channel thread, which queues it on a ZMQStream. A shutdown then stops that thread, sometimes before the stream has flushed, and the queued reply is dropped. jupyter_client loses it the same way: a script that sends shutdown_request on shell right after other requests missed 3 replies in 250 runs.

What changed: when the kernel dies, a request still waiting for its reply is answered with the shutdown_reply the kernel broadcast on iopub for it, if there was one. The reply on the request's own socket is still preferred: the iopub copy is used only once the kernel is dead, after the linger. The test's unwraps now name the kernel that failed.

What we learned: when a reply goes missing, first check whether it ever left the kernel (strace on sendto) before looking for a race in the host.

2026-10-18, the site deploys from main again (#152) ​

Deploying only from release tags (#117) kept the docs in step with what install.sh installs, but held every docs fix until a release or a manual pages run. Thomas chose to deploy from main again and mark unreleased features in the docs instead.

  • pages.yml deploys on a push to main that touches site/, docs/, or the workflow. A manual run deploys main or the given ref. release.yml still dispatches it after publishing, without a tag now, so the site picks up the new version and changelog.
  • Docs for a feature not in the latest release carry a GitHub-style > [!NOTE] alert starting **Unreleased.**. VitePress renders those alerts too, so one syntax works on both. The fixed words are what release.sh greps for; it prints the matches and lists them in the release pull request, and they are removed on the release branch.
  • The rule lives in a new root CLAUDE.md, linked from development.md and releasing.md.

2026-10-18, _xsrf for a generic --static-dir (#139) ​

Serving a ganymede-ui build with ganymede serve --static-dir dist loaded the app, but nothing it did could change state. Opening the printed ?token= URL swaps the token for the login cookie and redirects to /, so the app is cookie-authenticated, and cookie-authenticated requests that change state need an _xsrf cookie echoed in X-XSRFToken. Only JupyterLab's page and the login pages set that cookie; the generic static fallback (ServeDir) set none, so saves and kernel starts got 403.

The fallback is now a router with a middleware that appends the _xsrfSet-Cookie to text/html responses when the browser has none, as jupyter_server does on every page it renders. Assets don't get one. @jupyterlab/services sends X-XSRFToken from the cookie on its own, so a JupyterLab-based app needs nothing more than to connect without a token.

2026-10-18, ganymede ui install and ganymede ui (#148) ​

ganymede ui install fetches a ganymede-ui release the way lab install fetches JupyterLab, and ganymede ui serves it as ganymede lab does, reusing lab's download agent, size limits, staged install and lab_start (with require_lab off, so the URL is /).

  • The release zip unpacks to one ganymede-ui-X.Y.Z/ directory; the install drops that level so ui/<version>/index.html is the app.
  • The default version's SHA-256 is pinned in the binary, as JupyterLab's wheel is. Other versions take the hash from the release's SHA256SUMS, which comes from the same place as the zip: it catches corruption, not a replaced release. ganymede-ui also publishes a provenance attestation per archive; checking it is left for later.
  • GitHub answers a release download with a 302 to objects.githubusercontent.com. Behind this container's proxy that 302 came back with Transfer-Encoding: chunked and an empty body, which ureq failed to drain when following the redirect ("chunk length cannot be read as a number"). The install follows redirects by hand, checking each host, and never reads a redirect's body.
  • GANYMEDE_E2E_UI=1 (set in CI's e2e job) runs the real download in tests/ui.rs; the rest of that file is offline.

2026-10-18, mark ganymede ui as unreleased (#153) ​

The docs site publishes from main, so it shows features before they ship. ganymede ui (#149) merged after 0.3.0. Its section in frontends.md now opens with the standard unreleased note (#152), and the README has one under its command list. Remove both at the next release.

2026-10-18, kernel output kept across a websocket drop (#53) ​

A websocket client subscribed to a per-kernel broadcast from the moment it connected, and session_id in the URL was ignored. When a laptop slept or a tailnet path changed, the output and execute_reply produced while it was away never arrived, and cells stayed [*]. A slow client (a backgrounded tablet) lagged the broadcast and lost messages, its own replies included, with only a server-side warning.

What jupyter_server does (from its source, MappingKernelManager and ZMQChannelsWebsocketConnection):

  • The connection's session_key comes from the session_id query parameter. When the last websocket of a kernel closes, on_close calls start_buffering(kernel_id, session_key, channels): that websocket's own ZMQ streams keep running and append every message (iopub, shell, stdin) to a plain list. Nothing bounds or expires it.
  • The next connection calls get_buffer(kernel_id, session_key). If the key matches, it takes over the streams, nudges, and replays the list ("Replaying N buffered messages"). If not, stop_buffering discards it ("Discarding N buffered messages"). Shutting the kernel down discards it too.
  • A new connection whose session_key is already open closes the old one ("Replacing stale connection").
  • There is no lag: each websocket has its own sockets, and tornado queues writes without limit. Output is dropped only by iopub_msg_rate_limit and iopub_data_rate_limit, and the client is told with a stream message on stderr.

What changed:

  • The kernel's broadcast hub is gone. forward puts each message on every client's own unbounded queue (bridge::Clients): iopub for all of them, replies only for the session in the parent header, as before.
  • connect_client_as(kernel, session_id) follows the three points above. When the last client of a kernel drops, its queue stays registered and keeps filling. The same session id takes the queue over, so there is no gap and nothing is delivered twice. Any other connection, or the kernel ending, discards it. The websocket handler passes ?session_id=, and closes a replaced socket with 1000 "replaced by a new connection".
  • Replies are never dropped. Past 10 000 queued messages, iopub is dropped, and when the client catches up it gets a stderr stream saying how many messages it missed, with the parent of the next one, so it shows in the running cell. That is our version of the rate-limit notice.
  • The engine's streaming handler tracked replayed output by count, so after a lag it showed some messages twice and missed others. It now tracks msg_ids, and the reply's record fills in exactly the missed ones.

Left: the pump from the kernel-host session's own broadcast can still lag, but it only moves messages onto queues. A buffer has no time limit, as in jupyter_server; the culler still shuts the kernel down.

2026-10-18, ZMQ tests bind port 0 (#120) ​

The ZMQ tests picked ports by binding 127.0.0.1:0 with a std listener, dropping it, and binding the port later. Under cargo test's parallel threads another test could take the port in between, and CI hit AddrInUse. The test kernels now bind tcp://127.0.0.1:0 themselves and build the connection info from the ports bind returns. The same fix applies to any future test that needs a listening port: let the socket that will listen pick it.

2026-10-19, API examples and switching notes (#183, #187, #188) ​

  • The API examples were captured from ganymede serve with ipykernel, not written by hand. Two things that came out of it: default in /api/kernelspecs is the first kernelspec found when --default-kernel isn't set, so Known gaps and Replacing Python were wrong to say there is no default; and the 409 on last_modified and 412 on If-Match are both Ganymede's own checks, which jupyter_server doesn't make, so the page says so.
  • The complete ganymede.toml on the reference page was checked by starting ganymede serve --config with it.
  • cdp-kernel's kernel.json on the Install page is the one cdp-kernel install --runtime node writes (0.7.0), with the machine's paths replaced by typical ones.

2026-10-19, app guide and where things run (#177) ​

Step 3 of the docs review: the pages that described the Mac and iPad app as a plan now describe what was built.

  • New guide, app.md ("Ganymede's app"): the three ways to run ganymede-ui (ganymede ui, the Mac and iPad app, the browser alone), where notebooks and kernels live in each, getting the Mac build from CI, kernel servers, and the toolbar, shortcuts and trust. The ganymede ui section moved here from frontends.md.
  • New diagram, where-kernels-run.svg, used on Architecture, the app guide and the iPad page.
  • Architecture: "Deployment profiles" (a table of a design that wasn't built: in-app bridge, embedded kernelspec list, no HTTP on the iPad) became "Where it runs". The seams table now has Built and Not built columns; the TypeScript rows went, since ganymede-ui uses JupyterLab's packages and documents its own seams.
  • ipados.md rewritten from the original plan into what was built, what is left, and the decisions that came out of it. The plan's message bridge was dropped for the ordinary server on loopback inside the app.
  • ui.md: the UI options are now the two that exist plus the native one that wasn't pursued.

2026-10-19, architecture diagrams (#177) ​

Step 2 of the docs review. Architecture gets two SVG diagrams, and the stack diagram is brought up to date.

  • crates.svg: the eleven crates and what each uses, from the [dependencies] of each Cargo.toml, with edges implied by another edge left out so it stays readable (the cli's direct use of contents, for one). The table under it lost its "Depends on" column.
  • running-a-cell.svg: a sequence diagram with two clients on one kernel, which shows the routing rule the numbered list described: iopub to every client, the shell reply only to the one that asked, and done when both the reply and the matching idle have arrived.
  • ganymede.svg: Notebook 7 removed (its pages aren't served; clients.md says so), ganymede-ui and other clients added, gateway and ffi crates added, and the "in-process, iPad, planned" kernel replaced by remote kernels through the gateway. Taller, so the landing page's <img> height changed with it.
  • The SVGs are generated in the style of the existing ones (same classes and dark-mode block) and were checked as rendered in Chromium, light and dark, before committing.

2026-10-19, cdp-kernel 0.7.1 (#213) ​

  • CI's CDP_KERNEL_VERSION and container/Dockerfile's default move from 0.6.0 to 0.7.1, so the first published container image carries the current kernel. Architecture's tested-versions table and Development name the same version.
  • 0.7.1 adds user_expressions, the installed TypeScript version in kernel_info_reply, start timeouts for Bun, workerd and celld targets, and survives non-JSON runtime messages; the e2e suite runs against it on Linux and macOS.

2026-10-19, a container image with no Python (#203) ​

container/Dockerfile follows cdp-kernel's image, with one difference: cdp-kernel starts from Jupyter's minimal-notebook image, which carries Python and JupyterLab's server. This one is debian:trixie-slim with Node 24 copied from the official image, cdp-kernel's cdp-node kernelspec, and JupyterLab's frontend from ganymede lab install. container/smoke-test.sh fails if python3 or python is on PATH.

  • The binary is the GitHub release named by Cargo.toml (GANYMEDE_SOURCE=release, the default), so release.yml's image job runs after the release job has published the archives. CI builds with GANYMEDE_SOURCE=checkout (Rust 1.95, the MSRV); a cold build takes about three minutes.
  • Kernelspecs go in /usr/local/share/jupyter and JupyterLab in /usr/local/share/ganymede (GANYMEDE_DATA_DIR), so a volume over the home directory hides neither.
  • ganymede lab --ip 0.0.0.0 prints http://0.0.0.0:8888/...; the docs tell people to open it with 127.0.0.1. docker stop works without --init: the server handles SIGTERM.
  • With --user set to a uid that has no passwd entry, HOME is / and the server can't write its cookie secret or trust database; it still serves, with warnings. The docs say the mount must be writable by uid 1000 instead.
  • ca-certificates is in the image: ganymede lab install uses rustls-platform-verifier, which reads the system trust store.

load_cookie_secret opened jupyter_cookie_secret with create and truncate, so it wrote through a symlink planted at that path, and two servers starting together each wrote their own key, the second invalidating cookies signed with the first. It now writes the key the way the notebook-signing key is written (contents/src/trust.rs): a mode-0600 temp file in the same directory, synced, then persist_noclobber into place. A server that loses the race reads and uses the winner's key. An empty file is replaced with persist, which renames over the path and so replaces a symlink rather than its target.

Lesson: every secret file in the tree should go through temp file plus rename. OpenOptions::create(true).truncate(true) follows links and races, and create_new alone does not stop a second writer from losing its key.

2026-10-19, CORS credentials off by default, allow_credentials to turn them on (#170) ​

The CORS layer for allow_origins never sent Access-Control-Allow-Credentials, so a page on a listed origin could not use the login cookie, while docs/security.md warned that '*' plus the cookie let any page act with your session. jupyter_server behaves the same by default: its allow_credentials is False. So the behaviour stays, the docs now say cross-origin clients send the token, and allow_credentials (--allow-credentials) is added under jupyter_server's name.

With * listed, credentials stay off. jupyter_server answers Access-Control-Allow-Origin: * there, which browsers never pair with credentials. Ganymede echoes the request's origin instead, so sending credentials would hand the cookie session to every page.

Lesson: the cookie is SameSite=Lax, so even with credentials a browser sends it only between origins on the same site. CORS is one gate and the cookie's own attributes are another, and the docs need to describe both.

2026-10-19, diagrams follow the site theme (#185) ​

  • An SVG loaded through <img> is its own document: its prefers-color-scheme query sees the OS, never the page's .dark class or data-theme. So a reader who picked dark on a light OS got light diagrams. Keeping the media query in the source (GitHub has no toggle, so following the OS is right there) and having the docs build write a light and a dark copy keeps one file to edit per diagram. The markdown image rule swaps in both copies, and CSS hides the one that doesn't match.
  • The landing page is plain HTML outside VitePress, so it references the generated copies directly; the pages workflow checks they exist before deploying and after.
  • jupyter.svg put its point, "needs a Python environment", in grey caption text. It is now a pill on the box, and both stack diagrams have a legend for what colour and dashes mean. Grey microcopy is darker (#4b535d) in light mode and lighter (#b6bcc4) in dark.

2026-10-19, docs restructure (#177) ​

Step 4 of the docs review. The sidebar now runs Start here, Guides, Reference, How it works, Background, Contributing: Security is a guide, Known gaps sits with the reference pages, and Other Jupyter clients and Prior art moved to a collapsed Background group, since they are context rather than anything a user acts on.

  • Flags, config keys, environment variables, logging and exit codes were spread over Getting started, the README and the guides, each copy a little different. They now live on one page, reference.md, checked against ServeArgs, Config and the CLI's global flags; the guides link to it. Only gateway_url/gateway_token differ from v0.3.0.
  • An inline "(unreleased)" in a table is invisible to the release's grep 'Unreleased\.', so unreleased rows get a note under their section instead.
  • The README was 257 lines and shipped in every release archive with the crate table, testing and release details that the docs already had. Those moved to Architecture, Development and Releasing; the README keeps the pitch, install, a short command list and links.
  • Protocol's "What is usually missed" read as advice to a future implementer. It is now a table with Ganymede's status on each item.
  • The where-kernels-run diagram showed four identical-looking stacks. Thomas found the differences invisible, so it is now a grid: one row per setup, one column per role (UI, Ganymede, kernels, notebooks), color for where each piece runs, and a dashed frame around what shares the app or the browser tab. The differences are now the shape of each row.

2026-10-19, docs review: stale statements (#177) ​

A review of all the docs (report) found the Design pages still written as the original sketch's plans, and status lines on many pages that had gone stale as work landed. This entry fixes the statements that were wrong; restructuring and diagrams follow in their own pull requests.

  • Fixed: the FFI layer and the Mac/iPad app called planned (architecture, ipados), frontend extensions called unsupported (architecture), the remote provisioner called next and terminals called planned (python-free, protocol), nbformat 3 called unread (protocol), the widget manager described as anywidget-only (python-free), the roadmap's Next listing the UI, the landing page's "Own UI: Planned", and README's crate table missing ganymede-gateway and ganymede-ffi.
  • Lesson: a status line in a design page goes stale the day the work lands, and nobody greps design pages when merging a feature. Status belongs in Roadmap and Known gaps; the restructuring PR moves it there.
  • Not touched here: Security's cross-origin text, which #170 corrects along with the CORS behaviour, and ui.md, which #176 edits.

2026-10-19, an embedding page (#189) ​

  • Every example on the page was compiled and run outside the repo against these crates by path: the streaming example on the built-in fake kernel, an engine with default-features = false and its own provisioner and transport factory (no zeromq in cargo tree), the gateway snippet (compiles; stops at refresh() with no server), and the C call sequence with cc -Wall -Werror against ganymede.h and the staticlib on Linux. The Swift snippet and build-xcframework.sh need macOS and were not run.
  • ganymede-ffi builds the server with default features, so its iOS slice still has zmq, subprocess and gateway, and the C API can't pass an app's own kernel. The ffi dev log entry said #160 removed them; it didn't. Filed as #208.
  • Handler::on_input became async after v0.3.0, so the streaming section carries an Unreleased note while the engine table above it, all in v0.3.0, doesn't.

2026-10-19, embedding prep for the Swift shell (#156) ​

Items 1, 3 and 7 of #59, the first step of the plan for the macOS app (Rust core in-process, see the plan).

  • ganymede-api has zmq and subprocess features, on by default, forwarding to kernel-host. ZmqTransportFactory exists only with zmq. CI checks api for iOS with neither. The server keeps both on: its run_with builds the subprocess provisioner and ZMQ transport, and until there is another provisioner (#160) a server without them could not start a kernel.
  • Browser wasm still fails for api, through ganymede-contents' getrandom (#159); WASI builds.
  • Handler::on_input is async (async_trait, since execute_with takes &mut dyn Handler). The terminal still reads stdin in block_in_place.
  • Notary::open without sqlite logs a warning that signatures last only for the process.

2026-10-19, ganymede-ffi: the server in-process for the Swift shell (#157) ​

The macOS app runs the server in its own process and loads ganymede-ui from it in a web view, so the Rust side it needs is small: start, URL, stop. ganymede-ffi exposes that as four C functions declared in crates/ganymede-ffi/include/ganymede.h. The config is JSON with ganymede.toml's keys, so the app and the config file share one schema; port defaults to 0 there.

  • The server runs on its own thread with a multi-thread tokio runtime; start blocks until on_listening fires or run_with fails, and stop sends on a channel and joins the thread, which shuts kernels down first.
  • Startup::stop replaces the signal handlers and the URL on stdout: an app must not take over SIGINT/SIGTERM or write to stdout.
  • A hand-written header with no cbindgen: four functions. CI links tests/smoke.c against the static library through it on Linux and macOS, so drift fails to link.
  • scripts/build-xcframework.sh builds macOS (arm64 + x86_64, lipo), iOS and the iOS simulator and runs xcodebuild -create-xcframework with a GanymedeFFI module map. The macOS CI job uploads the zip as an artifact. iOS links today with ZeroMQ and subprocesses compiled in; #160 removes them from that build.
  • The debug static library is about 430 MB (everything, unstripped); release with thin LTO is the one that ships.

2026-10-19, ganymede-ui's docs on this site (#175) ​

ganymede-ui's docs live in its own repository, next to the code they describe, and this site renders them under /docs/ganymede-ui/. npm run fetch-ui (docs/scripts/fetch-ganymede-ui.sh) copies its docs/*.md, all but its dev log, and its docs/images/ from main with a sparse, shallow clone into docs/ganymede-ui/, which is ignored by git. pages.yml runs it before the build; ganymede-ui's docs workflow sends a repository_dispatch (ganymede-ui-docs) when those files change, which rebuilds and deploys. A submodule would have needed a commit here for every docs change there, and a separate site would have split the nav and search.

config.mts gives those pages their own sidebar group, titled from each page's first heading, with architecture.md first. Their relative links resolve against ganymede-ui's docs/: links to another copied page stay on the site, links to anything else (../src/lib/backends.ts) go to ganymede-ui on GitHub. "Edit this page" points at ganymede-ui too. The editLink pattern is serialized into the client bundle, so it can't use the module's repo constant; it threw repo is not defined at render.

/docs/ui was already the "User interfaces" page, hence the longer path. A link from these docs to a ganymede-ui page that isn't there (no copy locally, or a rename over there) warns instead of failing the build, so a change in that repository can't break this site's deploy.

2026-10-19, remote kernels through a gateway (#167) ​

Thomas chose remote kernels for the iPad app first, with the on-device kernel fast-tracked after. The server got jupyter_server's gateway client: gateway_url and gateway_token (flags --gateway-url, --gateway-token; env JUPYTER_GATEWAY_URL, JUPYTER_GATEWAY_AUTH_TOKEN).

  • New crate ganymede-gateway. One Gateway value is the kernelspec source, provisioner and transport factory. KernelspecSource::list is synchronous, so it serves a cache that refresh fills; the server refreshes every minute, and the list is empty until the first success, so a server whose gateway is down still starts.
  • A launch is POST /api/kernels. The process handle interrupts with POST .../interrupt (InterruptMode::Signal, so the session calls it) and kills with DELETE, so a restart is a new remote kernel. The factory finds the remote id by the address of the launched kernel's process handle, which avoids a kernel-host API change for one provisioner. kernel-host now exports KernelProcess.
  • The transport is a websocket to /api/kernels/{id}/channels asking for v1.kernel.websocket.jupyter.org, falling back to the legacy JSON framing if the remote doesn't agree; both codecs already existed in ganymede_protocol::ws.
  • TLS: reqwest's rustls-no-provider and tokio-tungstenite share one rustls config with the ring provider and the platform verifier. The rustls feature would pull in aws-lc, which needs cmake to cross-build for iOS.
  • The server's gateway feature (default on) can be turned off; setting gateway_url without it is a startup error. Kernels an app passes in Startup win over gateway_url.
  • Kernelspec resources (logos) aren't proxied yet.
  • Tests: ganymede-gateway/tests/remote.rs drives an engine through a gateway to a real server with in-process fake kernels (start, execute, interrupt, restart, shutdown, wrong token); the server's tests/gateway.rs does the same over REST with gateway_url.

2026-10-19, one name for getting started (#186, #190) ​

  • The header's "Get started" and the landing page's main button went to Getting started, which assumes Ganymede is installed. Both now go to Install, and the sidebar group, the landing section and the overview's section are all "Get started", the label the nav already used. The Getting started page keeps its title: it is the second step.
  • The reading-level pill sits closer to the title, so it reads as the title's eyebrow rather than a separate line. Scrollbars are thin and use the theme's divider colour.
  • The outline still ends long headings with an ellipsis. Wrapping them would break the folded-section trick in OutlineItem.vue, which relies on every row being 32px tall; the full heading shows on hover.

2026-10-19, image zoom in the docs (#197) ​

VitePress has no image zoom of its own. The theme now attaches medium-zoom to every image in a page that isn't inside a link (docs/.vitepress/theme/zoom.ts), again on each route change.

  • medium-zoom treats a source ending in .svg as having no natural size and scales it to fill the viewport; a PNG grows only to its natural size. Vite keeps our diagrams as .svg files (all are over the 4 KB inline limit); an SVG inlined as a data: URI would stop at its width.
  • The zoomed copy is the same <img>, so a diagram keeps its own prefers-color-scheme colors. The backdrop is --vp-c-bg.
  • The overlay needs z-index above the nav bar and sidebar (60).
  • The ganymede-ui pages under /docs/ganymede-ui/ use this theme, so they get it too. cdp-kernel.org has the same file (cdp-kernel#367).

2026-10-19, kernel delete succeeds once the kernel is removed (#171) ​

KernelManager::shutdown removed the kernel from the map, marked it dead, closed its clients and dropped its process handle, then returned the error from KernelSession::shutdown if SIGTERM or SIGKILL failed (an unexpected EPERM, say). DELETE /api/kernels/{id} answered 5xx for a kernel that was already gone, and a retry got 404. jupyter_server answers 204 once the kernel is out of its manager. The escalation error is now logged and the shutdown returns Ok. Session delete already ignored it.

Test: shutdown_succeeds_once_the_kernel_is_removed launches a kernel whose process never exits and refuses both signals.

Lesson: once a step has removed state that cannot be put back, return success and log the failures that come after it, so the caller is not told to retry an operation that already happened.

2026-10-19, lab extension config written atomically (#172) ​

ganymede lab extension disable/enable wrote labconfig/page_config.json, and lab extension install wrote its install records, with std::fs::write, which truncates and then writes. Both files are read with tolerant readers, so a crash between the two silently undid every disable or made an install unknown to uninstall and list. Both now go through nbformat::atomic_write (temp file, fsync, rename), as notebooks and config sections do. The test holds a hard link to the old file and checks it still has the old bytes after the write, which only holds when the file is replaced rather than rewritten in place.

Lesson: any file read with a fall-back-to-defaults reader needs an atomic writer, since a truncated file reads as "nothing set" without an error.

2026-10-19, landing hero and screenshot (#179, #180, #181, #182) ​

  • The screenshot was re-shot from a real ganymede lab with cdp-kernel 0.7.0 on Node 24, in a 820×740 viewport at 2× with the file browser closed. At the README's ~850px width that is about CSS size, so the code reads; the old 1280px shot shrank text to about 7px. Two copies, jupyterlab.png and jupyterlab-dark.png, from JupyterLab's light and dark themes. The README picks one with <picture>; the landing page shows one by theme with the same rules as its diagrams.
  • To re-shoot: execute the notebook with ganymede execute --inplace, serve with a --config-dir whose lab/user-settings sets the theme and turns off the news prompt (@jupyterlab/apputils-extensionnotification: fetchNews: "false"), and press Ctrl+B before the screenshot to close the left area.
  • The hero's install block has to fit curl ... | sh (55 characters) without scrolling, which needs a text column of about 510px; the hero stacks below 1180px wide for that. The page's content width went from 1040px to 1200px so the screenshot beside the text stays legible.

2026-10-19, more diagrams (#194, #177) ​

Five diagrams where prose carried structure: the command map (Getting started), where the install puts files (Install), three ways to reach a server (Security), saving a notebook (Architecture), and the gateway (CLI and configuration).

  • The command map sorts commands by what they start: a kernel and no server, a server, or nothing. That is the line first-day readers miss between run/execute and serve/lab.
  • The save diagram is drawn from FsContents::save: the If-Match and last_modified checks come before anything is written, signing comes after the atomic write, and the first checkpoint is made only when none exists. The checkpoint step is easy to get wrong, because jupyter_server makes later checkpoints only on the client's POST.
  • The security diagram compares the three setups the page already recommends or warns against, so "Avoid" and "Do" are the page's own advice, not new rules.
  • #194's per-profile embedding diagram is left for the embedding page (#189), which is where its seams and features belong.

2026-10-19, reading nbformat 3 notebooks (#142) ​

ganymede-nbformat now reads nbformat 3 files by upgrading them to 4.5, as nbformat.reads(s, as_version=4) does: the v3 reader's strip_transient and rejoin_lines, then v4.convert.upgrade. Worksheets are flattened, heading cells become markdown ("#" * level + " " plus the source's lines joined with spaces), html cells become markdown, code cells move input, prompt_number and collapsed, pyout/pyerr become execute_result/error, and output keys such as png become MIME types. A JSON string under json is parsed. Each cell gets a fresh id. nbformat 1 and 2 are still rejected.

orig_nbformat: 3 stays in the read model's metadata, as in Python, so a contents GET shows it as jupyter_server's does; the writer's strip_transient drops it on save. The v4 read path still strips it, as before.

Test: tests/fixtures/v3.ipynb and v3.expected.ipynb come from generate.py; the Rust read of the first, with ids replaced, writes the second byte for byte.

Lesson: v3 joins split lines two ways. Lists from splitlines(True) keep their endings and are concatenated; older files used plain splitlines() and need "\n" between items. nbformat picks by whether the first line ends in a newline, and so does the upgrade.

2026-10-19, kernels without ZeroMQ: the provisioner seam (#160) ​

Item 2 of #59, so an in-process kernel (the iPadOS app's) can be started and restarted by the engine like any other.

  • TransportFactory moved from ganymede-api to kernel-host (api re-exports it), with ZmqTransportFactory in kernel_host::zmq. Provisioner and factory are a pair: the provisioner brings a kernel up, the factory connects to it.
  • LaunchedKernel.connection is Option<ConnectionInfo>; None for a kernel with no sockets. kernel_host::in_process() is that launch (no process, interrupts over control). The api test double used to invent TCP ports for it.
  • EngineBuilder::transports sets the factory (ZeroMQ by default). Engine::start, start_with, execute_notebook and Kernel::restart no longer need the zmq feature; attach and connect still do, since they take connection info.
  • tests/in_process.rs starts, executes, restarts and shuts down such a kernel; CI runs it with --no-default-features.
  • The server still builds its own subprocess provisioner and ZMQ factory. Letting an embedder pass its own is the next step, with the iPadOS target.

2026-10-19, the server serves an app's kernels (#165) ​

The step after #160 on the #59 plan: an app embedding the server (the iPadOS shell) can hand it the kernels it runs itself.

  • serve::Startup has optional kernelspecs, provisioner and transports. Each unset one falls back to what the server built before: kernelspec dirs, SubprocessProvisioner, ZmqTransportFactory.
  • ganymede-server has zmq and subprocess features, default on, forwarded to ganymede-api. Built without one, run_with fails at startup unless Startup supplies the replacement.
  • tests/embedded.rs runs the server with an app's kernelspec source, provisioner and factory, then lists, starts and restarts its kernel over REST; CI runs it with --no-default-features.
  • cargo check --target aarch64-apple-ios of the server fails on Linux (rusqlite's bundled SQLite needs xcrun), so the iOS build of the server stays covered by the macOS ffi job.
  • ganymede-ffi doesn't expose this yet: that comes with the iPadOS target and its on-device kernel.

2026-10-19, Windows install, tested versions, the log out of search (#184, #193, #192) ​

  • The Windows steps on the Install page were checked against v0.3.0's assets: the .zip holds ganymede-<version>-x86_64-pc-windows-msvc/ganymede.exe, and its .sha256 is <hash> *<name> (binary mode), so the first space-separated field is the hash. PowerShell's -ne compares strings case-insensitively, so Get-FileHash's upper-case hash matches. The PowerShell itself was not run; CI has no Windows job for it (#60).
  • The tested-versions table in Architecture takes every version from ci.yml's pins, ganymede lab install's default, and validation/package-lock.json. Keep it in step when they're bumped.
  • Site search now leaves the development log out. Facts that lived only in entries were checked: the request-body limit is max_body_size on the reference page, and chunked uploads, the kernel's working directory and outside-root 404s follow jupyter_server, so they need no page of their own.

2026-10-20, the last cdp-kernel conformance scenarios (#69) ​

What PR #105 left for later, ported from cdp-kernel's test/e2e.py into the real-kernel tests:

  • debugger_stops_at_a_breakpoint (kernels.rs): JupyterLab's sequence over control (debugInfo, initialize, attach, dumpCell, setBreakpoints, configurationDone), a cell stopped at line 2 with a stopped debug_event on iopub, stackTrace, continue, disconnect. Each debug_request waits for its reply and its idle, as JupyterLab does. Passes on cdp-kernel 0.7.1 and ipykernel 7.4.0. ipykernel 7 speaks protocol 5.5 and announces the debugger as supported_features: ["debugger"], not debugger: true; the test accepts either, and a kernel offering neither is skipped (which the e2e job turns into a failure).
  • malformed_stdin_and_garbage_payloads_are_tolerated (kernels.rs): while a prompt waits, a second DEALER on the kernel's stdin port sends a frame set with a non-JSON header; the kernel drops it and the real input_reply answers the prompt. On cdp-kernel, __cdpk_send('not json') from a cell leaves the kernel working. This needed zeromq and bytes as dev-dependencies of ganymede-cli.
  • parallel_starts_through_serve (server.rs): four kernels started at once over REST, each answers over its own websocket.
  • restart_failure_on_a_real_kernel_reports_it_dead (server.rs): a kernelspec wraps the installed one in sh -c '[ -e "$FLAKY_MARK" ] && exit 3; : > "$FLAKY_MARK"; exec "$@"', so it runs once and every relaunch fails. A REST restart answers an error, the websocket sees restarting then dead, and the kernel is gone. The wrapper works for any kernelspec, so no kernel needed changing.
  • CI job e2e-cdp-kernel-main, weekly and on workflow_dispatch only: clones cdp-kernel, npm ci, installs the npm pack tarball (prepack builds it), and runs cargo test -p ganymede-cli on cdp-node.

Kernel death through serve on a real kernel is covered by the crash tests in #144's PR.

2026-10-20, ganymede-ui 0.2.0 by default (#216) ​

  • ganymede ui install installs ganymede-ui 0.2.0 unless --version says otherwise, checked against the zip's SHA-256 from the release's SHA256SUMS (pinned in crates/ganymede-cli/src/ui.rs).
  • Release order follows from the pin: release ganymede-ui first, move the default here, then cut the ganymede release that ships it.

2026-10-20, iopub_welcome ends the startup nudge (#143) ​

ipykernel 7 binds iopub as XPUB and, per JEP 65, publishes iopub_welcome when a subscription reaches it. The session already counted any iopub message as "iopub is live", so the welcome was ending the nudge after one kernel_info_request on each channel; it was also being fanned out to clients like kernel output. It now stops in the session: the welcome answers the host's single shared subscription, which no client made. jupyter_server forwards it only because each websocket there opens its own SUB socket, and @jupyterlab/services has no handler for it. PUB kernels (cdp-kernel, older ipykernel) keep the existing fallback: requests with backoff until one's status gets through.

Checked against ipykernel 7.4.0: with RUST_LOG=ganymede_kernel_host=debug, ganymede run -k python3 logs the welcome before the first cell. The pure-Rust zeromq SUB socket's subscription is what triggers it.

Lesson: the welcome carries no parent and no state, so it must not touch execution_state; the API layer's starting-to-idle rule after the nudge still decides that.

2026-10-20, crashed kernels restart under the same id (#144) ​

KernelManager now does what jupyter_client's KernelRestarter does for jupyter_server: a kernel whose process exits with nothing asking it to is relaunched under the same id and cwd, clients see status: restarting (JupyterLab treats that as an automatic restart and reconnects), and after restart_limit crashes in a row (default 5, each within 10 s of the last restart) it is reported dead and removed as before. kernel_restart_limit / --kernel-restart-limit sets it; 0 keeps the old behavior.

Two rules from nteract's daemon on top of jupyter_server's:

  • An exit the server or a client asked for is not a crash: API shutdown and restart already went through booting and map removal, and now a client's own shutdown_request (with or without restart) marks the session as asked to exit. The restart flag case matters for ganymede-engine through a gateway, which sends shutdown_request{restart: true} and then launches the next kernel itself; restarting on the remote too left two kernels for a moment.
  • Requests a crash leaves unanswered get answers. The manager remembers each client's shell requests until the shell reply arrives; on a crash the oldest (the one running) gets an error reply with ename: KernelDied and, for a cell, an error output, and the rest get status: aborted, each followed by status: idle. jupyter_server answers nothing, so its clients wait until JupyterLab's own restart handling clears them.

To restart from the pump task, the launch state (provisioner, transports, kernel map, config) moved into an Arc<Core> the pump holds weakly; KernelManager::config is now a method.

Observed while writing the e2e test: after a cdp-kernel crash jupyter_server keeps reporting the kernel busy (the crashed cell's last status), because the new cdp-kernel publishes no parentless status and the startup kernel_info statuses are untracked. Ganymede's boot sets it idle once the new kernel answers. The test only waits for idle on Ganymede.

Lifecycle versus output (runt's ADR): death is a watch channel separate from the message broadcast in both the session and the pump, and interrupts go to the kernel without passing through any output queue, so an output flood delays neither.

2026-10-20, kernel start answers before the handshake (#173) ​

POST /api/kernels and POST /api/sessions waited for the startup nudge, so a slow kernel held the request for as long as it took to answer, and one that never answered held it for up to three launches of startup_timeout before a 500. jupyter_server answers once the process is launched: _async_start_kernel awaits _finish_kernel_start, which awaits the KernelManager's ready future, and jupyter_client resolves that after post_start_kernel, before any kernel_info_reply. Ganymede now does the same. The kernel is in the map with execution_state: starting when the POST answers, and boot (the nudge and the relaunches) runs on a task that owns the lifecycle lock, so a shutdown or restart sent meanwhile waits for it. A kernel that never answers is reported dead and removed, as one that dies later is. A spawn failure (no such binary) still fails the POST. Restart still waits for the kernel's reply, as jupyter_server's does.

KernelManager::wait_started waits for a start or restart in progress; the unit tests use it where they relied on the old blocking start.

Clients can now run cells while boot is still nudging (it keeps asking until iopub has carried a status, which can take seconds on macOS). A cell that crashed the kernel in that window went unreported, because deaths during booting are ignored, and boot then removed the kernel as dead instead of restarting it. boot now hands such a death to session_died, so it restarts like any other crash. The macOS e2e test a_crashed_ipykernel_restarts_as_under_jupyter_server caught it.

Lesson: when a choice is "deliberate" in the code, check the reference implementation's await chain before keeping it; here the comment explained the insertion order, not the request boundary.

2026-10-20, shutdown escalation test gives the TERM trap time to run (#212) ​

shutdown_escalates_to_sigterm_then_sigkill shut its shell "kernel" down with a 400 ms grace, so SIGKILL followed SIGTERM after 200 ms. A shell runs its trap ... TERM only when it is scheduled again, and on a loaded macOS runner that took longer: SIGKILL landed first and the file never said "term". The test now uses a 2 s grace (1 s between the signals) and bounds the whole shutdown by 2 x grace plus slack. The escalation order itself is checked without timing by the fake-process unit test shutdown_sends_sigterm_before_sigkill.

Lesson: a real-process test that waits on a signal handler needs a window measured in seconds, not the few hundred milliseconds a fake process needs.

2026-10-20, binary buffers through the websocket, contents without SQLite (#68) ​

The last two items PR #110 left open:

  • websocket_carries_binary_buffers_both_ways (ganymede-server/tests/http.rs) opens a comm on the fake kernel's echo target and sends a comm_msg with four buffers (<IDS|MSG>, empty, all 256 byte values, 100 KB) over a v1-subprotocol websocket and again over a legacy one (binary frames out, binary frames back). The echo comes back byte for byte both ways. With #110's zmq_kernel.rs (the same buffers through ZMQ framing) and the real-kernel comm echoes in kernels.rs, every hop a buffer takes now has a test.
  • cargo test --workspace unifies features, and the server turns on ganymede-contents/sqlite, so the in-memory signature store had only ever been compiled. CI's rust job now also runs cargo test -p ganymede-contents, which builds the crate alone without the feature; trust_survives_a_restart_with_the_same_data_dir already had its no-SQLite expectation waiting.

The lab install hostile-wheel item was already covered by unit tests in ganymede-cli/src/lab/ (hash mismatch, yanked, host allowlist checked on the final URL after redirects, hostile extension names, escaping entries, symlinks, size caps), so nothing was added there.

Lesson: a feature that a workspace member always enables is never off under --workspace; test the crate on its own to cover the default.

2026-10-20, Windows kernels run in a job object (#145) ​

On Windows the subprocess provisioner had no way to kill a kernel: kill returned Unsupported, so a shutdown ended with the kernel still running, and a kernel outlived the server. A kernel now starts with CREATE_SUSPENDED, goes into its own job object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE, and is then resumed. kill terminates the job, which takes every process the kernel started, as SIGKILL to the process group does on Unix. The job is also terminated once the kernel exits, so leftovers go with it, and when the host exits its handle closes and the job's processes die. terminate stays Unsupported (no SIGTERM counterpart), so shutdown goes from shutdown_request straight to the kill.

std gives no handle to the suspended main thread, so the resume finds the kernel's threads in a Toolhelp snapshot, as the command-group crate does. If the job can't be set up, for example because the host is in a job that forbids nesting, the kernel is resumed anyway and runs without one.

Lesson: the code builds for Windows from Linux with rustup target add x86_64-pc-windows-gnu and cargo clippy -p ganymede-kernel-host --target x86_64-pc-windows-gnu; no C toolchain is needed for that crate. It has not been run on Windows: CI has no Windows test job (#60).

2026-10-26, Streaming notebook runs and stdin (#158) ​

The notebook runner collected a cell's messages and applied them only after the reply, so a host running a notebook saw nothing until each cell ended, and never answered input_request. The engine's single-cell execute_with already streamed and answered input, but its outputs came from a fresh NotebookRun per call, so a display update aimed at an earlier cell was lost.

The streaming loop moved from ganymede-engine into ganymede-exec as execute_streaming, and Handler/NoHandler moved with it (the engine re-exports them, so its paths are unchanged). NotebookRun now applies each message as it arrives and reports it through a NotebookHandler; a closure taking an Event still works, through a blanket impl. Options::allow_stdin defaults to off, as nbclient does, and ganymede execute keeps it off.

Lesson: the timeout policy differs between the two callers. The engine interrupts a cell that times out; nbclient (and so the notebook runner) does not, by default. execute_streaming returns the timeout and leaves the choice to the caller.

CI on this PR also caught a race left by #225 (#230): a client could send execute_request while the server was still nudging a new kernel, and lose its outputs and idle if the kernel answered before the host's iopub subscription was live. parallel_starts_through_serve hung in about 1 run in 8 on cdp-kernel. Client messages now wait for a start or restart in progress, as jupyter_server's websocket does not read them until its own handshake ends; 16 runs in a row passed after.

2026-10-31, raw files at /files (#233) ​

GET /files/{path} now serves a file's bytes. Without it, JupyterLab's Download, Open in New Browser Tab, and relative images in Markdown cells were broken, because the contents API's getDownloadUrl points there.

  • The handler copies jupyter_server's FilesHandler. It calls cm.get(path, type="file") and decodes base64, so root confinement and the hidden-file policy come from the contents manager and work for any Contents implementation. The cost is that a large file is read whole and base64-encoded first. jupyter_server does the same.
  • A directory gets 400, not 404, because that's what get(type="file") answers in both servers.
  • Content-Type comes from the name. .ipynb is application/x-ipynb+json, and text/plain gets ; charset=UTF-8. Python's mimetypes encodings map a .gz suffix to application/gzip and other compression suffixes to application/octet-stream. When the type can't be guessed, it depends on the format the file was read in: text is text/plain, base64 is application/octet-stream. Guessing uses mime_guess, which was already in the lockfile through ganymede-contents.
  • ?download sets Content-Disposition for any non-empty value (Tornado's get_argument truthiness), including 0. The filename goes in RFC 5987 form, as jupyter_server writes it.

2026-10-31, Read-only /lab/api/extensions (#234) ​

The page config already named the read-only extension manager, but JupyterLab's Extension Manager panel still calls GET /lab/api/extensions, and the 404 showed as an error. The endpoint now answers as jupyterlab's ExtensionHandler does with ReadOnlyExtensionManager (checked against jupyterlab 4.6.5's extensions/manager.py, readonly.py, and handlers/extension_manager_handler.py).

What the source showed, which the issue's reading of it missed:

  • query absent means "list installed"; query present, even empty, means "search the index". The read-only manager's search returns nothing, so a search answers [], not a filtered installed list.
  • The handler always sends a Link header: the manager stores last_page or 1, so a manager without paging still reports page 1 as first and last. Ganymede sends path-only URLs, since it can't know the scheme behind a proxy; the panel reads only the page number.
  • ReadOnlyExtensionManager refuses install and uninstall but inherits enable and disable, which write page_config.json. Ganymede refuses all four, as #234 asks, with 405 and an ActionResult body (status: "error", a message naming ganymede lab extension) that the panel shows. JupyterLab answers a refusal with 500.
  • Versions go through get_semver_version (2.0.0rc1 becomes 2.0.0-rc.1; .devN and .postN drop), so semver_version ports it.
  • jupyterlab_server builds each extension's record without author, license, bugs, or repository, so JupyterLab's panel shows those as empty. Ganymede reads them from the extension's package.json, as the dataclass fields intend.

enabled uses exact names from disabledExtensions, as JupyterLab does, so disabling one plugin of an extension leaves the extension listed as enabled.

2026-10-31, Language servers for jupyterlab-lsp (#249) ​

The spike (#236, its own entry on this page) found that jupyter-lsp's server side is a language-free relay, so this builds it: a ganymede-lsp crate, GET /lsp/status and /lsp/ws/{name} in ganymede-server, language_servers tables in ganymede.toml, and virtualDocumentsUri in the lab page config.

The config key is language_servers ([language_servers.<name>]), after jupyter-lsp's LanguageServerManager.language_servers, rather than the [lsp.servers.<name>] #249 sketched, so a spec copied from a Jupyter config keeps its name. Servers come only from the config file, in jupyter-lsp's spec format; unknown spec keys pass through to the frontend. No spec finders, so the host still names no language. A spec with an empty argv is skipped, as in jupyter-lsp, and with no servers configured the routes answer 404, as a server without jupyter-lsp does.

What differs from jupyter-lsp, on purpose:

  • Range edits to virtual documents count UTF-16 code units, as LSP and the browser do. jupyter-lsp counts Python code points, which is wrong after an astral character. The document is also kept byte for byte rather than split into lines and rejoined, so a trailing newline survives.
  • A server that exits closes its clients' websockets and is started again by the next client. jupyter-lsp leaves the session pointing at the dead process.
  • Servers start in the root dir, not the server's working directory.
  • A server runs in its own process group on Unix, and stopping it signals the group (SIGTERM, then SIGKILL after 2 s), so workers it started (tsserver, or the real server behind an npm shim) don't outlive it. On Windows a bare name is looked up through PATHEXT, as shutil.which does, so npm's .cmd shims start.
  • Shadow writes are serialized, so two clients' edits can't overwrite each other. Two tabs on one notebook still both send each incremental edit, which is then applied twice; jupyter-lsp has the same problem (#262).
  • rootUri and virtualDocumentsUri are percent-encoded, as Path.as_uri() does, so a root with a space (iCloud's Mobile Documents) or # gives a valid URI, and a Windows verbatim path from canonicalize (\\?\C:\...) becomes file:///C:/.... The old rootUri had both problems.
  • Each client gets an unbounded queue rather than a lossy broadcast channel: a dropped JSON-RPC response would leave the editor waiting forever.

Tested with cat as the language server: it echoes each framed message, so a client's message comes back through the real stdio path to every client. That covers framing, the shared process, stop on the last close, restart after exit, env expansion, and shadow writes without a real language server in CI. By hand: JupyterLab 4.6.5 with jupyterlab-lsp 5.3.0 (installed with ganymede lab extension install) against ganymede serve, a .ts file with typescript-language-server and a Python notebook with jedi-language-server. Completion, hover, diagnostics, and the .virtual_documents/py.ipynb shadow file all worked, and /lsp/status showed the server stopped after the page closed.

Lesson: the websocket route can't be checked with a plain GET in the router tests. axum's WebSocketUpgrade extractor answers 400 before the handler runs, so a 404 for an unconfigured server shows only on a real websocket handshake.

2026-10-31, Language server spike (#236) ​

JupyterLab's language server features (jupyterlab-lsp, and the @jupyterlab/lsp package it builds on) talk to jupyter-lsp, a Python server extension. This spike read jupyter-lsp 2.3.1 and captured its traffic with JupyterLab 4.6.5, jupyterlab-lsp 5.3.0, typescript-language-server, and jedi-language-server, to decide whether Ganymede should serve the same endpoints.

Recommendation: build it, as one small crate behind configuration (#249). jupyter-lsp is a language-free relay once its Python spec finders are left out, so a Rust version keeps the host knowing no language.

Endpoints ​

The frontend calls two endpoints and reads two page config keys. Nothing else.

  • GET /lsp/status returns {"version": 2, "sessions": {...}, "specs": {...}}, both keyed by server name. A session is {handler_count, status, last_handler_message_at, last_server_message_at, spec}; status is one of not_started, starting, started, stopping, stopped. Specs are sent with argv, debug_argv, and env blanked ([""], [""], {}). The frontend picks a server by matching a document's language or MIME type against each spec's languages and mime_types.
  • WS /lsp/ws/{server} relays JSON-RPC. Each websocket text frame is one JSON-RPC message with no Content-Length header; the server adds the header on the way to the language server's stdin and strips it from stdout. Auth is the same as the kernel websocket (cookie or token; jupyter_server's resource name is lsp, action execute).
  • Page config rootUri (file:// URI of the contents root) and virtualDocumentsUri (rootUri + /.virtual_documents). The client uses them as the LSP rootUri and as the base for notebook documents. Ganymede's lab page config already sends rootUri; virtualDocumentsUri is missing.

The captured order for a plain .ts file: GET /lsp/status, websocket open, initialize, initialized, workspace/didChangeConfiguration, textDocument/didOpen with the real file URI (file:///…/demo.ts), then didChange (full text each time), hover, documentHighlight, completion, completionItem/resolve, and publishDiagnostics back. The server only relays; it reads none of it except for virtual documents.

Server discovery ​

jupyter-lsp merges three sources: Python entry points (spec finders that look for pyright, typescript-language-server in node_modules, and so on), the traitlet LanguageServerManager.language_servers in jupyter_server_config.*, and conf.d JSON. Config wins; autodetect = False turns the finders off. The finders are the only part that knows languages.

For Ganymede, specs come only from configuration: a [lsp.servers.<name>] table in ganymede.toml with the same fields as jupyter-lsp's spec (argv, languages, mime_types, display_name, env, requires_documents_on_disk, workspace_configuration). Reading LanguageServerManager.language_servers from an existing jupyter_server_config.json would be easy (it is plain JSON) and lets a Jupyter setup carry over, but can wait until someone asks. The spike ran jupyter-lsp with autodetect: false and a config-only spec for both servers, and the frontend behaved the same as with autodetect.

Virtual documents ​

A notebook is sent to the language server as one document: the code cells of one language joined with blank lines, at {virtualDocumentsUri}/{notebook path} (captured: file:///…/.virtual_documents/py.ipynb). The client does all the joining and position mapping.

The server's part is the "shadow" file system: for didOpen, didChange, and didSave whose URI is under virtualDocumentsUri, and only for servers whose spec leaves requires_documents_on_disk true (the default), it writes the document's text to that path before relaying. It applies at most one contentChanges entry, the full text or a single range edit, and clears the directory on first use. Servers that read files from disk (pyright, jedi for imports) need this; the spike saw .virtual_documents/py.ipynb written with the joined cells. In Rust this is about 80 lines plus a check that the path stays inside the virtual documents directory, which jupyter-lsp also does.

Process lifecycle ​

One process per configured server, shared by every websocket to it: started when the first websocket subscribes, terminated when the last one closes. Messages from the server are broadcast to every subscribed websocket, so two tabs see each other's replies, and the second tab's initialize goes to an already-initialized server. Ganymede should copy this for compatibility; a per-client process is a later option. stdio framing is Content-Length: N\r\n\r\n + body; jupyter-lsp ignores other headers and polls non-blocking pipes with backoff, which Tokio's async pipes make unnecessary. It does not restart a crashed server or log its stderr (stderr is inherited). env values expand ${VAR} from the server's environment. Stopping is terminate() with no shutdown/exit request.

Which frontends use it ​

  • JupyterLab with jupyterlab-lsp installed. JupyterLab 4's core @jupyterlab/lsp only does something with an extension that uses it. Against Ganymede today (checked with the same JupyterLab and extension, --static-dir and --labextensions-path pointed at the venv), /lsp/status returns 404, the console logs the failed request, no websocket opens, and the notebook otherwise works.
  • ganymede-ui has no LSP client. Its CodeMirror cells could use @jupyterlab/lsp or a CodeMirror LSP client over the same websocket; the Swift text editor (ganymede-ui #122) could too, against a remote server.
  • For TypeScript notebooks on cdp-kernel, completion and hover already come from the kernel (complete_request and inspect_request, answered by a TypeScript language service worker that knows the executed cells). LSP adds diagnostics, go to definition, rename, and signature help, and covers plain .ts files in the file editor, which the kernel cannot.
  • A TypeScript notebook on cdp-kernel did not attach in jupyterlab-lsp 5.3.0 under jupyter-lsp either: the websocket never opened, and the console showed "Cannot read properties of undefined (reading 'isReady')". The same setup worked for a .ts file and for a Python notebook. This is a client-side issue to look at before claiming TypeScript notebook support; it is not specific to Ganymede (cdp-kernel #400).

iPad ​

No subprocesses on iOS, so the in-process server has no language servers there; the app would use LSP only through a remote Ganymede server. An on-device TypeScript service would run in the kernel web view, as cdp-kernel's language service does, not through /lsp/*.

Security ​

The websocket path names a configured server; an unknown name is a 404 and never spawns anything, and no request can supply an argv. Shadow writes go only under the virtual documents directory inside the contents root. The status endpoint keeps jupyter-lsp's blanking of argv and env.

Lessons ​

  • TypeScript 7 (the native port) ships no tsserver.js, so typescript-language-server fails initialize against it; the spike pinned typescript@5. A spec's argv points at whatever is installed, so this is the user's setup, not ours, but the docs should say it.
  • JupyterLab restores the last workspace, so a capture script that opens a second document must use a fresh workspace (/lab/workspaces/<new>/tree/…?reset) or it reuses the first document's editor.

2026-10-31, nb-cli against ganymede serve (#240) ​

nb-cli 0.0.10, the notebook CLI meant for agents, works against ganymede serve with no server changes, on cdp-kernel 0.7.1 and ipykernel. validation/nb-cli.sh covers it; the results are in Other Jupyter clients.

In remote mode nb-cli calls POST /api/fileid/index (jupyter-server-documents) and PUT /api/collaboration/session (jupyter-collaboration); both 404, so it reports "direct (no collaboration backend)" and edits through the contents API: each nb cell add is a GET and a PUT of the whole notebook. nb execute makes or reuses a session for the notebook path, so separate nb execute calls share one kernel and its state, which is what journaling needs. Outputs are written into the file on the server.

Gateway mode (nb execute --gateway URL --gateway-token T) keeps the notebook on local disk and uses only /api/kernels and the websocket; both token and Bearer schemes are accepted.

None of what follows is a Ganymede bug; it is nb-cli behaviour an agent (and the Agents page, #241) has to know:

  • nb connect with no arguments runs jupyter server list, which needs Python. Use --server and --token. #242's jpserver-<pid>.json plus an nb-cli change would make auto-detect work.
  • nb create looks the kernel up on local disk even in remote mode, and only in VIRTUAL_ENV and the platform data dirs, not JUPYTER_PATH or JUPYTER_DATA_DIR. With a kernel installed only where the server runs, nb create fails; the script copies the server's kernelspec under a VIRTUAL_ENV.
  • Gateway mode without --kernel-id takes the first kernel listed, whatever its language: a TypeScript notebook ran on a Python kernel.
  • A cell timeout (-t) does not interrupt the kernel, so the next call waits for the old cell to finish.
  • nb execute exits 0 when a cell raises; use nb search --with-errors.
  • stdin is off (input() raises StdinNotImplementedError), as in nbclient.
  • cdp-kernel's text/plain results carry ANSI colour codes (Deno-style formatting), which nb-cli passes through to the agent.

2026-10-31, independent review of every PR (#254) ​

Until now a PR's only reviewer was the thread that wrote it. An audit of the four repos (#253) found broad CI but no independent review: #248 merged with no review, and six PRs merged within twenty minutes on 2026-10-31.

The fix is eval-style vetting, not a human gate: a scheduled Claude session that didn't write the PR reviews it once CI is green, checks it against its issue and the PR template's Verification checklist, and posts a verdict. It is advisory and never waits on a person; the point is to be able to trust a PR without reading its code. A label-plus-required-check gate was tried first and dropped: GitHub counts thread PRs as authored by tlockney, so the gate had to fake an approval, and requiring review is against the project's approach of agents vetting agents.

The stronger evals are behavioural: tests against real clients (#256, #257, #258) and coverage reports (#255). The spike label separates exploratory PRs (like #251) from production ones without lowering the bar for dependencies or advisory ignores.

2026-10-31, Server info file (#242) ​

serve, lab and ui now write jpserver-<pid>.json and jpserver-<pid>-open.html in the Jupyter runtime dir, with jupyter_server's keys (url, token, root_dir, pid, port, ...), and remove them on exit. This is the first step of agent-native Ganymede (#239): jupyter server list lists a running Ganymede, and ganymede mcp (#245) and an nb-cli change can find a server without being handed its URL and token.

The files are written to a temporary file and renamed, so they are 0600 from the start and a reader never sees half a file; the runtime dir is created 0700 if missing. They are written before the URL is printed, so a script that waits for the URL can read them at once (the first version wrote them after, and the end-to-end test lost that race). version is JUPYTER_SERVER_VERSION, as GET /api reports; an extra ganymede_version key tells clients which server it is. jupyter server list ignores extra keys.

One difference: for a wildcard --ip (0.0.0.0, ::), jupyter_server puts the machine's host name in url; Ganymede puts localhost, which avoids a gethostname dependency and is what a client on the same machine should use. Stale files from killed servers are left to jupyter server list, which deletes those whose pid is gone. The embedded server (ganymede-ffi) writes nothing.

The end-to-end test in crates/ganymede-cli/tests/cli.rs checks the file's contents and mode, removal on SIGTERM, and, when a reference jupyter is installed (CI), that jupyter server list --json returns exactly the file's contents.

2026-10-31, Jupyter terminals API (#232) ​

Ganymede now serves /api/terminals and terminado's websocket at /terminals/websocket/{name}, so JupyterLab's Terminal launcher works and the Mac app can open a shell on its embedded server (tlockney/ganymede-ui#117). The new ganymede-terminals crate runs the user's login shell in a pseudo-terminal through portable-pty (WezTerm's; Unix PTYs and Windows ConPTY). The shell is $SHELL -l or terminal_shell, never a language, so the host still names none.

Choices that follow jupyter_server and terminado: unnamed terminals take the lowest free number from 1, a name in use is 409, POST answers 200 with the model, DELETE 204, and a relative cwd resolves against the root dir and falls back to it when missing. A client gets ["setup", {}], then the terminal's last 128 KiB of output, then live output; any number of clients share a terminal. terminals_enabled = false leaves the routes answering 404, as jupyter_server registers none then.

Lessons:

  • The parent must drop its copy of the PTY slave after spawning, or the reader never sees EOF when the shell exits.
  • wait, kill and resize each take their own lock. With one lock around the child, a delete could block behind the reader thread's wait.
  • History and subscription are taken under the history lock, so a client attaching mid-output gets each chunk once.
  • iOS and wasm get a stub: portable-pty is a target-specific dependency, TerminalManager::supported() is false there, and the server leaves terminals off. CI's iOS check now includes the crate.

2026-10-31, yrs document rooms (#243) ​

Spike for roadmap step 6 (document model, #141) with yrs as the vehicle, which #244 (JSD execute) and #245 (ganymede mcp) build on. Result: it works. A new crate, ganymede-documents, holds a notebook as a yrs document in jupyter_ydoc's schema, and ganymede serve answers jupyter-collaboration's session endpoint and room websocket. JupyterLab 4.6.4 with jupyter-docprovider and jupyter-collaboration-ui 3.0.4 (installed with ganymede lab extension install) opened a notebook through a room; in Playwright, text typed in one tab showed up in a second, was autosaved, and a change written to the file by another process appeared in both tabs.

Findings ​

  • Schema. Read from jupyter_ydoc 4.2.0 and @jupyter/ydoc as shipped in jupyter-docprovider 3.0.4: root cells (array of maps: source a Text, metadata a Map, outputs an array of maps with a stream's text a Text, execution_state added to code cells), meta (nbformat, nbformat_minor, metadata as a Map), and state (dirty, path, hash; clients write document_id). JupyterLab learns of a save from a change to state.hash.
  • Byte-identical round trip. Every nbformat fixture goes through a room, and through a client synced from it, and comes back byte for byte. Two things needed care. jupyter_ydoc adds language_info and kernelspec defaults and turns every top-level number into a float; this crate does neither. And Yjs can't hold every JSON number: lib0 writes integers outside 32 bits as floats, and nothing holds integers beyond 2^53. Rooms keep the notebook as last loaded and put such numbers back on save when the value in the document is what the original turns into (restore_numbers), so a file with 18446744073709551616 in its metadata still saves unchanged.
  • Deterministic load, as jupyter-collaboration does: the initial content is built in a document with client id 0 and keys in sorted order, so a room rebuilt from an unchanged file has the same history and a client that reconnects merges without duplicating cells.
  • Wire protocol. y-websocket sync (step 1, step 2, update) and awareness, which yrs::sync encodes. jupyter-collaboration reuses message type 2, y-protocols' auth, for raw string messages: the client sends save plus a request id on Ctrl-S and waits for {"type": "save", "responseTo", "status"}. The room reads type 2 itself before handing anything to yrs. A stale sessionId (after a server restart) is closed with 1003 and a JSON reason, which makes JupyterLab offer to reload.
  • Dirty tracking. A first version counted any update as an edit, and each tab opening the notebook caused a save, because clients write state.document_id. Rooms now watch cells and meta with deep observers and ignore state.
  • Reload is granular, like jupyter_ydoc 4's set: cells with the same id and content stay, a cell whose source alone changed gets one text edit (common prefix and suffix kept, so other people's cursors stay put), the rest are replaced. Changing one line of a cell on disk sends about 100 bytes.
  • Room shape. Room is I/O-free (runt's pattern, #141): the host feeds it frames and connection events and gets back Effects (frames for one client, all but the sender, or all; save requests; whether content changed). generation() and saved(generation, hash) let the host save in the background without losing edits made during the write. The same code can run in the apps through ganymede-ffi.
  • Server driver (ganymede-server/src/collab.rs): one task per room. It loads through Contents, autosaves a second after the last edit with an If-Match on the last hash, and polls the file every second (cheap last_modified check, then a hash, so its own saves are skipped). A save refused with 412 reloads from disk, as jupyter-collaboration's out-of-band handling does: the disk wins. Rooms without clients are saved and dropped after a minute.
  • Licenses. yrs is MIT; its new dependencies (arc-swap, async-lock, dashmap, event-listener, parking, smallstr) are MIT or Apache-2.0, all in about.toml.

Plan for the real implementation ​

  1. File ids that persist and follow renames (jupyter_server_fileid keeps them in SQLite; ganymede-contents already has SQLite for trust), and PATCH renames moving open rooms (Room::set_path).
  2. Watcher per #141 instead of polling: watch the parent directory, debounce, skip our own writes by hash. Keep polling as the fallback for file systems without events.
  3. Text files (jupyter_ydoc's YUnicode: a source Text), since JupyterLab with the extension opens every file through a room and a text file fails to load today.
  4. Kernel outputs into the room (#244): reuse ganymede-exec's NotebookRun to apply iopub messages to cells through Room::edit, streams appended to the output's Text, so outputs land with no client connected. Then JSD's POST /api/kernels/{id}/execute.
  5. Divergent saves: today the disk wins and unsaved room edits are lost when another program writes the file in the same second. Merge instead: reload into the room as a granular update on top of local edits, and refuse only when the same cell changed on both sides.
  6. One owner per file across processes (Mac server and iPad app on one iCloud file), the lease from runt's ADR.
  7. ganymede-ffi entry points for rooms, for the apps.
  8. A JupyterLab end-to-end test in e2e/ with the two extensions, like the Playwright run above.

2026-11-01, Agents docs page (#241) ​

  • New Agents page: nb-cli against ganymede serve, Claude Code setup (nb-cli's notebook-cli skill and a CLAUDE.md rule against Read/Write on .ipynb), journaling conventions, recording steps that ran outside the kernel, checking with nb search --with-errors and ganymede execute, and what doesn't work yet.
  • Flags were checked against nb-cli's source rather than its README: cell update takes --type, --source unescapes \n, and nb execute's default timeout is 30 seconds.
  • Only the jpserver-<pid>.json part depends on unreleased behaviour, so it is its own subsection with the Unreleased note; nb-cli itself works against v0.4.0.
  • Review fixes: nb-cli 0.0.10's nb execute exits 1 and stops at the first failing cell (the page first said 0); JupyterLab without collaboration doesn't notice disk changes until you save, and Overwrite then drops the agent's cells; --source unescapes \n, so code goes in on stdin.
  • main now serves collaboration rooms, which nb-cli probes for and would edit through. The validation predates them, so the page describes v0.4.0's contents-API path and #278 re-runs it on main.
  • Second review: nb-cli reads .jupyter/cli.json from the current directory only and falls back to local mode without it, and nb create checks for an existing notebook locally before writing to the server, so the page says to run nb from the server's root dir. The rooms-on-main sentence is an Unreleased note so the release step lists it.

2026-11-01, Line coverage in the job summary (#255) ​

A new coverage job in ci.yml runs cargo llvm-cov --workspace on Linux with cdp-kernel, ipykernel and jupyter_server installed as in the e2e job, so the end-to-end tests count. The ganymede binaries those tests start are instrumented too: cargo llvm-cov builds the workspace binaries with coverage on and sets LLVM_PROFILE_FILE for every child process. A server stopped with SIGKILL writes no profile, so its lines can read as missed.

scripts/coverage-summary.mjs turns the JSON report into the job summary: the total, a table of changed .rs files (the diff against the pull request's base), and a table by crate. Nothing fails on a number; the reviewer reads the changed-files table to see what new code no test ran.

cargo-llvm-cov comes from taiki-e/install-action, already pinned for cargo-about, so no new action. The job is a separate one so e2e keeps running uninstrumented binaries.

2026-11-01, A stalled crash test hung e2e for 43 minutes (#265) ​

a_crashed_ipykernel_restarts_as_under_jupyter_server hung on one run until the job was cancelled; a re-run passed. crash() bounded only the frames it read after the crash cell. Its HTTP calls (a reqwest::Client with no timeout), websocket connects and the first exchange could wait forever, and so could the test server's Drop, which sent SIGTERM and then called wait() with no limit. The orphans left at cleanup (the test binary, jupyter-server and python) fit a jupyter_server that didn't exit on SIGTERM while its kernel was restarting.

Now each step in crash() runs under within(secs, step, ..), which fails the test with the name of the step that stalled. The HTTP client has no timeout of its own, which would fire first and lose the step name. exchange gives up after 60 s without a frame; crash() calls it as exchange_step, which puts the step name in that message too, under a 180 s bound on the whole exchange (on the jupyter_server path it covers the restart). Drop for Server kills the server with SIGKILL if it hasn't exited 10 s after SIGTERM. Kernels run in their own process groups (Ganymede's process_group(0), jupyter_client's start_new_session), so a killed server's kernel can still be left behind; putting test servers in their own group wouldn't reach them, and would keep Ctrl-C from reaching the servers.

The e2e jobs have a 15-minute limit: over the last 40 green runs they took at most 5.

The flake itself isn't reproduced. The next time it happens, the panic message says which step stalled.

2026-11-01, document model: watcher, merges, file ids (#141) ​

Roadmap step 6, on the rooms from the spike (#243, the yrs document rooms entry of 2026-10-31): items 1, 2 and 5 of its plan.

  • Watcher. ganymede-server/src/watch.rs: one notify watcher per server, on each open file's parent directory, not the file, so a save by temp file and rename (ours and most editors') is still seen. Access events (inotify's IN_ACCESS) are dropped. A room debounces events by 500 ms and then reads the file; a hash equal to its own last save is ignored. It still polls every 10 s, in case a file system drops events, and every second where there are no events: iOS and other targets build without notify, and the embedded server has no root on disk.
  • Merge, not "disk wins". The spike reloaded from disk when the file changed, losing unsaved room edits. Now ganymede_documents::merge does a three-way merge by cell id, with the file as last read or written as the base: one-sided changes, additions (kept after the cell they followed) and deletions all apply; a cell both sides changed, or one deleted and the other changed, goes to the disk, and the server logs it. Cell order: whichever side kept the base order of the shared cells takes the other's; two different reorders take the disk's. A save refused with 412 merges and retries, up to three times. Notebooks before 4.5 have no ids and still take the disk outright.
  • Comparing as JSON. The merge compares cells as serde_json values of the Notebook, the same form schema::set writes, so a cell round-tripped through Yjs compares equal to the file's.
  • File ids (ganymede_contents::FileIds): SQLite at <jupyter data dir>/ganymede_file_ids.db, keyed by root and API path, not jupyter_server_fileid's database (its schema tracks inodes, and we don't want two writers on it). PATCH and DELETE on contents move or drop ids for a file or a directory's subtree, and open rooms take the new path (state.path) and re-watch. A file moved by another program gets a new id when next opened.
  • Not done: one owner per file across processes (#272). With merges, two servers on one file converge through it rather than overwrite each other, so this is less urgent than it was.

notify 8 is CC0-1.0; on Linux it adds inotify (ISC), mio, walkdir (Unlicense/MIT); on macOS objc2-core-services. All are in about.toml's accepted list.

2026-11-01, server-side execution into rooms (#244) ​

jupyter-server-documents' (JSD) POST /api/kernels/{kernel_id}/execute, read from its execution_handlers.py and rooms/ynotebook_room.py (main, 2026-10-07), and nb-cli's client of it (ydoc_execution.rs).

  • Contract. Body {document_id, cells: [{cell_id, source_hash}], client_id, request_id, previous_request_id}; source_hash is MurmurHash2, seed 0, of the UTF-8 source, as a decimal string (ganymede_documents::murmur2, checked against JSD's Python). All cells are checked before any is touched, then cleared, marked execution_state: "running" and queued; 200 null. 409 {"error": "source_mismatch", "cell_id"}, 408 when previous_request_id isn't queued within 10 s, 400 otherwise (a markdown cell, an unknown cell, no room). nb-cli probes for the endpoint with an empty body and takes a 400 as "present".
  • Atomic batches come free: the room's task checks and queues in one step, and nothing else touches the room meanwhile.
  • Completion edge. nb-cli treats a cell as done only when execution_state is idle and execution_count changed in the same update; a cell skipped after an error gets idle alone. So counts are written with idle at the end, not on execute_input (JSD does the same, to stop JupyterLab clearing [*] early).
  • Worker. One task per room runs batches in order through ganymede-exec's NotebookRun (display updates across cells, clears with wait, stream coalescing at the end), on a list of the cells it ran, so a display update reaches an earlier cell. It forgets them after 256. Outputs go to the room through schema::set_outputs, which keeps unchanged outputs and appends to a stream that grew, so a kernel printing a line sends a line. While a cell runs, consecutive streams are merged as JupyterLab's output area merges them.
  • Stop on error. A failed cell stops the rest of its batch, as stop_on_error does for JupyterLab's Run All. JSD runs every queued cell regardless; nb-cli sends one cell per request, so it can't tell.
  • No client needed. The endpoint opens the room if it isn't open, and a room with cells queued or running doesn't close. Outputs are saved with the notebook a second after the last one.
  • /api/fileid/index (JSD) and jupyter_server_fileid's /api/fileid/id and /api/fileid/path are served over FileIds. Answering index is what makes nb-cli treat the server as JSD (server_writes_outputs) and use the endpoint.
  • Not done: JSD's /api/outputs service (outputs kept outside the document), its session-bound kernel (here the request names the kernel), and input requests (refused, as JSD's allow_stdin=False).

2026-11-01, ganymede-ffi without processes on iOS (#208) ​

  • ganymede-ffi depended on ganymede-server with its default features, so the iOS slices of the XCFramework compiled in ZeroMQ and subprocess launching, which an iOS app can't use. The 2026-10-19 note said #160 removed them; it added the seam but left the FFI crate's features alone.
  • The FFI crate now has zmq, subprocess and gateway features, on by default and passed through to the server. build-xcframework.sh builds the iOS targets with --no-default-features --features gateway; zeromq is no longer in that build's dependency tree.
  • Turning the features off alone would have broken the iPad app: it starts the embedded server with no gateway_url when its kernels run in the web page, and run_with fails at startup when it has neither a default provisioner nor one given. The FFI crate now passes an empty kernelspec source and a provisioner that refuses in that case, so the server starts and lists no kernels.
  • Registering an in-app kernel through the C ABI is split into #266, to be designed with the native kernel.
  • CI builds the iOS slices through the script on macOS, and runs cargo test -p ganymede-ffi --no-default-features --features gateway so the no-kernels path (starts_with_no_kernels_without_processes) is tested. The FFI crate asks the server whether a gateway is configured (serve::gateway_configured) rather than repeating the check.

2026-11-01, ganymede mcp (#245) ​

Notebook tools for coding agents over MCP, in Rust with rmcp 3.8 (Apache-2.0; its new dependencies are MIT or Apache-2.0). Every other notebook MCP server needs Python.

  • One server, two transports. The tools live in ganymede_server::mcp and are served at /mcp (streamable HTTP, behind the API's auth; rmcp's own Host check is off because the server's allow_remote_access check already runs). ganymede mcp on stdio is a proxy to some server's /mcp: --server, else a running serve --mcp whose root holds the cwd (from jpserver-*.json; the probe is a session-less GET /mcp, which rmcp refuses with something other than the 404 of a server without it), else run_with in the same process on port 0 with Startup::stop, so nothing goes to stdout or the runtime dir. The issue suggested a background serve --port 0 with idle culling; in-process ties the server's life to the agent's connection and needs no culling.
  • Proxy. One thread per message so a long cell_run doesn't block a cancellation; initialize alone runs inline, since it sets the Mcp-Session-Id the rest need. Answers come back as SSE even for one message in rmcp's session mode (json_response applies only to stateless mode); sessions are kept because the client's name, from initialize, is the provenance by.
  • Rooms, not files. Reads and edits run as closures on the notebook's room task (Cmd::With), and recorded runs go through the #244 execution queue (cells without a hash check), so a person watching in JupyterLab or ganymede-ui sees the agent's cells and outputs live. Scratch runs (record: false) use the kernel directly and touch nothing.
  • Saving on stop. A room saves 1 s after its last edit, and stopping the server dropped edits younger than that. Collab::flush_all saves every dirty room after the listener closes; ganymede mcp waits for its server to stop before exiting. This fixes ganymede serve too.
  • rmcp quirks. A request without Host is a 400 even with the allowed-hosts check off; real clients always send one.
  • --read-only, --no-execute, --images can't be passed to a running server per connection, so they make ganymede mcp start its own server.
  • Cell ids on 4.4 notebooks. The room makes ids up at load, and saving 4.4 strips them, so a room that retired after a minute with no client came back with new ids, and ids from an earlier read stopped working. Each MCP connection now joins the rooms it uses as a client that reads no frames (collab::Hold), so they stay open until it ends.
  • Proxy and dropped streams. A request whose event stream ends before its answer (the server stopped during a long cell_run) gets a JSON-RPC error; before, the client waited forever.
  • Sessions end. rmcp ends a session after 5 idle minutes and answers 404 after that; a restarted server knows no sessions at all. /mcp now keeps idle sessions for an hour (the limit stays, for HTTP clients that never send DELETE), and the proxy keeps the client's initialize and, on a 404, starts a new session with it and retries once. Made-up 4.4 ids last only as long as the session.

2026-11-01, jupyterlab-lsp interop test in CI (#257) ​

validation/lsp.mjs opens a TypeScript file with a type error and a Python notebook that uses an undefined name in JupyterLab 4.6.5 with jupyterlab-lsp 5.3.0, and waits for CodeMirror's lint mark on each: n from typescript-language-server, undefined_name from pyright. The notebook goes through the virtual documents path, the .ts file doesn't. scripts/test-lsp.sh runs it on jupyter lab with jupyter-lsp 2.3.1 (the oracle) and then on ganymede serve, and the new lsp CI job runs the script.

Both sides get the same two specs from config, with jupyter-lsp's autodetect off, so the oracle doesn't pick up other servers that happen to be installed. Ganymede serves the pip-installed JupyterLab and extension through --static-dir and --labextensions-path, so both run the same frontend bundle and nothing is downloaded from PyPI.

The first run passed on both sides, but on Ganymede the page threw TypeError: i.getForeignDocuments is not a function about 13 times per document, and under jupyter-lsp it threw nothing (#274). jupyterlab-lsp's package.json lists the core plugins it replaces under jupyterlab.disabledExtensions (@jupyterlab/notebook-extension:language-server and three more), and jupyterlab_server adds every enabled extension's list to the page's disabledExtensions. Ganymede read only page_config.json, so the core language-server plugins ran next to jupyterlab-lsp's. The page config now merges those lists, with page_config.json on top (true adds a name, false takes one out, and a disabled extension disables nothing), as jupyterlab_server does. The test now fails on any page error. Without the fix it fails.

The first CI run of the job failed on Ganymede only: the notebook opened with "No Kernel", so jupyterlab-lsp never learned its language. jupyter finds ipykernel's spec in sys.prefix/share/jupyter; Ganymede doesn't know the prefix, and locally a spec in ~/.local had hidden that. The script now passes the prefix's share/jupyter as --kernelspec-root.

2026-11-01, Language servers in job objects on Windows (#263) ​

  • child.kill() on Windows ends one process. An npm-installed language server runs as cmd.exe running a .cmd shim, so killing the child left node running. Language servers now start suspended, go into a kill-on-close job object, and the job is terminated when the server stops, as kernels' are.
  • The job code stays in ganymede-kernel-host (process::job, now public) and ganymede-lsp depends on the kernel host only on Windows, with default features off, rather than copying the unsafe Win32 code.
  • Windows still has no CI runner (#60). cargo clippy --target x86_64-pc-windows-gnu -p ganymede-lsp -p ganymede-kernel-host checks the Windows-only code from Linux; the server crate needs a MinGW C compiler for ring, so it can't be checked that way.
  • job::adopt now returns an error when it can't resume the process, and both callers kill it: a server left suspended would take initialize and never answer, with no timeout to report it.
  • Feature unification: the server always depends on ganymede-lsp, so every Windows build of it now compiles ganymede-kernel-host with subprocess, even with the server's own features off. Nothing more is routed. If that matters, the job code can move to a small leaf crate.

2026-11-01, One copy of each document for a shared language server (#262) ​

  • Two tabs on one notebook each send didOpen and each send every edit. Relayed as they were, the language server opened the document twice and applied each edit twice, and so did the .virtual_documents shadow file. jupyter-lsp behaves the same.
  • Per-client URIs (.virtual_documents/<client>/...) would have fixed it, but they need rewriting URIs both ways, including in diagnostics sent to every client, and would run a server's analysis once per tab. Instead the relay keeps each client's text and one server copy per URI (documents.rs): a second didOpen or a duplicate didChange is dropped when the server's text already matches, an edit made against an older text is sent as the full text, versions are the relay's, and didClose goes out when the last client closes or disconnects.
  • The shadow file is now the server's copy, written whole, instead of each message's first change applied to whatever was on disk. The document lock is held across the disk write and the send, so the disk and the server see changes in the same order.
  • Still shared: request ids. Each client numbers its own requests and every response goes to every client, so two tabs' ids collide (#269).
  • Review fixes: a client of an ended server process no longer resets the new process's documents (only a newer generation resets them); a didChange from a client that never opened a document others have is dropped instead of parting the two copies; when the client whose text the server has leaves, the server gets a remaining client's text.
  • Tabs that don't share edits each send different text, so the server flips to the full text of the tab that changed last. That beats applying both tabs' ranges to one text, which is what main did.
  • The relay's text model now decides what the server gets, so its line counting (\n only) and UTF-16 positions matter more: #276.

2026-11-01, Kernels started together got the same port (#260) ​

parallel_starts failed on macOS with KernelDied on the first execute, after all four kernels had started. The cause was the way ports are picked. allocate_ports binds five random ports to check that they're free, then releases them for the kernel. Once released, a port can be picked again by another start running at the same time in this process, before the first kernel has bound it. Two kernels then get the same port, and the one that binds second fails.

ipykernel dies on the spot, before kernel_info, so the engine's start retry (#225) covered it. cdp-kernel retries the bind for 5 s instead (zmtp.js, LISTEN_RETRY_MS). It binds shell, control and iopub, answers kernel_info, and the start succeeds. When its heartbeat or stdin port never frees, it exits, and the next request gets KernelDied. Holding the port with a listener reproduces this: cdp-kernel exits after about 5.2 s.

allocate_ports now reserves each port it hands out for 5 minutes in a process-wide map and won't hand it out again in that time. This is the job LocalPortCache does in jupyter_client. The new concurrent_allocations_never_share_a_port test makes 400 concurrent allocations. Without the reservation it finds a repeated port every time; with it, it never does. Other processes can still take a port between the check and the kernel's bind, and only ipc transport closes that gap. parallel_starts now names the kernel in its panic.

2026-11-01, rooms against a jupyter-collaboration client (#258) ​

crates/ganymede-cli/tests/collab.rs runs e2e/collab/ydoc_client.py against ganymede serve: jupyter_ydoc 4.2.0's YNotebook on pycrdt 0.14.10, with pycrdt's sync messages over websockets, which is what jupyter-collaboration builds its server and Python clients on. Python is a test oracle, as in the rest of the e2e job.

  • The client syncs, reads the same cells as the file, then edits a cell's source Text and appends a cell through YNotebook.append_cell, while the script also rewrites the file with a change to another cell. The room merges the disk change (#141), saves, and the client and the file end equal with all three changes. Passed five runs in a row locally, about 2.5 s each.
  • jupyter_ydoc reads the room without complaint: our schema (no language_info or kernelspec defaults, integers kept as integers) is one it accepts.
  • The client sends its own updates only, not echoes of what it applied, by observing the doc with a flag set while applying the server's.
  • Skips with skipping: when no Python has the three modules, so the e2e job's "Nothing skipped" check makes it mandatory there; the job now installs them, pinned in E2E_PYTHON_PACKAGES.

2026-11-01, JupyterLab and nb-cli validation run in CI (#256) ​

validation/jupyterlab.mjs and validation/nb-cli.sh only ran by hand. The workstation job now runs both, with Python hidden:

  • jupyterlab.mjs on the ganymede lab server the job already starts: open a notebook, run a TypeScript cell on cdp-node, save, and check the saved output. The script's defaults are Python, so the job sets CODE and EXPECT.
  • nb-cli.sh on cdp-node, when NB names an nb-cli binary. CI builds nb-cli NB_CLI_VERSION (0.0.10) with cargo install --locked and caches the binary by version. It is a test tool, not a dependency of the product. With Python hidden, this also shows nb-cli's remote and gateway modes need no Python once --server/--token are given. nb create does run python3 -c 'import jupyter_core.paths ...' (then python) to find kernelspecs, and falls back to the platform dirs when that fails. The first CI run caught it through the workstation script's shims and failed "No Python". That probe is nb-cli's, so nb runs through a wrapper whose PATH leaves the shims out, where python isn't found, as on a machine without it. The ganymede serve that nb-cli.sh starts keeps the shims.
  • nb-cli 0.0.10 uses jupyter-server-documents' API when the server answers POST /api/fileid/index (#284 added it), so on main it edits through a document room and runs cells with POST /api/kernels/{id}/execute, not the contents API. #284 changed nb-cli.sh's header but not its checks, and no CI ran the script, so on main it failed at once: it still expected nb connect to report direct mode. It now expects Mode: collaborative. Its checks of the file on disk poll for up to 5 s, since the room saves shortly after a change rather than on each request.
  • Room mode exposed two nb-cli gaps. It counts cells and resolves indexes such as --cell-index -1 from GET /api/contents, which reads the file, while its edits go through the room. Three nb cell add calls inside the room's 1 s save delay all inserted at index 1, and the following delete refused ("Cannot delete all cells"). The script now waits for each edit to reach the file. And nb-cli's yrs 0.27 reads a Yjs integer as a float, so it drops every execute_result it reads from the room (#296). READ_CODE now prints, and execution counts are checked on disk. nb-cli's empty-body probe of the execute endpoint gets the 400 it expects, so the script allows that one.

python3 isn't covered here because the workstation job has no Python; nb-cli on ipykernel stays a by-hand run.

2026-11-02, Language server document copy follow-ups (#277) ​

Follow-ups to the relay's one-copy-per-document table (#262):

  • A didChange that leaves the sending client's own text unchanged (an empty contentChanges, say) is dropped. Before, a tab that was behind sent its older text in full and the server flipped to it.
  • When the client whose text the server has leaves, the server gets the text of the remaining client that opened or changed the document last, as the docs said, rather than the lowest client id. A per-table clock orders opens and changes.
  • A change whose range is present but not a range is skipped instead of being applied as a full replacement, and the server then gets the full text the relay applied, so it can't read that change its own way.
  • A client's cleanup on drop runs on the runtime it was created on, so it still runs when the client is dropped outside a runtime.
  • Tests: a relay test for the generation check in send (a client of an ended server sends and leaves; the new server's document is untouched), and the two-tab test no longer sleeps: each tab's cleanup sends under the documents lock, so once the last didClose arrives everything the tabs sent has. The check in Drop has no test: client ids keep counting across restarts, so an old client's disconnect finds nothing in the new table either way.

Left open in #277: mapping the relay's document versions back to each client's numbering, and resyncing to the requesting tab's text before a position-carrying request. Both need a look at what jupyterlab-lsp does with versions and positions first.

2026-11-02, Language server line ends and position encoding (#276) ​

The relay's copy of each open document applies clients' ranges itself, and sends its text in full when a client's edit no longer fits. So its position arithmetic has to match the server's, or a resync overwrites the server's correct copy with a wrong one.

  • LSP ends lines at \r\n, \r and \n. The copy counted \n only, so in a document with a lone \r every range after it landed a line late.
  • character counts the encoding the server chose in its initialize result (capabilities.positionEncoding), UTF-16 when it names none. The router already sees that response, since it maps each response back to its client, so it notes the choice and the document copy reads it from there. Each new server process starts back at UTF-16.
  • A server picks UTF-8 or UTF-32 only when the client offered it in general.positionEncodings. The latest initialize answer wins, so every client of one process is counted the same way.
  • Every client's initialize reaches the one server process, and a server may answer the second with an error. Only a result changes the encoding. The document copy isn't rebuilt when the encoding changes, so text applied under one encoding would be read under another; that takes a second successful initialize choosing differently, which a conforming server doesn't do.

2026-11-02, Language server requests per client (#269) ​

  • One language server process serves every tab, and each jupyterlab-lsp tab numbers its requests from its own counter, so two tabs send the same ids. The relay (ganymede-lsp/src/router.rs) now gives each client request a relay id on the way to the server and sends the response back to the client that asked, with its own id. $/cancelRequest is rewritten to the relay id. jupyter-lsp still broadcasts everything.
  • A request from the server (workspace/configuration, client/registerCapability) goes to the first connected client, and only that client's answer reaches the server. If that client leaves first, the request is put to the next one.
  • The workspace builds serde_json with preserve_order, so a re-serialized message keeps its key order and id isn't first. The relay test's fake server is a Perl one-liner (both CI runners have Perl), since cat can't answer a request.

2026-11-03, Rooms interop test robustness (#290) ​

Follow-ups from #288's review, all in the jupyter_ydoc interop test:

  • e2e/collab/ydoc_client.py bounds its HTTP call (timeout=TIMEOUT) and websocket open (open_timeout), and both skip http_proxy: an opener with an empty ProxyHandler, and proxy=None on connect (websockets 15 and later read proxy settings from the environment). Older websockets reject proxy=, so the module probe in collab.rs also requires websockets 15 or later.
  • until() stops as soon as the pump or send task has died, and says why: the task's exception, or the websocket's close code and reason. Before, a dead pump showed only as a timeout 20 s later.
  • The cancelled tasks are awaited, so asyncio doesn't warn about tasks destroyed while pending.
  • collab.rs prints its skip notice to stderr, fails when GANYMEDE_E2E_PYTHON is set but can't import the modules, and wraps the server in KillOnDrop before reading its first line, so a failed read still stops it. KillOnDrop moved into tests/common; lab.rs, ui.rs and lab_start.rs had their own copies.
  • The three CI jobs that install the oracle set GANYMEDE_E2E_PYTHON to the python they installed it into, so a broken install fails with the import error instead of a skip (which the e2e job's "Nothing skipped" step would also catch, without saying why).

2026-11-03, Crash test failures say what arrived (#285) ​

a_crashed_cdp_kernel_restarts_as_under_jupyter_server stalled once in CI for 180 s on "running a cell on the restarted kernel": frames kept coming, but never both the execute_reply and idle for that cell. The panic didn't say which server it was running against or what the frames were, and 27 local runs (the cdp test alone and the whole server suite) didn't reproduce it.

So the failure now carries the evidence. crash() prefixes each step with the server (jupyter_server or ganymede). exchange_step takes an overall deadline, and when it or the 60 s per-frame limit runs out it reports whether the reply and idle came, this request's iopub message types, and a count of the other parents' messages by channel, type and execution state. The outer within bound is 200 s so the 180 s deadline inside fires first with that report.

The first CI run with the report caught it on macOS, under jupyter_server: running a cell on the restarted kernel: no reply and idle in 180 s (reply: true, idle: false, this request's iopub: [], other messages: {}). The shell reply came; not one iopub message did, for this request or any other, so the new websocket got none of the restarted kernel's iopub. That is the oracle's restart path. The test already doesn't wait for idle from jupyter_server after the crash (it can leave the kernel busy), so on that side the exchange now ends at the reply, and Ganymede still has to send idle. If Ganymede ever stalls the same way, the report names it.

2026-11-03, Bounded awaits in the server e2e tests (#275) ​

crates/ganymede-cli/tests/server.rs bounded each step of crash() with within, but the other tests awaited HTTP calls and websocket connects with no limit, so a stall waited out the job's 15-minute timeout with no message.

The bounds now live in the shared helpers, so every test gets them: Client::call and Client::raw fail after 75 s naming the method and path, ws_connect fails after 20 s naming the step, and exchange bounds its sends. wait_ready gives up after 75 s, retrying an attempt that hangs after 5 s. A call's bound has to sit above the servers' 60 s kernel startup timeout, or a slow POST api/kernels fails as a stall before the server reports its own outcome; crash()'s outer withins went from 60 s to 90 s to stay above it, so the inner, more specific message is the one a stall shows.

crash() waiting for restarting treated any frame other than text, such as a Ping, as a closed socket. It now skips pings, pongs and binary frames, under one 30 s deadline for the whole wait, so skipped frames can't hold it open.

2026-11-03, ganymede-ffi start gives up (#332) ​

ganymede_server_start waited on recv() for the server thread's first report. Anything that stalled run_with before it bound the port would have held the app's start forever with nothing to show. It now waits 30 seconds (START_TIMEOUT) and returns an error the app shows.

The stuck thread can't be joined, so it is left running. Before returning, the call puts a stop message in the thread's stop channel. The message stays buffered after the sender is dropped, so if the server does listen later, serve_until reads it and stops. Dropping the sender with nothing sent would not work: stop.recv() then yields None, and the Some(()) arm of the select! never fires.

What prompted it was a Thread Performance Checker report from the Apple app, with the backtrace in this recv. That report was about priority, not a hang: the app waited on the server thread from a user-initiated task, and Rust threads run at Default QoS. ganymede-ui#192 starts the server at .medium priority instead.

2026-11-03, /files sandbox CSP (#298) ​

GET /files/{path} served .html and .svg as active content on the server's own origin. A file in the notebook folder, opened from a Markdown link or "Open in New Browser Tab", could then read the token in session storage and the agent's keys in web storage. In the Mac and iPad apps it also passed the agentKeys handler's origin check.

jupyter_server's FilesHandler appends sandbox allow-scripts to its Content-Security-Policy, which gives the document an opaque origin: scripts still run, but storage, cookies and same-origin fetches are cut off. Ganymede sends the same directive on every /files response. It does not send jupyter_server's base frame-ancestors 'self' and report-uri parts, since Ganymede sets no CSP on other routes and has no report endpoint.

2026-11-03, grouped ganymede --help (#320) ​

The top-level help listed fifteen commands in no order, with summaries that ran to two or three wrapped lines, and ended in one long paragraph of exit statuses. It is now grouped (Run code, Notebooks, Servers, Setup), coloured as cargo's is, and ends with examples and an exit-status table.

  • clap derive splits a doc comment at the first blank line: the first paragraph is the summary that command lists show (about), the rest shows only in that command's --help (long_about). A one-paragraph doc comment is both, which is how the long summaries got into the lists. Write the first paragraph as one short line.
  • clap 4 has no per-subcommand headings, so help.rs builds the top-level template at run time from GROUPS, taking each summary from the command itself. main parses with help::command() instead of Cli::parse(); the subcommands keep clap's own layout.
  • Tests: every command is in exactly one group, and every summary in the command tree fits in 66 characters, so a new command or a long summary fails CI rather than the layout.
  • Indented lines in a doc comment are reflowed into the paragraph; examples that must keep their lines go in after_long_help.
  • ANSI codes written into the template are stripped like clap's own when stdout is not a terminal, so piped help stays plain.

2026-11-03, The ganymede-journal plugin (#315) ​

plugins/ganymede-journal/ is a Claude Code plugin, listed in this repo's .claude-plugin/marketplace.json (marketplace ganymede): the ganymede mcp server, a journal skill, a journal-reviewer agent, and four hooks in one Node script. Built on #313's read marks.

  • Hooks need the server the agent uses, from another process. A shared ganymede serve --mcp is found by its jpserver-*.json, but the server ganymede mcp starts for itself was unreachable. It now writes ganymede-mcp-<pid>.json (url, token, root) while it runs, which only ganymede mcp call reads: another ganymede mcp must not share a server that stops with its agent. ganymede mcp call TOOL ARGS opens a session, calls one tool, prints its text, ends the session.
  • A hook's edit comes from its own MCP connection, so it would show up in the agent's next notebook_read(since) as someone else's. cell_add takes mark, the agent's read mark, and moves it past the new cell, as the agent's own edits do.
  • Answers to the issue's open questions. The plugin lives in this repo, next to the server it drives, so a PR changes both together. The Bash hook records only commands ending in # journal (GANYMEDE_JOURNAL_RECORD=all records every one): recording every call would fill a journal with ls and builds. Recorded cells are Markdown with fenced blocks, which renders everywhere and matches cell_add(mode: recorded).
  • Stop fires at the end of every turn, not only at "done". Blocking every turn while the journal is dirty would force a restart-and-run-all before each question to the user, so it blocks once per round of edits and the reason lets the agent say it is only pausing.
  • Plugin skills are named /<plugin>:<skill>, so the skill is /ganymede-journal:journal, not the issue's /ganymede:journal, which would need the plugin itself named ganymede.
  • MCP tools from a plugin are mcp__plugin_<plugin>_<server>__<tool>; hook matchers and the reviewer's tools must use that full name. The hooks also match mcp__ganymede__*, for claude mcp add ganymede.
  • Hooks are plain .mjs, not .ts: Node strips types only from 22.18 and 23.6, and a hook must run on whatever node is on PATH.
  • claude plugin validate --strict passes for the plugin and the marketplace (it warns about the missing icon), and claude plugin install ganymede-journal@ganymede installs it from a local checkout. The hook tests run in CI against this build's ganymede mcp.

2026-11-03, Language server requests follow the requester's text (#277) ​

The last two items of #277, after #301:

  • Requests against the wrong text. With two tabs that don't share edits, the server has the text of the tab that changed last, so a hover or completion from the other tab was answered against text it doesn't show. Now a request with an id, a textDocument/ method and a document the requester has open is preceded by the requester's full text when the server has another's. The request waits for the documents lock and holds it until it is sent, so no other tab's change comes between. This resync doesn't count as the tab's own change: when a tab leaves, the server still gets the text changed last.
  • Versions. The relay numbers versions itself, so a version the server echoes back doesn't match a client's numbering. jupyterlab-lsp 5.3.0 never compares them: diagnostics ignore PublishDiagnosticsParams.version (a comment in features/diagnostics/feature.ts says so), the edit applicator for rename and code actions has only a TODO to check TextDocumentEdit.textDocument.version, and highlights compare the client's own versions before and after its request. So versions stay the relay's; mapping them back would be work no client reads.

2026-11-03, LSP resolves go by their item's document (#339) ​

The LSP relay resynced a */resolve against the document of the client's latest request of the matching kind, which isn't the one that returned the item when a tab completes in one document and then another (one connection serves every notebook in a browser tab).

The router now numbers the document a textDocument/completion, codeAction, codeLens, inlayHint or documentLink request named, and wraps each item's data in the answer as {"ganymede.doc": <n>, "data": <server's data>}. A number, not the URI, because a completion list can hold thousands of items. A client sends the item back unchanged when it resolves it; the session reads the document from the mark before the router takes it off and puts the server's own data back. A resolve's answer is marked too, so a resolved item resolved again keeps its document. A completion list's itemDefaults.data is marked in its place, and items without data are left to inherit it, so the default isn't copied into each item. Commands in a code action list are left unmarked, and data the router didn't mark passes through as it is. An item that comes back unmarked falls back to the client's last request of that kind, as before.

2026-11-03, LSP resync before resolve requests (#334) ​

#330 gave the server the requester's text before a request that names a textDocument. Follow-ups such as completionItem/resolve carry only the item the server returned, so they went against whichever tab's text the server had. jupyterlab-lsp sends a resolve for the selected completion item, and the server's additionalTextEdits (auto-imports) come back with positions in that text.

The relay now remembers, per client and per kind of request, the document its last textDocument/completion, codeAction, codeLens, inlayHint or documentLink request named, and treats the matching */resolve as a request about that document. One slot per client wasn't enough: jupyterlab-lsp shares one connection per server across the notebooks in a browser tab, so a hover on another notebook between a completion and its resolve would have retargeted the resolve. Call and type hierarchy requests carry their document in params.item.uri, and workspaceSymbol/resolve in params.location.uri, so they use that instead. The resolve methods don't echo the URI reliably (data is the server's own field, free-form), so the relay doesn't read it.

A client's last named document is forgotten when it disconnects. The unparsed-message filter in LspClient::send now also passes these methods, so other messages still skip the JSON parse and the document lock.

2026-11-03, install the latest main build (#343) ​

Thomas asked for install.sh to install the latest build of main, for quick tests without a source checkout. Only the core binary; the apps come later and don't use install.sh.

Main builds weren't downloadable: release.yml built binaries on PRs and manual runs only as workflow artifacts, which need a GitHub login to download. The simplest public place is a rolling prerelease:

  • release.yml now also runs on pushes to main (docs-only pushes skipped, newer pushes cancel older ones). Its main-build job uploads the archives to the main-build prerelease with --clobber, so the download URL is fixed. --clobber deletes each asset before uploading its replacement, so a download during an upload can 404 or fail its checksum; with --main, install.sh's errors say to retry. Builds on main cancel older ones per target (job-level concurrency), but the upload job queues instead, so a cancel never leaves the release half updated.
  • Prereleases are skipped by /releases/latest, so the plain install is unchanged. --latest=false makes that explicit.
  • Deleting and recreating the release each time would move the tag cleanly but leave a window with no files to download. So the release stays and the tag is moved with a ref PATCH. GITHUB_TOKEN has no workflows permission, and GitHub can refuse a ref update across commits that change workflow files, so the PATCH is best effort: on failure the run warns and the tag lags, while the notes and attestation name the real commit.
  • ganymede --version on a main build is X.Y.Z+main.<commit>: build.rs appends +$GANYMEDE_VERSION_BUILD when it's set. Without it the version is unchanged, so scripts and tests that parse --version still work, and the main build doesn't claim to be release X.Y.Z.

2026-11-03, cell_edit keeps what it replaced (#314) ​

Journaling revises a wrong finding where it stands instead of appending a correction (#311, the Ganymede Journal design). To keep that honest, cell_edit now appends the replaced source to metadata.ganymede.agent.history as {"source", "by", "at"}.

  • Bound: the last 10 entries per cell (mcp::HISTORY_LIMIT). Count, not bytes: a finding is short, and a code cell large enough to matter is better kept in git than in metadata.
  • An edit that leaves the source unchanged adds nothing, so cell_edit with run: true used only to re-run a cell leaves no noise: it doesn't touch the cell's provenance either. Replacing an empty source records no revision.
  • by/at on an entry name the edit that replaced the text, not the author of the old text. The cell's own by stays its first author, and its at moves to the latest edit, as before.
  • nbformat allows any metadata, so JupyterLab and nbformat read these notebooks unchanged; the test reads the saved file back with ganymede_nbformat.

2026-11-03, ganymede mcp reconnects (#297) ​

When the server ends the proxy's MCP session (a 404), the proxy starts a new one with the client's initialize. It used to clear the session id before sending that initialize, which caused two bugs:

  • If the new initialize failed (server briefly down, a 5xx), the id stayed empty. Every later message went without a session id, got a non-404 error, and never retried, so the proxy stayed broken until restarted.
  • A call sent during the reconnect read the empty id and went without a session, so it failed instead of waiting.

Now the stale id stays in place until the new session is ready, and an initialize (the proxy's or the client's own) goes without session headers. The new id is kept local until notifications/initialized has gone with it, so a half-started session is never published. Calls sent meanwhile get a 404 and wait on the reconnect lock, then see the new id and retry. If the start fails, a failed_starts count tells the calls that were waiting to fail too, instead of each sending its own initialize in turn; the next call's 404 tries again.

Tests: tests/cli.rs has a small scripted MCP server (FakeMcp) that forgets its sessions, refuses or slows initialize, and answers 400 to a call with no session id, so both bugs fail without the fix. A third test checks that calls waiting on a failed start fail together after one try. The test against a restarted real server stays.

Not changed: retries after a reconnect are not ordered against each other the way Ticket orders first sends. Calls that raced into a reconnect are retried in whatever order the lock releases them. The proxy's HTTP agent still has no timeout (a cell may run for a long time), so a server that accepts an initialize and never answers holds the reconnect.

2026-11-03, scratch runs don't store history (#294) ​

cell_run with record: false went through ganymede_exec::execute_cell, which always sent store_history: true. Scratch runs advanced the kernel's execution counter, so recorded cells showed gaps in their counts.

ganymede_exec::Options now has store_history (default true, as nbclient), and scratch runs set it to false. The fake test kernel now counts like ipykernel for stored runs: only they advance its counter (for unstored runs it reports the last count, where ipykernel reports the next one; nothing reads that number). Before, it counted every request, so it could not show the bug.

store_history: false is not a full sandbox: IPython's displayhook still sets _ (and Out for the current count) from an expression result, and every kernel keeps a scratch run's variables. docs/mcp.md and the cell_run tool description say so.

2026-11-03, Scratch runs interrupt on timeout (#323) ​

ganymede mcp's scratch runs (cell_run with record: false) go through ganymede_exec::execute_cell, which stops waiting at the timeout and leaves the code running: interrupting is the caller's job. Kernel::execute_with in ganymede-engine does interrupt; the MCP server didn't. A timed-out scratch while True: pass left the notebook's shared kernel busy, so every later run, recorded or not, queued behind it.

The scratch path now interrupts through the kernel manager and says so in the reply ("Interrupted the kernel.", or why the interrupt failed). Recorded runs are unchanged: they keep running after the timeout, since their outputs still land in the notebook. The fake kernel's sleep <ms> honours interrupts, which makes the test quick: without the interrupt, the second run would wait out a 30 s sleep.

The kernel is shared, and the timeout counts from sending the request, so a scratch run can time out still queued behind another run: a recorded cell that timed out and kept running, or a cell run from JupyterLab. An interrupt then stops that run instead (the review of #336 caught it). The scratch path now runs through NotebookRun::execute_cell_with and interrupts only when an iopub message for its own request arrived (execute_input is the first a kernel sends when it takes a request up); otherwise the reply says the code is queued.

2026-11-03, SVG outputs as PNG for the agent (#312) ​

MCP image content carries raster formats only, so with --images an agent got no picture of an Observable Plot or Vega-Lite chart, which render image/svg+xml. ganymede mcp now rasterizes an output's SVG to PNG for the tool reply when the output has no raster image of its own; the notebook keeps the SVG.

  • resvg, pure Rust (Apache-2.0 OR MIT, linebender), behind a new svg feature of ganymede-server, on by default. ganymede-ffi builds ganymede-server without default features, so the Apple apps don't carry it. resvg's default features are off: memmap-fonts would map font files with unsafe, and raster-images (PNG/JPEG/GIF inside an SVG) pulls in decoders the charts don't need. text and system-fonts stay on: axis labels are text, and without fonts they vanish. The font database loads once per process; the first SVG pays for scanning the system's fonts.
  • Caps. SVG sources over 2 MB are skipped before parsing. The PNG is scaled to at most 1,600 px on its longer side, which bounds the pixmap: a width="1e9" SVG can't allocate gigabytes.
  • No local files. usvg's default <image href> resolver reads any local path that exists, so an SVG output could make the server read /dev/zero until it ran out of memory, hang on a FIFO, or draw a local file into the agent's image. The renderer takes images only from data: URLs. Turning off resvg's raster-images feature doesn't stop the read; it only skips drawing raster formats.
  • Off the runtime. The first SVG scans the system's fonts and each one rasterizes up to 1,600 px square, so the tool calls build their image blocks in spawn_blocking; under serve --mcp the runtime also serves the server's websockets.
  • White background. Charts usually leave the background transparent, which many viewers show as black; a notebook shows white.
  • An SVG that doesn't parse, or has no size, adds no image; the text part of the reply still names the output's image/svg+xml, so the call doesn't fail.

2026-11-03, nb-cli on document rooms (#278) ​

nb-cli was validated on 2026-10-31, before Ganymede served document rooms, so it used the contents API. On main (debd6e8) nb connect reports Mode: collaborative: nb-cli edits cells through the room and runs them with jupyter-server-documents' execute endpoint. validation/nb-cli.sh passes on cdp-kernel and ipykernel; the workstation CI job runs it on cdp-kernel since #283, which adapted it to this path.

docs/agents.md and docs/clients.md now describe the room path, its live view in JupyterLab (with the collaboration extensions) and ganymede-ui, and nb-cli 0.0.10's two quirks on it: it resolves cell indexes from the file while editing the room, and it drops execute_result outputs read from a room (#296). The agents diagram names both paths, since the latest release still has only the contents API.

2026-11-03, parallel_starts keeps the kernels' output (#327) ​

parallel_starts failed again on macOS with cdp-node #2: kernel died, after #261 ruled out the port race. The test built its engine quiet, so the dead kernel's own stdout and stderr were discarded and the failure said nothing about why it exited.

The kernel host could already mark each line of a kernel's output with [kernel <first 8 of its id>] (LaunchOptions::prefix_output, used by the server), but Engine always launched with it off. EngineBuilder now has prefix_output(bool), and parallel_starts runs its kernels unquiet and prefixed. A failure names the kernel's connection file (kernel-<id>.json) and whether the process is still alive, so its lines can be found in the job's stderr. The kernel's output reaches the real stderr, not libtest's capture: the host writes to the stderr handle directly, so it shows in CI logs whether the test passes or fails. The cause of the exit is still open; this PR only makes the next failure readable.

2026-11-03, Changes since the last read (#313) ​

notebook_read and notebook_open end with @@read <mark>, and notebook_read(since: <mark>) lists only the cells others added, edited, moved or deleted since. Prerequisite for the ganymede-journal plugin's UserPromptSubmit hook (#315).

  • A mark is a snapshot, not the room's Yjs state vector. A state vector says which updates a reader has, but not who made the ones it lacks in a form we can filter on, and turning updates back into cell changes needs history the room doesn't keep (gc is on). A snapshot of (cell id, hash of type and source) per cell is cheap, and the diff is plain: ids missing, ids new, hashes changed, and moves as the ids outside the longest common subsequence of the shared ids.
  • "By others" works by moving the reader's own mark with its own edits: each MCP edit adopts the touched cell's new entry into the connection's mark, placed after its nearest predecessor that the mark has. That happens in the same room call as the edit, and reads set the mark in the same room call as the read, so a person's edit can't slip between them and be swallowed.
  • One mark per connection and notebook, with a stable name, and any connection can read with it. A hook in another process is a different MCP connection, so a mark per read would not follow the agent's own edits; a stable mark that every read moves does, and keeps the hook and the agent from both reporting the same change.
  • Marks are in memory (at most 4,096 per server, least recently used dropped). An unknown mark returns the whole notebook, which is what an agent needs after a restart anyway.
  • Outputs aren't compared: a person re-running a cell would otherwise show as an edit of every cell after a run-all.

2026-11-03, live outputs cost what they add (#286) ​

Server-side execution (#244) sent the room a cell's whole output list for every iopub message: the worker serialized every output, and schema::set_outputs re-encoded the room's outputs to compare them and ran strip_prefix over the whole stream. A print loop cost O(n²) in its output size on the room task.

Now the worker tracks how many of the running cell's outputs the room has (LiveOutputs in execute.rs) and sends only the new ones as RoomCmd::Append. schema::append_outputs merges a stream into the stream before it by reading only that output's output_type and name, then appends to its YText. A clear or a display with an id still resends the whole list, as before. A clear_output(wait) changes no output when it arrives, so ganymede-exec reports no changed cell for it; the handler has to note every clear itself, or the next output (one output replacing one) looks like nothing new and the live view freezes until the cell ends. The first update of each run also resends, since the room may still show outputs from before it.

yrs has its own quadratic term: Text::insert walks the text's blocks from the start, and each insert in its own transaction adds a block, so N single-line appends cost O(N²) in yrs (Yjs avoids this with search markers). So the room loop also merges Appends already queued for the same cell into one edit. When the room falls behind a fast loop, it makes fewer, larger edits.

Measured with the fake kernel's new lines <n> cell (one stream message per line), release build: 20,000 lines finished in 1.6 s. On main, the same run had not finished after 60 s.

2026-11-03, room saves while its file keeps changing (#347) ​

  • A room that reloaded a settled file change pushed its autosave back each time, so a file rewritten every 0.5 to 1 s (or a loaded CI runner that stalled past the 500 ms debounce) kept the room's own edits from ever reaching disk. The never-settles test on main failed this way.
  • The room now saves right after any reload from disk when it has edits of its own, settled or forced by the five-second cap. Saving just after taking in the file makes a 412 from a newer write unlikely.
  • The busy-file tests count the room's saves in a wrapper around the contents manager instead of reading them back from the file: the writer's read-modify-write overwrites a save that lands between its read and its rename (as any such program would), and under load that hid the save. They also wait for the writer without blocking the runtime the room runs on; JoinHandle::join there stalled the room. A second test writes every 0.7 s, so each change settles.

2026-11-03, Document rooms: four follow-ups from the #273 review (#279) ​

Four of the six items in #279; field-by-field cell merging and the nits are left for a later PR.

  • File ids on SQLite errors. FileIds handed out an unstored uuid when the database failed, so path(id) found nothing and the room websocket closed 4404. FileIds now keeps a memory map next to the database: ids handed out on an error live there, and lookups, moves and deletes go to both. The SQLite insert is INSERT OR IGNORE then SELECT, so two servers indexing the same new path agree on one id instead of the second failing on the unique key.
  • Debounce bound. File events under 500 ms apart reset the debounce, so a file rewritten constantly (a log-like notebook an agent appends to) never reached the room, and the room held off autosave too. The room now reloads once the first unsettled event is 5 s old, and when it has edits of its own it saves them right after that reload, so the save rarely meets a newer file (and merges if it does). An unwatched room had the same starvation: each 1 s poll that merged a change reset the autosave timer. It now saves right after such a poll too.
  • Lost forced save. When a client's save met a newer file (412), merged, and the disk won the cell the client had edited, the reply was success. It is now failed; the merge is still saved. The room doesn't track edits per client, so failed means a cell the room had changed lost, whichever client (or execution) changed it. Only the save's own merge counts: a reload by the watcher before the save is logged, as before.
  • Deletes reach open rooms. Collab::removed only dropped ids, so a room on a deleted file kept its clients and could autosave the file back. It now closes their sockets with 4404 and drops the room, turning away clients still queued to join. A client that resolved the id just before the delete finds the file missing when its new room loads, and also gets 4404 (4500 is kept for other load errors). An execute batch running in the kernel goes on; its outputs have no room to land in, and queued cells answer unavailable.

2026-11-03, a scratch run counts its busy status as started (#340) ​

ganymede mcp's scratch run decided whether the kernel had taken up its code by whether an execute_input or an output for the request came. execute_streaming dropped status messages before the handler, so the request's busy, the one message the protocol requires for every request, wasn't seen. A kernel that sends no execute_input, running code that prints nothing, was reported as "hadn't started" on a timeout and left running.

ganymede_exec::Handler and NotebookHandler now have an on_busy method (default: nothing), called when the request's busy arrives; the scratch run counts it as started. A kernel sends busy for a request only when it takes it from its queue, so a request still queued behind another run is still told apart. The fake kernel's quiet <ms> cell is sleep without execute_input, to test it.

2026-11-03, port reservations shared between processes (#327) ​

The cdp-node kernel that died in parallel_starts on macOS logged port 25766 still in use after 5000 ms and then EADDRINUSE (and 27500 in an earlier run). The host's port reservation (#261) only covered the process that made it, and the e2e tests run ganymede subprocesses (cli_*) beside the in-process kernels. Two processes could each find a port free, hand it out, and the second kernel to bind waited five seconds and exited.

Each reservation is now also an empty file named for the port in <temp>/ganymede-ports-<uid> (mode 0700, checked to be this user's own directory, not a symlink). A file younger than five minutes keeps other ganymede processes off the port; an older one is taken over. A process removes the expired files the first time it uses the directory. Taking over or removing an expired file happens under a lock on lock in the directory, so two processes can't both win one; creating a fresh file needs no lock. If the directory can't be made or written, only the in-process map applies, as before.

The crate's own unit tests don't use the directory unless a test points them at one: concurrent_allocations_never_share_a_port hands out 2,000 ports, and a few runs within five minutes filled the range for every ganymede process of the user.

cdp-kernel's report of the port's holders reads /proc, so it says unknown on macOS.

2026-11-03, One strip_ansi (#295) ​

There were three copies of strip_ansi: the CLI's renderer, the CLI's kernel tests, and ganymede mcp. The last two ended a CSI sequence only on an ASCII letter, so a sequence ending in ~ (such as bracketed paste, ESC [ 200 ~) swallowed the text after it. They also left OSC sequences such as OSC 8 hyperlinks in what the agent read.

The renderer's version was already right: a CSI ends on any final byte in 0x40..=0x7E, and an OSC ends on BEL or ST (ESC \). It now lives in ganymede-nbformat as strip_ansi, since output text is nbformat's domain and both the CLI and the server depend on that crate. mcp.rs calls it by full path, which keeps its import lines unchanged for the open PRs that touch that file.

2026-11-04, kernel log (#365) ​

GET /api/kernels/{id}/log is a Ganymede extension for the Mac app's kernel log tab (tlockney/ganymede-ui#248): Jupyter Server has no API for a kernel's own stdout and stderr, which until now reached only the server's stderr.

The kernel host stays free of buffers and clocks: LaunchOptions.output is a callback (KernelOutput) the subprocess provisioner calls with each line and its source, plus host lines when the process starts and when it exits (code or signal). With a callback, both pipes are always read, and still echoed to the server's stderr unless quiet; without one, the launch is as before. On exit, the provisioner waits up to a second in all for the pipes to drain, writes the exit line, and only then reports the exit, so a crash's last stderr lines and its exit line come before the manager's "restarting" line. Output from something outside the process group that still holds a pipe is left out of the log from that point, so it can't run on into the next process's lines; its reader still runs to EOF, since dropping the pipe would SIGPIPE that writer. Signalling stops at the reap, not at the exit report, so the drain doesn't widen the reused-pgid window. A line is held to 64 KiB at most, so a quiet server reading a stream with no newlines doesn't buffer it whole.

The manager keeps the logs of the last 32 kernels shut down or left dead: a kernel that crashes at every start leaves the map, and its log is the reason it died.

The buffer lives in ganymede-api (kernel_log.rs), one per kernel id, so a restart's lines follow the old process's. seq counts over the kernel's life, which gives clients a cursor (after) to poll with instead of a stream. With after, a page holds the oldest lines after it, so paging forward skips none still kept; a websocket or SSE variant can come when a client needs one. Kernels with no pid (in-process, gateway) answer with reason: no_process, the same word the metrics route uses.

2026-11-04, kernel memory and CPU (#361) ​

/api/metrics/v1 and /api/metrics/v1/kernel_usage/get_usage/{id} follow jupyter-resource-usage, read from its source (api.py, server_extension.py) and its lab extension's widget.tsx, which reads only content: a reply with content.reason is shown as that reason, anything else as usage_reply fields. ipykernel's reply carries hostname, pid, kernel_cpu, kernel_memory (PSS where the OS has it), cpu_count, host_cpu_percent (left out when 0) and host_virtual_memory.

jupyter-resource-usage asks every kernel and waits ten seconds; many kernels don't answer (cdp-kernel only from tlockney/cdp-kernel#411), so here the first usage_request gets two seconds, and a session that misses it is measured from the host from then on. The kernel must have finished starting first, or a slow start would be taken for a kernel that never answers.

Measuring uses sysinfo (only its system feature) on Linux, macOS and Windows: a process's descendants come from parent ids over a full process scan, and Linux threads, which it lists as processes, are skipped. CPU is relative to the previous scan, so System lives in the server state and the first reading is 0, as psutil's is. Scans closer together than sysinfo::MINIMUM_CPU_UPDATE_INTERVAL are reused, or a client polling the server and a kernel in one tick reads CPU jumping between 0 and hundreds of percent.

2026-11-04, LSP relay follow-ups from the #351 review (#356) ​

LspClient::send chose its path with message.contains("textDocument/did"), so a request whose text merely mentioned a document notification (an executeCommand argument, a completion's label) skipped the router: no id of the relay's own, so two tabs' ids could clash, and no unmarking of a resolve's item. It now parses the message and routes by its method. (A request is still parsed again by resync_for_request and the router; passing the value down would save that, but requests are small.)

Document numbers in item marks (#339) lived in the router, which was replaced whenever the server restarted. A completion item from before a restart, resolved after it through a reconnected client, then named whichever document took its number since. Router::restart now clears the requests and encoding but keeps the numbers, with a HashMap beside the Vec for the lookup.

The review worried that the mark had to be read before the router took it off. It doesn't: resync_for_request reads its own parse of the message, and the router strips the mark from another one, so the order of the two doesn't matter. The comment now says so, and a relay test (a_resolve_follows_its_items_document_through_the_relay) runs the whole path through LspClient: a tab completes on A, then B, another tab edits A, and the resolve of A's item sends this tab's text of A first.

Left open in #356: marking items only for servers that advertise resolveProvider. It saves about 25 bytes per item but needs dynamic registration followed to stay correct.

2026-11-04, merge cells part by part (#279) ​

ganymede_documents::merge treated a cell as one value. A person typing in a cell while an agent ran it through the contents API (nb execute) lost the edit: the room changed source, the disk changed outputs and execution_count, both changed "the cell", and the disk won it whole.

A cell present on all three sides now merges in parts: source; the outputs with the execution count, as one part, since a run changes both and mixing one side's outputs with the other's count would describe no run; each metadata key; and each other key. A change of cell_type, or a cell added or deleted, still merges whole. Notebook-level metadata merges key by key too, so a kernelspec change on disk and a title edit in the room both survive. A conflict in any part still reports the cell (cell <id>) or metadata, so a forced save that lost a part answers failed as before. Merged cells keep the disk's key order.

This is the last code item from #279; its nits (session path normalization, hash check before parsing on watcher events, SQLite off the async workers, a shared path-prefix rule) are left open there.

2026-11-04, keep a room whose save fails (#359) ​

run_room's empty-room cleanup saved a dirty room and then retired it whatever the save returned. With #353's retry, that was the one path where a failed save still dropped edits: once the cleanup delay passed with no clients and an idle kernel, the room closed with them unsaved.

The cleanup now retires a room only when it is clean, with two exceptions. It saves only when no autosave is due, so a failing save has one retry clock, #353's backoff, rather than the cleanup's own save pushing the autosave back each delay. While saves fail, the room stays open and warns each cleanup delay. It closes anyway, with a warning that names the path, when its file is gone (a delete or move outside the contents API, which Collab::removed never hears of) or after ten failed saves in a row, about five minutes of backoff. Before those exits, a file that could never be saved (deleted, read-only, or content that isn't a notebook) kept its room, watch and warnings for the life of the process.

Tests: room_edit_with_failing_saves is the #353 retry test's setup, shared. collaboration_room_outlives_cleanup_while_its_save_fails drops the client right after its edit, with a 100 ms cleanup delay and two failing saves; the autosave's retries save it, then the room retires. collaboration_room_without_a_file_retires_with_unsaved_edits deletes the file outside the API and checks the room still retires. Collab::open_rooms lets tests see that.

2026-11-04, retry a failed room save (#353) ​

run_room cleared its pending autosave (last_edit) after every save, whatever save_room returned. A save that failed (three 412s in a row against a busy writer, or an I/O error) left the room dirty with nothing scheduled, and a later reload whose hash matched what the 412 path had already read found nothing to save, so the edit waited for the next edit or for the empty-room cleanup.

Every save now goes through after_save: success or a skip clears the pending autosave; a failure schedules another one, with a backoff that doubles while saves keep failing (1 s, 2 s, 4 s, ... up to about a minute), so a full disk doesn't log a warning every second. The backoff is a last_edit set in the future: Instant::elapsed saturates to zero, so the autosave check waits out the backoff and then the save delay.

The test wraps the contents manager (SaveLog in tests/http.rs) and fails the room's first save with an I/O error; without the change the file never gets the edit.

2026-11-04, document rooms: the last nits from the #273 review (#279) ​

The four nits left in #279 after #338 and #362:

  • PUT /api/collaboration/session/{path} normalizes the path with normalize_api_path, as the file-id routes do. It only trimmed slashes, so ./a.ipynb and a//a.ipynb got ids of their own.
  • reload reads the file's hash before parsing it. A watcher event for the room's own save, or for a file touched but unchanged, no longer parses the notebook; poll already skipped those by mtime.
  • File-id calls run on a blocking thread (Collab::with_ids): with a database each is a SQLite query, which can wait on another server's lock and so held up an async worker. send_to_notebook_room looked a file id's path up while holding the rooms lock; it now looks it up first, then takes the lock to open the room and send. It must still send with the lock held, or a room at its cleanup delay can retire between the two and drop the command. A rename or delete during the lookup bumps a counter on Collab (under the rooms lock), and the lookup runs again, so a room doesn't open on the old path. The helpers that name a room by path (notebook_room_id, hold_notebook) became async with it, and so did Collab::moved and Collab::removed.
  • One rule for "this path is that one or under it": ganymede_contents::path_under, used by file ids and by rooms for renames and deletes.

2026-11-04, test the unwatched room's poll path (#341) ​

run_room saves right after a poll that merged a change from disk, so a room without a file watch still writes its edits to a file that never settles. The existing never-settles test reached that branch only on runners where watching failed.

A Collab with no root watches nothing, so its rooms poll: room_keeps_up_with_a_busy_file takes a watched flag, and collaboration_room_saves_a_never_settling_file_while_polling uses Arc::<Collab>::default().

Unwatched, that alone didn't pin the save: an unwatched room never sees a disk event, so its ordinary autosave (1 s after the last edit) saved the edit with the poll-path save deleted. The test's client therefore keeps typing every 300 ms, so the autosave never comes due while the file is busy and the poll-path save is the only one. With that save deleted, or replaced by an edit mark, the test fails.

2026-11-04, macOS terminal resize test reports what it saw (#368) ​

names_echo_resize_and_delete failed once more on macOS with stty never reported 40 132, after #345's retries, on a PR that didn't touch ganymede-terminals. It doesn't fail on Linux, and the cause can't be reproduced from a Linux container.

portable-pty's resize is one ioctl(TIOCSWINSZ) on the master fd, and stty size reads TIOCGWINSZ on the shell's tty, so the two should agree at once. The test now checks the first half directly (the master reports 40×132 straight after the resize), and a failure prints every try's output with the size the master held at that moment. The next failure will tell whether the size was lost on the pty or stty printed something the test didn't expect (an error, or the output split by a prompt redraw).

2026-11-05, case-only rename on case-insensitive volumes (#377) ​

Renaming notebook.ipynb to Notebook.ipynb on default APFS or NTFS was a 409: the destination "exists" because it is the source under a folded name, and the no-replace rename refuses it. jupyter_server allows it with os.path.samefile.

The rename now treats it as a case change when the two names share a parent, match ignoring case, are the same entry (device and inode on Unix, not following a symlink; canonical path elsewhere), and the directory has no entry spelled exactly like the destination. The last test tells a folded name from a hard link on a case-sensitive volume, whose two names are both listed; that stays a conflict. A case change uses plain rename, which APFS and NTFS apply to the name.

The positive test runs only where the temp volume folds case (macOS CI); Linux CI covers the hard-link conflict.

2026-11-05, ganymede-contents builds for browser wasm (#159) ​

  • ganymede-contents failed for wasm32-unknown-unknown because getrandom 0.4 has no backend there without its wasm_js feature. The crate now turns that on for browser wasm only, with uuid's js and chrono's wasmbind, as ganymede-protocol and ganymede-kernel-host already do. Notebook signing keys and file ids come from the JS crypto API there.
  • With contents fixed, ganymede-api --no-default-features builds for browser wasm too. CI's "Core libraries for browser wasm" step now checks engine, api and contents.
  • The only other wasm warning was an unused Duration import in fs.rs, used only under cfg(unix); the import moved there.

2026-11-05, contents API edge cases from a probe (#371) ​

A script sent odd requests to a main build's REST API: encoded .., NUL bytes, missing parents, bad notebooks and base64, chunk numbers out of order, concurrent writes and renames, unknown kernel, session, terminal and room ids. Nearly all answered as jupyter_server does. Three didn't:

  • /api/contents/ with the trailing slash was a 404: axum's {*path} doesn't match an empty path, so the root needs its own route for each spelling.
  • Moving a directory into itself reached rename(2), whose EINVAL became a 500. The check is now explicit, before the call, using path_under (so sub → subway still works).
  • A name over the filesystem's limit gave a 500. io::ErrorKind::InvalidFilename (stable since Rust 1.87) now maps to 400, which covers any write path.

Concurrent saves to one file always left one whole write, and twenty concurrent renames onto one name gave one 200 and nineteen 409s.

2026-11-05, crash reporting in the server and CLI (#386) ​

ganymede can send panics and error! events from its own crates to Sentry, behind the crash-reporting cargo feature, which release builds turn on. It is off at run time unless crash_reporting = true is in ganymede.toml or GANYMEDE_CRASH_REPORTING=1 is set; the env var wins. Off, sentry is never initialized.

  • crash::enabled::scrub keeps only what docs/privacy.md lists: the error's first line (home rewritten to ~, 200 characters at most) and stack frames, the release, and the OS, device and Rust contexts. Breadcrumbs, tags, extra data, user, host name and frame variables are dropped.
  • init_logging_with takes an extra tracing layer so the Sentry layer sits beside the fmt layer; the log filter applies to the fmt layer only.
  • sentry's ureq transport has no timeouts by default and its drop joins the sender thread, so an unanswered request would hang exit. The agent now has a 5 s connect and 10 s overall timeout.
  • The release workflow keeps line tables, uploads debug files with a pinned @sentry/cli when SENTRY_AUTH_TOKEN is set, then strips.
  • ganymede debug-panic (hidden, debug builds only) panics on purpose to check reporting end to end.
  • The container image is built without the feature.
  • When opted in, main sets CDP_KERNEL_CRASH_REPORTS=1 before any thread starts, so kernels the server launches inherit it; cdp-kernel#423 reports only then.
  • Review fix: sentry's debug-images feature sends the loaded images (debug id, load address; paths scrubbed) so Sentry can symbolicate frames from the stripped release binary against the uploaded debug files. CI's rust job now runs the crash tests and clippy with the feature. crash::maybe_start holds main's opt-in gate so the test covers it.

2026-11-05, e2e: compare printed output, not its chunking (#381) ​

server_matches_jupyter_server_on_ipykernel failed on #380 because the jupyter_server reference run got print("hi " + input()) as two stream messages, the text and then the newline, while Ganymede's run got one. ipykernel's OutStream flushes on a timer, so where it splits output depends on timing under either server.

The parity tests now join consecutive stream messages to the same stream before comparing (merge_streams), in both runs. They still check which stream got what text and in what order relative to other messages.

2026-11-05, ffi panic callback for the apps' crash reports (#389) ​

For ganymede-ui#318 (Sentry in the Apple apps, #384).

  • ganymede_set_panic_callback installs a panic hook once (keeping the default hook first) and calls the app's C callback on the panicking thread. The app captures an event there, and its stack capture walks through the Rust frames, which the app's dSYM symbolicates. A panic in a tokio task is caught by tokio and the app runs on, so without the hook nobody would see it.
  • The callback sits in a RwLock<Option<…>>, copied out before the call so the lock isn't held while the app reports. No unsafe.
  • ganymede_debug_panic catches its own panic and then aborts. Letting the panic reach the extern "C" boundary would make std panic again ("panic in a function that cannot unwind") and run the hook twice, so the app would send two events. The abort is the crash the app's crash handler reports; the apps' Settings use it to check that Rust frames arrive symbolicated.
  • No reporting code or dependency in Rust: the app owns the opt-in and the sending. The crash-reporting cargo feature (#386) is for the CLI and server.
  • scripts/build-xcframework.sh builds with CARGO_PROFILE_RELEASE_DEBUG=line-tables-only and no strip, so the static library carries line tables into the app's dSYM.

2026-11-05, privacy page for crash reporting (#385) ​

  • docs/privacy.md states the crash reporting rules from #384 before any reporting code lands, so the opt-in UIs and help text can link one page. It sits under Guides beside Security, and the README links it.
  • It fixes the opt-in names #386 implements: crash_reporting = true in ganymede.toml, and GANYMEDE_CRASH_REPORTING=1/0, which overrides the file. Only binaries built with the crash-reporting cargo feature (release builds) can send.
  • The page's Unreleased note also says no build sends anything yet; #386 drops that sentence when the server and CLI can report.

2026-11-05, release.sh unshallows before git-cliff (ganymede-ui#179) ​

git-cliff rebuilds the whole of CHANGELOG.md from history. In a shallow clone (the default in cloud sessions and many CI checkouts) the merges of older releases are missing, and their entries dropped out of the 0.3.0 changelog without an error. scripts/release.sh now checks git rev-parse --is-shallow-repository and runs git fetch --unshallow --tags origin main first. It fetches main by name, since a clone made for one branch has a refspec for that branch only. ganymede and ganymede-ui share the guard.

2026-11-05, rename into itself by another spelling (#374) ​

#372 answered a move of a directory into itself with 400 by comparing API paths. That misses other spellings of the same directory: Sub to sub/x on a case-insensitive volume (default APFS), or to link/x where link is a symlink to Sub or to a directory inside it. rename(2) refuses those with EINVAL, which mapped to 500.

The rename now canonicalizes the deepest existing ancestor of the destination's parent, which resolves symlinks, and compares each directory from there up to the root with the source: by device and inode on Unix, so case folding needs no special case, and by canonical path on Windows, whose canonical paths carry the on-disk case. A first version compared the unresolved ancestors' inodes and missed a symlink into a subdirectory of the source; the review caught it. Mapping every EINVAL from rename to 400 was simpler but would hide real faults.

The tests use symlinks, so Linux CI covers them; the case-folded form runs only where the temp volume is case-insensitive (macOS CI). Windows is unverified by hand.

2026-11-05, extra response headers for static paths (#375) ​

  • static_headers in the config (and the ffi's JSON config) maps a path under base_url, or a prefix ending in *, to response headers for files from a generic static_dir. It exists so ganymede-ui's kernel.html can be cross-origin isolated (COOP same-origin, COEP require-corp) for Pyodide's SharedArrayBuffer (ganymede-ui#258). Nothing in the server names a language or a page.
  • The headers are added by a layer on the static fallback router only, outside auth::static_page, so routes the server answers never match; an unclaimed path (an unknown /api/...) falls through to it and can. Rules match the raw path and the path as ServeDir resolves it: percent-decoded, without empty or . segments, with index.html for a directory. So /kernel%2Ehtml, //kernel.html and /./kernel.html get the headers of /kernel.html.
  • Patterns are a plain path or a * prefix, not globs, to avoid a new dependency; both cover the kernel page and an assets directory.
  • Bad names or values fail at startup rather than at the first request. With JupyterLab as the static dir the option is ignored with a warning; JupyterLab has its own routes and doesn't need it.

2026-11-06, One Agents group, MCP first (#414) ​

The sidebar had "Agents" (nb-cli) third in Guides and "Agents over MCP" last, so a reader met nb-cli before Ganymede's own path, ganymede mcp and the ganymede-journal plugin. They are now one "Agents" group with MCP first, and agents.md (same URL) is "Agents with nb-cli".

The journaling conventions were written twice, in agents.md and in the plugin's journal skill, and had started to differ (the skill gained scratch probes, recorded steps and reading a person's cells). The skill is now the one copy; agents.md links it and says only what differs with nb-cli.

2026-11-06, apps on the site (#401) ​

  • The landing page has an Apps section between "Serve, then connect" and "Get started": the Mac window full width, then iPad (landscape) and iPhone side by side at one height (each figure's flex-grow is its image's aspect ratio), light and dark copies like the hero.
  • The Mac download button starts as a link to ganymede-ui's latest release page, and a small script swaps in the Ganymede-macOS-X.Y.Z.zip asset from the GitHub API. releases/latest/download/ needs a fixed name, and the only fixed-name zip on v0.4.0, Ganymede-macOS.zip, is CI's ad-hoc signed build that release.yml publishes by mistake (ganymede-ui#334).
  • iPad and iPhone are described as internal TestFlight only, with build-from-source as the way in; App Review (2.5.2) is the blocker for external testing. docs/app.md, known-gaps.md and roadmap.md no longer say the Mac app is an unreleased CI artifact.
  • Shots were taken on a Mac from ganymede-ui 98e654f (Debug, ganymede-ffi v0.6.0) with docs/scripts/app-screenshots.sh. iOS used xcrun simctl (status bar override, appearance), with the iPad rotation and the tap on the notebook done by hand. The Mac shot is screencapture -o -l of a 1280×820 window; light mode uses -NSRequiresAquaSystemAppearance, dark follows the system.
  • Two traps: the server treats any path through a dot-folder as hidden, so a work folder named .work gave "no such file or directory" for a notebook that existed (ganymede-ui#337 for the Mac app's message); and without Screen Recording, CGWindowListCopyWindowInfo returns no window titles, so waiting on a title hangs silently. The script checks CGPreflightScreenCaptureAccess and can split launch and capture across two shells.
  • Follow-up worth doing: a launch argument in the app to open a notebook, which would make the iOS shots unattended, or XCUITest screenshots on CI.

2026-11-06, cdp-kernel 0.8.0 (#398) ​

CI and the container image move to cdp-kernel 0.8.0. Ganymede 0.6.0 shipped with 0.7.2 in the image because 0.8.0 wasn't on npm when it was cut; the next release's image gets 0.8.0. The scheduled CI run keeps testing latest.

2026-11-06, changelog misses squash merges (#392) ​

ganymede-ui's 0.4.0 release PR listed 51 of its 75 pull requests: every squash merge was missing (tlockney/ganymede-ui#326). cliff.toml here has the same preprocessor, \(#(\d+)\)\s*$, and without (?m) its $ is the end of the whole message. GitHub's squash commits carry a body, so none matched and the catch-all parser dropped them. Ganymede has had one squash merge since v0.5.0 (#390), which 0.6.0 would have left out.

Matching only the subject would also keep commits on PR branches, which often end in (#N) too. The committer tells them apart: GitHub commits merges and squashes, and branch commits keep their author's. The parser now requires committer.name to be GitHub, and skips "Release vX.Y.Z" as ganymede-ui does, so the release merge stays out of the next section. Regenerating the changelog changes released sections only by dropping their four "Release vX.Y.Z" entries (#36, #124, #147, #219).

2026-11-06, Docs-only pull requests skip the build (#418) ​

A pull request that changed only docs or the site ran the whole CI, three macOS jobs included. A changes job now runs scripts/ci-changes.sh on the PR's merge commit: if every file is Markdown, under docs/, or under site/ other than install.sh, the build and test jobs don't run.

The ruleset requires 13 checks by name, 6 of them matrix cells such as e2e (macos-latest). A job skipped by its if reports success, but a matrix job skipped whole reports one check without the cell's name, and the required ones would wait forever. So the matrix jobs (e2e, ffi, install-script, workstation) still start, on ubuntu-latest instead of their matrix.os, with every step skipped; the check names come from the matrix, not the runner. The other jobs are skipped by if.

The conditions test output != 'false', so if changes fails, its output is empty and everything runs. Pushes to main, the weekly schedule and manual runs aren't pull requests and run everything. The same change went into ganymede-ui (#344), cdp-kernel (#431) and ganymede-device (#45).

2026-11-06, the crates diagram gets documents, terminals and lsp (#403) ​

crates.svg predated three crates. Redrawn from each crate's Cargo.toml, leaving out dependencies another arrow implies: the server now points at terminals, lsp, exec (for the rooms' execute endpoint) and documents as well as api and gateway. ganymede-documents depends only on nbformat and yrs and does no I/O (a room is a state machine the host feeds), so it sits in the No I/O band with protocol and nbformat. The SVG keeps the old file's styles, so themed.ts writes light and dark copies as before; the generator script stays out of the repo, as for the other diagrams.

2026-11-06, stale "not built" statements in the docs (#402) ​

A docs review against main after 0.6.0 found pages still calling shipped features missing: autorestart, terminals, language servers, file watching and rooms in protocol.md; terminals, LSP and collaboration under "What is missing" in switching.md; reload-on-disk and distribution as left to do in ipados.md; and the same in the ganymede-api, ganymede-server and ganymede-contents READMEs. Most were written as "Not yet" lines next to a requirement and never revisited when the feature landed. Status written beside a design note goes stale; the review's plan proposes keeping status only in Roadmap and Known gaps. The server README's flag list is now a link to the reference page instead of a second copy.

2026-11-06, ganymede-ui 0.5.0 by default (#420) ​

ganymede ui install now installs ganymede-ui 0.5.0 (the single Mac Settings window, cdp-kernel 0.8.0 bundled). DEFAULT_SHA256 is the SHA-256 of ganymede-ui-0.5.0.zip, not the .tar.gz: the installer downloads the zip, and both are listed in the release's SHA256SUMS.

2026-11-06, journaling evals (#316) ​

evals/journal/ holds three tasks with known answers, a runner that runs each through claude -p with the ganymede-journal plugin, and scoring that reads only the finished .ipynb. The task data comes from a seeded generator, so answers don't drift between runs.

Each task carries a trap (duplicated rows, a shell step, a unit mix-up), so a journal that revises a finding in place has something to revise. Appended corrections are found by wording, which misses some; revisions in place are exact, from the cell's history.

"How often a person rewrote the summary" needs a person, so the runner saves each notebook twice: one copy left as the session ended, one to edit. --rescore compares the two.

Baseline: to be run by hand (Thomas, on #316) and recorded here.

2026-11-06, Roadmap after 0.6.0 (#416) ​

"Next" still led with the document model, done in 0.5.0, and "Done" stopped before terminals, language servers, rooms, ganymede mcp, observability and the signed apps. The 2026-11-05 project assessment recommended putting the app on rooms and adding the Pyodide kernel ahead of a native on-device kernel, and Thomas agreed on 2026-11-06. Those two are Next; the native kernel, CurveZMQ and tailscale serve identity are Open, with no order among them.

2026-11-06, room lock released on retire (#400) ​

A room's lock was a local of its task, so it dropped only when the task returned, a few statements after retire took the room off the map. A room opening on the same file in that gap found the path in this server's held set and opened writable with no lock. The tick retried the lock only while read-only, so it never took it, and once the old task ended another server's room could take the file and both autosaved.

retire now drops the lock while it still holds the rooms mutex. A room for the file can only be created after that, so it finds the lock free (or owned by another server) rather than held here. Retrying on the tick alone would have left a gap of up to a second and a quarter in which another server could take the lock from under a room with client edits.

Locks::acquire still reports a lock held by another room of this server (HeldHere), which now means two file ids for one file (a symlinked directory, a hard link, a case-insensitive name). That room stays writable and retries each second; both rooms autosave, as before. A read-only room that gets Unavailable (the file missing for a moment while another program replaces it) now keeps retrying too.

2026-11-06, one owner per notebook room on a machine (#272) ​

Two ganymede serve processes with a room open on one notebook both autosaved it and each merged the other's saves as outside changes. Now the first room takes an exclusive lock, an empty file in the runtime dir's ganymede-rooms/ named for the sha256 of the notebook's canonical path, through std::fs::File::try_lock (flock/LockFileEx, std since 1.89, so no new dependency). A room that can't take it is read-only.

  • Room::set_read_only lives in ganymede-documents: a client's update that changes content is applied, then the content is set back to the baseline (the file as last read) and the result goes to every client, so the sender's edit visibly disappears. Server edits (outputs) don't make it dirty. Refusing the update without applying it would leave the sender's document out of step with the room for good.
  • save_room returns Skipped for a read-only room, including a client's forced save.
  • The contents API reports writable: false for a notebook another process's room owns. Locks::owned_elsewhere finds out by taking and dropping the lock; a lock this server holds is tracked in a set, since a second flock on the same file from the same process fails too.
  • A read-only room retries the lock every second, so it takes over once the owner's room closes or its process dies (the OS drops the lock).
  • Lock files are never deleted: deleting one while another server is about to lock it would let two servers own the file.
  • Embedding apps (Startup::stop set) don't lock. Across devices there is no lease, as Thomas decided; a proxy to the owner can come later.

2026-11-06, A guide page for document rooms (#410) ​

Document rooms were described only in protocol.md, a requirements checklist under "How it works", so a reader who wanted live editing, or an agent author who wanted the execute endpoint, landed in the middle of a design note. rooms.md is now the Guide page for them, and protocol.md keeps a design paragraph that links it.

protocol.md, ui.md and ipados.md moved to Background as design notes. Status in them went stale twice (the 2026-10-19 and 2026-11-06 reviews), so they now point at Known gaps and the Roadmap for status. ipados.md lost "What is left": the native on-device kernel is on the Roadmap, and tailscale serve identity goes there in the roadmap rewrite.

2026-11-06, One home for status (#412) ​

Both docs reviews (2026-10-19, 2026-11-06) found the same fault: a feature ships, Known gaps and the Roadmap get updated, and a "not yet" written into some other page stays. The rule is now in Development's Rules: status goes in Known gaps and the Roadmap only, and other pages link there.

The server crate's README held the only full list of routes and the auth rules, off the site, and gained a line with each new route. The routes are now in The API by example under "Every route", the auth rules were already in Security, and the README links both.

2026-11-06, Check for inline "unreleased" (#408) ​

ganymede-ui 0.4.0 shipped a feature still marked "(unreleased)" in its apple/README: the release removes notes it finds by grepping for Unreleased\., and an inline marker doesn't match. The 2026-11-06 docs review proposed a check, and Thomas agreed.

docs/scripts/check-unreleased.mjs reads README.md, docs/*.md (not releasing.md, which describes the notes) and site/index.html, skips code blocks and code spans, and fails on any "unreleased" that isn't the **Unreleased.** of the standard note, or a note outside a blockquote. The pages workflow runs it on every pull request that touches the docs, the site or, now, README.md. ganymede-ui has the same check in npm run check.

2026-11-07, a base URL without a leading slash (#476) ​

--base-url jupyter panicked at startup: serve only trimmed the trailing slash, and axum can't nest a router at a path without a leading one. normalize_base_url now adds the leading slash and drops the trailing one, as jupyter_server normalizes base_url, so jupyter, /jupyter and /jupyter/ all serve under /jupyter/. Found in the 0.7.0 code review (#440).

2026-11-07, renames in ci-changes.sh (#464) ​

scripts/ci-changes.sh listed changed files with git diff --name-only, which reports a rename by its new path only. Moving a code file under docs/ reported code=false, so the change skipped the test jobs. --no-renames lists both paths, and the removed code path counts. The same fix went into cdp-kernel, ganymede-ui and ganymede-device.

2026-11-07, a common-prefix completion keeps the rest of the word (#484) ​

#479 made a console completion replace up to the kernel's cursor_end. But ganymede console uses rustyline's list completion, which, with several candidates, inserts their longest common prefix through the same update call. So x.ap|pendleft, with append and appendleft offered, became x.append: text after the cursor was deleted though no candidate was picked.

Now only a single candidate replaces up to cursor_end (replace_end); a common prefix replaces what is before the cursor, as rustyline does by default. A cursor_start past the cursor drops the completion instead of moving the start back, which made pri|nt with the range 4..5 and match t into prit.

2026-11-07, console completions replace cursor_start..cursor_end (#478) ​

ganymede console handed rustyline the kernel's cursor_start as is, so one past the cursor panicked on a reversed range, and it ignored cursor_end, so completing inside a word left the word's tail behind. completion_range turns both code-point offsets into byte offsets, with the start at most the cursor and the end at least the cursor and at most the line. rustyline's Completer::update replaces only up to the cursor, so KernelHelper overrides it to replace up to the stored end. Found in the 0.7.0 code review (#440).

2026-11-07, the culler re-checks each kernel (#506) ​

cull_idle chose its candidates once, then shut them down one at a time, each shutdown waiting out its grace period. A client that connected to a later candidate meanwhile, or a cell that started on it, still lost its kernel. Each candidate is now checked again (no connections, idle, past the limit) under its lifecycle lock, just before its shutdown, through a new shutdown_if. Found in the 0.7.0 code review (#440).

2026-11-07, Docs-only pushes to main skip CI (#458) ​

scripts/ci-changes.sh ran everything for any event but a pull request, so merging a docs-only PR still ran the whole CI on main: the merges of #449, #451 and #453 took 16-22 min each, four macOS jobs included. A push now diffs against github.event.before, the commit main was at before it, with the same rules as a PR. The script fetches that commit when the shallow checkout lacks it, and runs everything when the base is all zeros, can't be fetched, or can't be diffed. The schedule and manual runs still run everything; release.yml already skipped these pushes with paths-ignore.

2026-11-07, Apple apps on Apple silicon, macOS 26 and iOS 26 (#454) ​

  • Thomas decided the Apple apps require macOS 26 and iOS 26 and that the Mac app is arm64 only. macOS 26 is the last release Intel Macs get, and every Apple silicon Mac runs it.
  • The server and CLI keep broad support (Thomas): the release still builds x86_64-apple-darwin, and install.sh still installs it on Intel Macs. Only the XCFramework the apps link changes.
  • scripts/build-xcframework.sh builds the macOS slice for aarch64-apple-darwin only (no lipo) and defaults both deployment targets to 26.0: one of four Rust builds of ganymede-ffi gone from CI's ffi job and from each ganymede-ui app build.
  • The landing page still says macOS 13 and Intel for the apps: it describes the latest ganymede-ui release, which does. It changes when ganymede-ui releases the new floor (ganymede-ui#356).

2026-11-07, an empty _xsrf field falls back to the header (#488) ​

check_xsrf took the first source that was present (the form field, the _xsrf query argument, then the X-XSRFToken and X-CSRFToken headers) and only then dropped an empty value, so a form with _xsrf= was refused even when the header carried the token. Tornado's check_xsrf_cookie chains the sources with or, which skips empty strings too. Each source is now checked for emptiness before falling through to the next.

2026-11-07, output order after a lag (#507) ​

execute_streaming hands iopub messages to its handler as they arrive and, after the reply, the ones it never saw. When the handler fell behind the session's broadcast, the messages after the gap were still handed over live, so the skipped ones came last, out of order. After a lag it now stops handing over live messages; the reply's record supplies the rest in the kernel's order. The handler sees output later, not wrong. Found in the 0.7.0 code review (#440).

2026-11-07, quote the ffi job's skip message (#482) ​

#471's skip step, run: echo "... (#418, #457).", was a plain YAML scalar, where # starts a comment. The shell got echo "... (#418, and failed, so every PR whose ffi cell skipped the build went red. The scalar is quoted now. run: values that mention issue numbers need quotes or a block scalar (|).

2026-11-07, copy and checkpoint refuse a FIFO (#489) ​

get serves only regular files and directories, but copy and create_checkpoint checked only for a directory and then fs::read the source. On a FIFO that read waits for a writer that never comes, holding a blocking thread and the request. Both now answer 404, as get does, for anything that isn't a regular file. The first checkpoint a notebook save makes goes through the same write_checkpoint, so it is covered too.

2026-11-07, ?token= on /files/ (#508) ​

A page URL with a correct ?token= sets the login cookie and redirects to the same URL without the token, so the token leaves the address bar. /files/ went through that redirect too, which broke a download by a client without a cookie jar: curl 'http://…/files/data.csv?token=…' followed the 302 and got the login page's 403. /files/ now keeps the token like the API paths do, still gaining the cookie. jupyter_server accepts the query token on its files handler the same way. Found in the 0.7.0 code review (#440).

2026-11-07, frame-ancestors on every response (#429) ​

No response carried frame-ancestors or X-Frame-Options, so any page could frame /lab (with --token ""), and with a token a page on another localhost port could too, since the SameSite=Lax login cookie counts that as same-site.

build_router's outermost layer now adds frame-ancestors 'self' to each response's Content-Security-Policy: the whole policy when there is none, appended to one a handler set (/files sends sandbox allow-scripts; frame-ancestors 'self', the same directives as jupyter_server's FilesHandler), and left alone when the policy already names frame-ancestors, so static_headers can widen it for a static page.

Review: static_headers doesn't reach JupyterLab or the server's own routes, so a site that framed /lab had no way back. The sources are a config key, frame_ancestors (default 'self'), checked at start for ; and , so a value can't add other directives. With a base_url, the layer is applied again outside the nest so paths outside the prefix carry it too; a second pass sees the directive and changes nothing.

The UI's output frames use srcdoc, not server URLs, and the apps load pages top-level, so neither is affected.

2026-11-07, One global Python kernel (#448) ​

kernels.md first registered ipykernel from whatever environment the reader had at hand. A kernelspec stores that environment's Python by path, so moving or deleting the environment, or upgrading the Python it was made from, leaves a kernel that is listed but won't start. People who don't usually manage Python environments hit that without knowing why.

The page now leads with one environment kept only for the kernel, at ~/.local/share/venvs/python3, registered as python3, the name most notebooks record. It shows the error a moved environment gives and how to recover, advises against the system and Homebrew Pythons (PEP 668), and adds an all-users variant under /usr/local. Per-project kernels follow as a second option. All of it was run against ipykernel 7.4 and a local build, including a user python3 hiding the /usr/local one.

2026-11-07, a hidden path's 404 says it is hidden (ganymede-ui#337) ​

The Mac app roots its server at /, so a notebook under a dot-folder (~/x/.work/nb/a.ipynb) is a hidden path. The contents API answers a GET for a hidden path with 404, as jupyter_server does, but the message was "no such file or directory", and the app showed that for a file the user had just opened from Finder.

resolve_for_read now returns a new Error::Hidden when the hidden path exists: still 404, with a message that says the path is hidden and why Ganymede won't open it. A hidden path that doesn't exist is still NotFound. Listings still leave hidden entries out, and writes to them are still 400.

Opening such a notebook would need allow_hidden for that path, which would also need saves to allow it; the issue accepts the message instead. The apps pick this up when ganymede-ui's GANYMEDE_REF moves past the release that carries it.

2026-11-07, install.sh checks the binary runs before installing it (#490) ​

site/install.sh moved the downloaded binary into place, then printed Installed $(ganymede --version). A binary that couldn't run (built for another system, a missing loader or library) printed an empty version and the script still exited 0, having replaced a working install.

The script now runs --version on the new copy before the rename, and on failure removes it, keeps the old binary, and exits with the error output. scripts/test-install.sh packages a 9.9.8 stub that exits 126 and checks both the failure and that the 9.9.9 install is left alone.

2026-11-07, install-script's macOS checks move into workstation (#459) ​

A ganymede PR took four macOS runners, and macOS runners are what PRs across the four repos queue for: in run 608, install-script (macos-latest) waited 6.6 min for 0.2 min of work. Its three checks (test-install.sh under sh and bash, then with TEST_KERNEL=1) now run at the end of workstation (macos-latest), even when the workstation test fails, and install-script runs on Linux only. Its matrix keeps the one cell so the required check install-script (ubuntu-latest) keeps its name; the macOS cell was never a required check.

2026-11-07, a websocket join during a rename (#509) ​

A collaboration client's join looked its file id's path up without the rooms lock, then opened the room. A rename in between left it opening the room on the old path, which no longer loads, so the client was dropped. send_to_notebook_room already guarded against this with the moves counter; the websocket join now goes through join_room, which does the same: when a rename or delete happened since the lookup, it looks the path up again before opening. Found in the 0.7.0 code review (#440).

2026-11-07, kernel failures stay out of crash reports (#431) ​

Crash reporting forwards every error! event from Ganymede's crates. ganymede-api's kernel manager logged a kernel that won't start, won't restart, or keeps dying at error, so with reporting on each one went to Sentry, with a kernelspec name or interpreter path in the message, though docs/privacy.md says a kernel that exits is never reported.

Those four now log at warn. They are the user's code or environment, and each is also in the kernel's own log (/api/kernels/{id}/log). kernel_log_outlives_a_kernel_left_dead records the test's tracing output and checks the failure shows as a warning and nothing logs an error. The rule for later code: error! in Ganymede's crates means a fault in Ganymede.

2026-11-07, a kernel_info_reply that doesn't parse (#504) ​

A kernel whose kernel_info_reply lacks status or protocol_version answered every nudge, yet the host dropped each answer and waited until the start timed out, with nothing in the log to say why. The nudge now logs the parse error and the reply's content once per start, and keeps waiting as before, so a kernel that fixes itself mid-start still works. Found in the 0.7.0 code review (#440).

2026-11-07, kernelspec env values are template-expanded (#438) ​

jupyter_client runs each kernelspec env value through string.Template(v).safe_substitute(env), where env is the server's environment plus the launch's. Ganymede passed the values as written, so "PATH": "/opt/conda/envs/x/bin:${PATH}" gave the kernel a literal ${PATH} and it couldn't find system commands.

SubprocessProvisioner::launch now expands values with expand_env, which follows safe_substitute: $NAME and ${NAME} (an ASCII letter or _, then letters, digits, _), $$ for $, and unknown names or a bare $ left as written. Names come from the launch's env first, then the host's. The kernelspec's values still override the host's, and the launch's override both, as before.

2026-11-07, lab install: only public versions reach PyPI URLs (#432) ​

Version::parse dropped everything after +, so a pin like ==1.0+/../../evil/1.0 parsed, and Pypi::json pasted its raw text into {api}/{project}/{version}/json. A Requires-Dist entry from PyPI could use that to point the lookup at another project's metadata.

  • Version::parse now checks the local part: letters and digits separated by ., -, or _. Anything else is not a version.
  • Index::json refuses a version that isn't public (any + part, or a character outside letters, digits, ., !, -, _) before building the URL. PyPI has no local versions, so ==1.0+local is now an error naming the version instead of a request to a wrong URL.

2026-11-07, a cancelled launch left its kernel running (#505) ​

Dropping a LaunchedKernel removed the connection file and nothing else, so a start cancelled after the fork (a client giving up mid-request, a timeout around Relaunch::launch) left a kernel running that nothing could reach. The drop now kills a process that is still alive through KernelProcess::kill_now, as tokio's kill_on_drop would, and the engine's own Kernel drop is now a second line. Every existing path that drops a launch shuts the kernel down first, so they see no change. Found in the 0.7.0 code review (#440).

security.md said a leaked token URL works until the server restarts with a new token. Any request with the token gets a 30-day login cookie signed with jupyter_cookie_secret, which persists across restarts, so one use keeps access after the token changes. The page now says so and how to revoke: delete the secret and restart. Tying cookies to the token that issued them would differ from jupyter_server, whose cookies behave the same way, so the docs change instead of the code.

2026-11-07, a lighter XCFramework check in CI (#457) ​

ffi (macos-latest) was the longest CI job (13-14 min) and set a PR's wall time: scripts/build-xcframework.sh built every slice with the release profile (thin LTO, one codegen unit), 9.6-9.8 min.

Both ffi cells now build with CARGO_PROFILE_RELEASE_LTO=off and 16 codegen units, on PRs and on main alike, so a PR restores main's cache for the same settings. Building differently on PRs would miss main's cache: the profile is part of every dependency's fingerprint. The full release build moved to release.yml, which publishes the framework on every push to main and every tag (#456). The weekly scheduled run keeps the release profile, so drift under LTO shows up even in a week with no push to main.

scripts/ci-changes.sh also prints ffi: false when only code outside ganymede-ffi's dependency tree changed (ganymede-cli, ganymede-engine, e2e, evals, plugins, validation, container, other scripts and workflows). Then the macOS cell runs its one step on an ubuntu runner and frees the macOS runner. The ubuntu cell checks with cargo tree --target all that ganymede-ffi still doesn't depend on ganymede-cli or ganymede-engine, so the list can't go stale silently.

2026-11-07, one Linux release build per CI run (#460) ​

lsp, workstation (ubuntu) and image each compiled ganymede-cli in release mode: about 2 min each in the first two, and 4-5 min inside Docker for image, whose BuildKit cache mounts don't survive between hosted runners. A linux-release job now builds it once and uploads it for a day; the three download it (artifacts drop the executable bit, so each chmod +xes it). The Dockerfile gained GANYMEDE_SOURCE=local, which copies container/bin/ganymede from the build context. workstation (macos-latest) still builds its own.

linux-release runs in the rust:1.95-trixie container, the Dockerfile's build image. Built on the ubuntu runner, the binary needed glibc 2.43 and failed to start in the trixie image (2.41); built on trixie, it runs in the image and on the newer runner.

needs covers a whole matrix, so workstation (macos-latest) waited for linux-release before queueing for a macOS runner, though it doesn't use the binary. It is now its own job, workstation-macos, with the same check name and the same steps through a YAML anchor. Without the Rust toolchain step, the ubuntu cell's cargo install nb-cli on a cache miss (always on the weekly run) would have used the runner image's Rust; it sets up stable for that step.

e2e (ubuntu) stays separate from coverage, though both run the suite with the same kernels: e2e is a required check and fails on a skipped test, coverage is informational and instrumented.

2026-11-07, a limit on LSP header blocks (#480) ​

The LSP relay capped message bodies at 64 MiB but read header lines with an unbounded read_line, so a language server that never ended a header line could make it buffer without limit. read_message now reads each line through take and fails once a header block passes MAX_HEADER (8 KiB; real headers are under 100 bytes). Blank lines between messages don't count, since servers may pad with them. Found in the 0.7.0 code review (#440).

2026-11-07, script and Markdown export (#235) ​

JupyterLab's File > Save and Export Notebook As menu was empty: /api/nbconvert listed no exporters, since nbconvert's are Python templates. Two of its formats need no templates and no knowledge of the kernel's language beyond metadata.language_info, so they are now built in Rust:

  • ganymede-nbformat has to_script and to_markdown (module export), which return the text, its extension and MIME type, and any files it refers to. The crate stays free of I/O and new dependencies; images come back as the base64 the notebook stores.
  • ganymede-server lists markdown and script in /api/nbconvert and serves GET /nbconvert/{format}/{path} as jupyter_server's NbconvertFileHandler does: ?download=true for an attachment, a redirect to /files for a path that isn't a notebook, and a zip when the export has files. The zip uses the zip crate that ganymede-cli already depends on, with the same features, so Cargo.lock gains no new crate.

Choices:

  • Script: code cells, and raw cells with no MIME type or the script's own (as nbconvert's raw_mimetypes), joined by two blank lines. Markdown cells are left out: commenting them needs the language's comment syntax, which the host doesn't know. nbconvert's generic script template leaves them out too; only per-language exporters (Python's) comment them. Extension and MIME type come from language_info.file_extension and mimetype, defaulting to .txt and text/plain.
  • Markdown: nbconvert's Markdown template, except that text outputs and tracebacks are fenced blocks instead of indented ones, with a fence longer than any backtick run in them, and a carriage return in stream text starts its line over, so a progress bar shows its last state. Images (PNG, JPEG, SVG) and cell attachments are files under <name>_files/, and the response is then a zip of the .md and the files, as nbconvert's respond_zip. Data URIs were the alternative; GitHub and many viewers don't render them, and a zip matches what Jupyter users get.
  • The script's MIME type comes from the notebook, so the response carries /files' sandbox Content-Security-Policy: a notebook that claims text/html can't run script as the server's origin.

Not done: POST /nbconvert/{format} (export of a posted notebook), which JupyterLab doesn't call.

2026-11-07, An "Other kernels" page (#446) ​

The docs said ipykernel works "once its kernelspec is installed" and stopped there. kernels.md now walks through it: install ipykernel in an environment, register it with ipykernel install --user --name, and check it with ganymede run. Every command was run against ipykernel 7.4 and a local build.

The venv case gets its own section because it differs from Jupyter. pip install ipykernel drops a python3 spec in <venv>/share/jupyter whose argv is plain python; jupyter_client finds it through sys.prefix and swaps in its own interpreter, Ganymede does neither. So the page recommends --user --name, which writes an absolute path, and shows --kernelspec-root plus an active environment as the alternative.

The page also has the discovery order as a diagram and a short table of other kernels (Deno, IRkernel, IJulia, evcxr, gophernotes, xeus-cpp, Almond) with links, marked as untested. IRkernel's installspec() shells out to jupyter, so its row shows ganymede kernelspec install instead.

2026-11-07, two notebooks to one output file (#511) ​

ganymede execute a/x.ipynb b/x.ipynb -o '{notebook_name}-out.ipynb' saved both results to x-out.ipynb, the second overwriting the first. {notebook_name} is the file stem, and the output path doesn't follow the input's directory, as in jupyter execute. Execute now resolves every output before it runs anything and refuses two inputs that land on one file, naming both. Found in the 0.7.0 code review (#440).

2026-11-07, pin the default lab extensions (#433) ​

ganymede lab install pinned JupyterLab by version and hash but took the newest anywidget and jupyterlab_widgets, and whatever their dependencies allowed. PyPI's digest only shows a wheel is what PyPI serves, so a compromised release would reach every new install as JavaScript on the server's origin.

  • extension::DEFAULTS is now a list of Pins (name, version, wheel SHA-256). The defaults install as name==version with dependencies not followed, since the pinned list is complete; install_wheel refuses a wheel whose hash differs from its pin.
  • --latest-extensions restores the old behaviour.
  • scripts/check-pins.sh, run by a weekly pins job in ci.yml, fails when PyPI has a newer JupyterLab or default extension than the pins. Dependabot can't watch constants in Rust source. Its first run will flag JupyterLab 4.6.6 against the 4.6.4 pin.

2026-11-07, a room turning read-only keeps its edits (#437) ​

A room could turn read-only with unsaved edits: after a rename whose new path another server had locked, or when a room that was writable without the lock (HeldHere, Unavailable) later found the lock taken. From then on save_room returned Skipped, the edits were lost at the next client edit (restore_baseline), and the cleanup kept the room open forever because it still looked dirty.

  • save_before_relock saves a dirty, writable room before each lock check that can make it read-only: on Moved and on the tick's retry.
  • A dirty read-only room retires once its clients leave, with a warning; keeping it open could never save it.
  • take_lock warns when it makes a dirty room read-only (a save that failed just before), instead of logging the switch at info.

The unit test holds the lock from a second Collab, which flock treats as another process, so the room gets Elsewhere after its save.

2026-11-07, saving a read-only file is refused (#439) ​

atomic_write renames a temp file over the target, which needs only a writable directory. A 0444 file in a writable directory was replaced (its mode put back), while the contents model said writable: false. jupyter_server writes in place and returns 403.

atomic_write now opens an existing file for writing, without truncating, before it writes anything, and returns PermissionDenied when the OS refuses. The contents layer turns that into 403 naming the file. Root can still write a 0444 file, as with jupyter_server, so the tests skip themselves when run as root; CI runs them as a normal user.

The rename still changes the owner and breaks hard links of a file that is writable; that is a property of atomic replacement, not part of this fix.

2026-11-07, reap a deleted terminal's shell (#486) ​

TerminalManager::delete drops the terminal from the map and kills its shell, and the reader thread waits for the shell once the pseudo-terminal closes. But the thread held only a Weak<Terminal>, and the child handle lived in the terminal: with no client still connected, the terminal was gone by the time the read ended, the thread returned early, and the killed shell stayed a zombie until the server exited.

The child handle is now shared (pty::Waiter), and the reader thread waits through its own copy before it looks at the terminal. The test checks with kill -0, which still succeeds on a zombie, so it fails only once the shell is reaped.

2026-11-07, release.sh lists only real Unreleased notes (#491) ​

scripts/release.sh --execute lists the "Unreleased" notes for the release pull request with a plain grep 'Unreleased\.', which also matched the note's template in a fenced block of docs/development.md and the prose after it, so every release listed two lines that weren't notes.

In Markdown it now counts what docs/scripts/check-unreleased.mjs (#408) accepts as a note: a line starting with > (indented or not) that holds **Unreleased.** outside fenced blocks and code spans. An awk pass tracks ``` and ~~~ fences per file, as the CI check does. A stricter rule would miss notes CI lets through, such as one indented in a list item, and the release would ship them. The landing page's notes have no fixed form (one was a comment in a code sample), so in site/index.html any "Unreleased." still counts.

2026-11-07, five fixes from a full code review (#424–#428) ​

A review of the whole workspace after 0.7.0 filed #424–#440. This entry covers the five fixed first: the ones that let one request crash the server or reach outside the root, or that lose kernels.

  • Checkpoints and symlinks (#424). check_inside_root guarded every contents path except the checkpoint's, and atomic_write follows links on purpose (it replaces a link's target, not the link). A .ipynb_checkpoints entry linking out of the root turned a checkpoint into a write anywhere, and a restore into a read of anything. jupyter_server follows those links too; ours now don't, since security.md promises the root. The walk-up-and-canonicalize check is now resolves_under(base, path), used for the root and for --checkpoint-dir. The review of the first version found the best-effort upkeep too: deleting or renaming a file removed or moved its checkpoint through the link. Those now leave such a checkpoint alone, and listing shows none rather than failing, since JupyterLab lists on every open.
  • Allocation failure is an abort, not a panic (#427). A v3 heading's level went straight into "#".repeat(level). Python raises MemoryError; Rust aborts the process, and spawn_blocking can't catch that. Clamped at 1024.
  • Stack overflow is an abort too (#428). Two kinds of nesting:
    • yrs 0.28's Any::decode recurses per level with no limit, at two bytes a level, and a 1 GiB message limit let a client nest as deep as it liked. There is no yrs option to bound it, so depth.rs walks a v1 update iteratively, along Update::decode, ItemContent::decode and Any::decode, and the room refuses one deeper than 100. A malformed update passes the scan and yrs reports it.
    • Shared types nested in one another, each level its own item and possibly its own update. yrs deletes them recursively (TransactionMut::delete), so a tree that is in the document can never be taken out again, and an update that builds one and deletes it (or overwrites its key) aborts while it is being applied. A first try applied type-adding updates to a scratch copy and measured that; the second review crashed the copy that way, and the copy cost two whole-document encodes per added cell. Now the scan records each item's clock range and parent (a named root, the item holding the parent type, or its two origins), and the depth of each new shared type is worked out from that, without applying anything. The parent rule has to be yrs's own (Update::repair): the left origin's parent when that origin is an item with a known parent, else the right one's, else none (yrs then never attaches the item). The third review built 22k levels past a version that always took the left origin: a left origin on a garbage-collected clock sent yrs to a deep right origin while the check counted a shallow one. Parents already in the document come from a map of branch depths by item id, measured when the room loads and again when an update names a branch the map lacks (the server's own edits add some). A sibling in the document that isn't a shared type has no depth the room can see, and may be garbage-collected (sending yrs to the other origin), so the document's deepest stands in, and the room measures again after such an update rather than let the estimate ratchet its bound up. A child of a deleted type is no longer refused: yrs leaves it unattached, so it adds no depth. Past 16 levels the update is refused, as is one that hangs shared types on items the room doesn't have: yrs would hold it pending and integrate it later, at a depth nobody checked. The notebook schema goes 5 deep.
    • 100 + 16, plus the notebook's own levels, stays under the 128 levels serde_json reads back, so a room can't save a file Ganymede can't open. out_to_json stops one level past 16 as a backstop (values inside the deepest accepted type are kept) and gives null for XML types, whose yrs conversion recurses without limit.
    • A sibling that isn't a known shared type stands in at the document's deepest depth, so once some branch reaches 16, a new type beside a plain value anywhere can be refused. Notebooks stay near 5; resolving such a sibling's parent needs yrs internals, so it stays an estimate.
    • Two more ways past the check. An update whose clocks run past u32::MAX stopped the scan, which let it through unchecked, while yrs wraps the clock and reads on; the room now refuses any update the scan can't follow. And an update could re-send an item the document already has with a shallow parent of its own: yrs keeps its copy, but the scan took the depth of what hung below it from the re-sent one. Ids the document has now always resolve from the document.
    • What yrs holds for later was a third way past: types hung on a skip block were taken as unattached, and yrs integrated them, unchecked, once a later update filled the gap. Items after a skip, and ids that fall in one, now count as missing, so such an update is refused. After each apply the room also drops anything yrs still holds, so nothing the check didn't see can land later.
    • The collaboration websocket's 1 GiB message limit is left to #436.
  • A beat cut short (#425). Two timeouts of the same length, nested: the outer one always wins, and dropping the inner future skipped the code that replaced the stuck REQ socket. zeromq's REQ refuses to send again until it reads a reply, so one missed beat became every missed beat. The transport now notices a beat dropped part way (awaiting_echo still set) and bounds the whole beat itself.
  • Remote kernels have no pid (#426). KernelSession::shutdown only kills processes with a pid, so a gateway kernel got a shutdown_request and no DELETE. Against Ganymede as the remote that looked fine (it treats the requested exit as final); jupyter_server restarts the kernel. KernelSession::shutdown now calls kill on a launched kernel with no pid (an in-process kernel answers Unsupported and is left alone), so the DELETE is sent and awaited, within the shutdown's grace: the gateway client has only a connect timeout. Dropping the last RemoteKernel sends it too, as a fallback for a restart, a dropped websocket or a DELETE that failed (a failed one leaves the kernel marked alive); that one needs a runtime and is best effort.

2026-11-07, rooms ping clients and bound their queues (#436) ​

A room's websocket had an unbounded outgoing queue per client, no pings, no write timeout, and a 1 GiB message limit. A half-open connection (laptop asleep) never sent Leave, so its room never retired and kernel output queued for it without limit.

  • Each client's queue is bounded at 10,000 frames (ClientTx, the kernel bridge's CLIENT_QUEUE_LIMIT). A send that finds it full doesn't wait: it notifies the socket task, which closes with 1008 and leaves. The kernel bridge drops output past its limit instead; a room can't skip a Yjs update, so the client goes and resyncs on reconnect.
  • The socket task pings every 30 s and drops a client silent for 90 s. Every send has a timeout of 30 s plus 1 s per 64 KiB, so a blocked write can't stop the task for long, and a large first sync over a slow link still gets through (a flat 30 s would never let it join).
  • A room's Close that finds the queue full is stashed next to the notification, so a deleted file still closes with 4404, not 1008.
  • Messages and frames are capped at max_body_size, the largest notebook the contents API takes. Before, tungstenite's 16 MiB default frame size was the real cap, since browsers send one frame per message.
  • The queue counts frames, not bytes; a byte budget is a follow-up.

Collab::with_heartbeat (hidden) shortens the intervals for the test.

2026-11-07, bound a room client's queue in bytes too (#472) ​

A room client's outgoing queue held up to CLIENT_QUEUE_LIMIT (10,000) frames. Each client holds its own copy of every frame, so with 1 MB image outputs a client that stopped reading could hold about 10 GB before the frame count closed it; the 90 s idle timeout bounds how long, not how much.

ClientTx now also counts the bytes of frames queued and not yet taken by the socket task, and a send that would take them past the budget (max_body_size, 512 MiB by default) closes the client with 1008, "fell N bytes behind", as a full frame count does. One frame larger than the budget still goes to an empty queue, so a big notebook's first sync isn't refused. The Hold client, whose receiver is dropped, never counts anything: a send to a closed channel gives its bytes back.

2026-11-07, the save lock is the file's (#510) ​

Saves of one file run one at a time under a lock kept per path. The key was the path as named, so two names for one file, a symlink inside the root or a directory symlink, or another case on a case-insensitive volume, took different locks and could interleave their writes. The key is now the canonical path: the file's when it exists, else its canonical directory joined with the name. Found in the 0.7.0 code review (#440).

2026-11-07, session create, PATCH and DELETE races (#430) ​

SessionManager checked for a path's session, awaited the kernel start, then inserted, so two POST /api/sessions for one notebook (two tabs, a client retry) both missed the check and made two sessions and two kernels. create also returned the existing session even when its kernel had been culled or had died, and building its model then failed with 404. A PATCH that changed the kernel inserted its copy of the session back after the start, undoing a DELETE that ran meanwhile.

create and update now hold a per-path async lock across their kernel starts. The first version used one server-wide lock; review pointed out that with --gateway-url (no request timeout) one stalled kernel start would then block every session create. The locks live in a map keyed by path, and an entry is removed when its last holder lets go; a create for a path whose session is alive returns before taking any lock. create drops a session whose kernel is gone and makes a new one, as jupyter_server does. delete doesn't take the mutex; instead update writes back only if the session still exists, and otherwise shuts down the kernel it started and answers 404. Old kernels are shut down after the mutex is released, so a slow shutdown doesn't hold up other sessions.

2026-11-07, a failed SIGTERM or SIGKILL still ends the session (#487) ​

KernelSession::shutdown returned as soon as terminate or kill failed with anything but Unsupported, before mark_dead() and before closing the transport. The session then read as alive though the server had given up on it, and a failed SIGTERM never escalated to SIGKILL.

Now a failure is logged and kept: a failed SIGTERM goes on to SIGKILL, the session is marked dead and its transport closed on every path, and the last error is returned at the end.

2026-11-07, Unreleased notes for app changes (#502) ​

  • The docs and landing page describe the apps, which ship from ganymede-ui. An "Unreleased." note there was removed at the next Ganymede release, whether or not ganymede-ui had shipped the change. The macOS 26 / Apple silicon floor (ganymede-ui#356) was the case in point: the landing page has to keep "macOS 13 or later, Apple silicon or Intel" until ganymede-ui releases, then change.
  • App changes now take **Unreleased in ganymede-ui.**. Ganymede's release grep (Unreleased\.) skips it; check-unreleased accepts it. On the landing page it sits in an HTML comment beside text that is right until then, saying what to change.
  • ganymede-ui's scripts/release.sh reads these notes from Ganymede's main and opens an issue here listing them (ganymede-ui#397).

2026-11-07, The kernel venv on uv's managed Python (#452) ​

kernels.md recommends uv for the global Python kernel. Plain uv venv picks the first Python it finds, often Homebrew's, so a brew upgrade could still pull the interpreter out from under the kernel, the failure the global setup was meant to avoid. uv venv --managed-python always uses a Python uv installs itself.

Checked with uv 0.11.32: the environment's pyvenv.cfg points at uv's per-minor directory (cpython-3.13-...), and after uv python upgrade 3.13 the same environment reported 3.13.14 instead of 3.13.1 without being made again. A new minor version is a separate install, so the environment stays put until it is remade.

2026-11-07, Windows stays best effort (#60) ​

#60 asked whether to invest in Windows CI or stop advertising Windows. Thomas chose a third way: keep building and releasing the Windows archive, since the server is meant to run anywhere, but call it untested and best effort, with no plans for Windows CI. The README now says so next to the platform list, and Install and Known gaps no longer point at #60 as open work. The cross-compiled clippy check of the kernel host's Windows code stays in CI.

2026-11-07, JupyterLab workspace files named as jupyterlab_server names them (#492) ​

/lab/api/workspaces/<id> saved to <id>.jupyterlab-workspace with every character but ASCII letters, digits, -, _ and . replaced by _. So a/b and a:b shared a_b.jupyterlab-workspace and replaced each other, and an id longer than a file name allows answered 500.

The file name is now jupyterlab_server's slugify(id): lowercased, reduced to letters, digits, _ and -, cut to fit 128 bytes with the extension, then - and four hex digits of the id's SHA-256. The signature keeps a/b (ab-c14c) and a:b (ab-6783) apart, and the names match what JupyterLab writes to the same lab/workspaces folder. Two differences remain, both noted on workspace_slug: non-ASCII characters are dropped instead of NFKC-folded, and % escapes are not decoded a second time.

A workspace saved under the old name still loads when its metadata id matches, and its old file is removed when it is next saved or deleted, so the listing doesn't show it twice.

2026-11-07, XCFramework as a release asset (#456) ​

ganymede-ui built ganymede-ffi from source at its pinned GANYMEDE_REF in three jobs: 10 min of its 24 min PR job, and 10, 25 and 18 min in the v0.5.0 release. rust-cache restores dependencies but never workspace crates, so each run paid the full release build of a ref that hadn't changed.

release.yml now has an xcframework job on macOS that runs scripts/build-xcframework.sh and attaches GanymedeFFI.xcframework.zip and its .sha256 to the release and to main-build. The name has no version, so ganymede-ui can fetch it by tag (releases/download/<tag>/GanymedeFFI.xcframework.zip). The release and main-build jobs wait for it, so the attestation and SHA256SUMS cover it like the CLI archives. The CLI targets are unchanged. ganymede-ui's side is ganymede-ui#359.

The zip carries LICENSE and a THIRD-PARTY-NOTICES from cargo about for ganymede-ffi's tree on the three Apple targets, since the release now redistributes those crates. The job skips pull requests: CI's ffi (macos-latest) already runs the build script there, and a Cargo.toml change would otherwise queue a second macOS build.

2026-11-08, atomic extension install (#578) ​

lab extension install moved a wheel's extensions into place one at a time, after it had already removed the old version's and rewritten other packages' records. A move that failed partway left a mix of old, new and missing extensions, with records that matched none of it.

place now does the moves as one step: everything it replaces or removes first goes to a backup directory beside the extensions, then the new extensions move in. If a move fails, the new ones go back to staging and the old ones come back; if one can't come back, the backup is kept and the error names it. Records change only after place succeeds. A test puts a file where a scope directory should go to fail the second move.

2026-11-08, one rule for "the kernel took it up" (#588) ​

The engine's Tracked and MCP's Started each decided whether a timed-out request had started, from its busy or any output, and both learned it from execute_streaming's broadcast subscription. A subscriber that lagged past the busy never saw it, so a running cell could be reported as queued: MCP would skip the interrupt, and the engine would return Queued. The session's pending record keeps a request's statuses without lag, so KernelSession::record_so_far reads whether busy came along with the outputs, under one lock, and after a lag execute_streaming calls on_busy from the record when the broadcast skipped it, before handing the skipped outputs. When the lag is noticed after the request finished and its record is gone, the reply's statuses carry the busy. It calls on_busy once per request. Both trackers now go by on_busy alone, the rule its doc states. Output always follows busy, so dropping the output check loses nothing while the transport delivers the busy. A ZMQ PUB socket at its high-water mark could drop the busy and pass later output; such a request is now reported as queued and left running instead of interrupted. That trade is the rule #588 asks for.

2026-11-08, a timed-out request keeps its busy (#590) ​

execute_streaming learned that the kernel took a request up from the broadcast, or after a lag from the request's record. On a timeout the loop broke as soon as the request future returned, and that future had already dropped the record, so a busy broadcast between the loop's poll of the subscription and its poll of the request was lost: the cell read as queued and was left running. KernelSession::request_with_busy now reads the record just before it goes, and says whether busy came; with a reply it reads the reply's statuses. execute_streaming calls on_busy from that before it returns, which also replaces its separate check of the reply's statuses for a lag noticed after the request finished. A reply that completed the request as the time ran out took the record with it; the request now takes that reply from its channel instead of reporting a timeout. The race itself can't be reproduced on demand, so the test is at the session level: a request the kernel took up but never answered times out with busy reported, and one left queued without.

2026-11-08, Collab::delete and the session route's hidden-file error (#580) ​

Follow-ups from the #575 review. DELETE /api/contents took begin_move inline, and the test that covered it took the lock itself, so nothing showed the route did. The delete now lives in Collab::delete, which the route calls and a test drives: it waits for an index in progress and leaves the path without an id.

PUT /api/collaboration/session turned every 404 from the contents check into "does not exist"; a hidden file now keeps its own reason. index_existing says why the SQLite insert stays under the read guard (a busy shared database can hold back a rename), and the index-existing note quotes the MCP error as it reads.

2026-11-08, container base images pinned by digest (#549) ​

container/Dockerfile took node, debian and rust by tag, so a rebuild could get a different image under the same tag, and nothing proposed updates. Each FROM now names its tag and the multi-arch index digest (from the registry's Docker-Content-Digest for the OCI index), and dependabot.yml has a weekly grouped docker entry for /container. The NODE_VERSION and RUST_VERSION args went: a digest overrides the tag, so the args would have changed nothing, and CI never passed them.

2026-11-08, A crashed kernel's running cell gets the error (#532) ​

answer_for_crashed_kernel numbered the unanswered shell messages with enumerate() and then skipped those that aren't requests (no _request suffix, such as comm_msg). A widget's comm_msg sent just before a cell took index 0, so the cell that was running when the kernel died got aborted and no KernelDied output: the user saw the cell stop with no reason. The first message that is a request now gets the error.

sent_on_shell also keeps only *_request messages now. A comm_msg never gets a reply, so it stayed in the list (capped at 1000) and a widget sending many during a long cell could push the running request out of it.

2026-11-08, rename and delete finish when the client leaves (#586) ​

axum drops a handler's future when its client disconnects. A rename or delete dropped after the disk changed but before Collab::moved or removed left the file-id table, and any open room, on the old path. Collab::rename and Collab::delete now run the lock, the disk change and the id update on their own task and wait for it, so dropping the request no longer stops them. The REST handlers call them. A test aborts the caller while the operation waits for the lock and checks the file and its id still move or go.

2026-11-08, engine: no interrupt for a request that never started (#555) ​

Kernel::execute_with interrupted the kernel after any reply timeout. On a shared kernel, a request still queued behind another client's cell times out without having run, and that interrupt stopped the other client's cell. execute_with now wraps the caller's handler in one that notes the request's busy status, output or input request, and interrupts only when one arrived, as the MCP scratch run already did with its Started handler. A lag that skips a quiet cell's busy leaves it uninterrupted; the cell keeps running, which was the behaviour for every timed-out cell before the interrupt was added.

2026-11-08, exec: live output resumes after a lag (#521) ​

Since #507, execute_streaming stopped handing iopub messages over live after a broadcast lag and let the reply's record supply the rest. That kept order, but one early burst held back all later output until the cell finished, and an input request after a lag was answered before the prompt printed ahead of it was shown.

The session records each request's iopub messages before broadcasting them, so the record is always at least as far along as any subscriber. KernelSession::outputs_so_far(msg_id, from) exposes it while the request is pending, from index from on, so each catch-up clones only the new tail. On a lag, and before answering an input request, the handler catches up from it (deduplicated by msg_id, as before), and live messages then follow in order. When the record is already gone (the request finished between the lag and the catch-up), live handling stops and the reply's record supplies the rest, as before, with a warning in the log. A lag before the request is first polled skipped none of its output, so it changes nothing.

2026-11-08, execute endpoint waits for its batch (#566) ​

The apps' Shortcuts actions (ganymede-ui#302) call the in-process server over REST. POST /api/kernels/{id}/execute answered once the batch was queued, and a REST client had no way to learn when it finished: the outputs are in the room at once, but in the file only after the autosave a second later, and the room's state reaches clients only over the websocket. An optional wait (seconds) makes the reply wait for the batch and carry the cells as the room has them.

The cells are read with the room's own Get command after the batch's finished signal. The worker sends each cell's Done to the room before it signals, and the room handles commands in order, so the cells read carry their final outputs. Without wait the answer stays 200 null, as jupyter-server-documents answers, so nb-cli and JupyterLab see no change.

2026-11-08, file ids only for paths that still exist (#574) ​

notebook_room_id and the REST session and fileid/index routes checked a path existed, then indexed it, with nothing stopping a rename or delete in between. Collab::index_existing does both under move_lock for reading, and DELETE /api/contents now takes the lock for writing, as renames did (#522), so a path that's gone never gets an id. notebook_room_id returns the contents error, so MCP and the execute endpoint say why a notebook can't be opened ("cannot open x: no such file or directory: x") instead of only "cannot open x".

2026-11-08, lab clean leaves a running install alone (#562) ​

lab clean removed every dot-named entry in the installs directories, including the download and staging directory of an install running in another process. Installs (lab install and lab extension install) now hold a shared lock on .lock in their directory while they run, and lab clean takes it exclusively and skips that directory with a message when it can't, going on to the other one. Shared, so installs still run side by side: their entries have unique names. Uses std::fs::File::lock_shared/try_lock (Rust 1.89), so no new dependency.

The lock is best-effort both ways: where a filesystem has no working locks (NFS without lockd, some FUSE or SMB mounts) installs and clean go ahead unlocked, as before, with a warning. An install that finds clean running says it is waiting for it.

2026-11-08, login form body limit (#536) ​

POST /login reads its form before the XSRF check can run, because _xsrf is one of the form's fields. With only the server-wide max_body_size (512 MiB by default), an unauthenticated client could make the server buffer that much per request. The route now has its own DefaultBodyLimit of 64 KiB, which is far more than a token, _xsrf and next need. A layer on the route overrides the router-wide one, because the innermost DefaultBodyLimit sets the extension last.

A route layer replaces the router-wide limit rather than taking the smaller one, so the route uses min(64 KiB, max_body_size), and a max_body_size below 64 KiB still caps /login (login_keeps_a_smaller_max_body_size).

2026-11-08, the API pump no longer drops replies (#568) ​

The API's pump read the session's broadcast, which skips messages for a receiver more than 1024 behind. A skipped execute_reply or idle status never reached the client, so its cell stayed at [*]. KernelSession::subscribe_lossless gives a receiver an unbounded channel of its own, fed by route before the broadcast, and the pump uses it. The pump does no I/O (it hands each message to the clients' queues: iopub capped by count at CLIENT_QUEUE_LIMIT, replies unbounded), so the channel only absorbs bursts. route queues to it before the pending record fires done, so an attached kernel's shutdown_reply is queued before shutdown marks the session dead. Other consumers (exec, the engine) keep the broadcast: they recover lagged messages from the request's record.

2026-11-08, Markdown export: bad base64 falls back to text (#525) ​

The Markdown export wrote ![png](notes/<name>_files/output_N_M.png) before the server decoded the image, so an image whose base64 didn't decode left the file out of the zip and the link dangling. Decoding moved into ganymede-nbformat: ResourceData::Base64(String) became ResourceData::Bytes(Vec<u8>), and an output picks the first type in priority order that it can show. A PNG or JPEG that doesn't decode is skipped, so the output falls back to its next entry, usually text/plain, as an output with no image does. A cell attachment that doesn't decode is left out, and its attachment: reference stays as written. The server's zip writer now only copies bytes.

From the review: decoding takes padded or unpadded base64, as base64.decodebytes and JupyterLab do (the same lenient config as ganymede-contents). An attachment uses the first image entry that decodes, not the first image entry. Export::skipped lists the entries left out, and the server logs each as before; the export itself now runs on a blocking thread, since decoding a notebook's images can take a while.

2026-11-08, MCP resolves a notebook's room once (#584) ​

MCP's room() looked the path up three times: notebook_room_id for the hold map's key, then hold_notebook and with_notebook each again, every time a contents get and a file-id lookup under move_lock. A rename between them could put the hold and the call on different rooms. hold_notebook and with_notebook now take the room id, so room() resolves once and both reach the same room, which follows its file id through a rename. A test opens a room by id, renames the file, and reads the room through the same id.

2026-11-08, no file id for a path that doesn't exist (#560) ​

notebook_room_id indexed its path in the file-id table before anything checked the path, so an MCP call with a mistyped path (and the other server-side room helpers) left a persistent id for a file that doesn't exist, which GET /api/fileid/id then returned. The REST routes already checked first, as jupyter_server_fileid only indexes existing files. notebook_room_id now stats the path through the contents manager and returns None when it is missing; its callers already treated that as "cannot open".

2026-11-08, lab and ui open the redirect page (#539) ​

ganymede lab and ganymede ui passed the tokenized URL to open, xdg-open or explorer, so the token showed in the process list while the opener ran. jupyter_server opens jpserver-<pid>-open.html instead, a page that redirects to the URL, and ganymede already writes that file before it calls on_listening. The opener now gets that file's path, and the URL only when the file is missing (the runtime dir couldn't be written).

Review follow-ups: the server hands lab/ui the page it actually wrote (Startup::on_open_page, ServerInfoFiles::open_html), so a stale file from an earlier process with the same pid is never opened and the CLI no longer rebuilds the server's file name. The page goes to the opener as an absolute file:// URL, as jupyter_server does, so a relative JUPYTER_RUNTIME_DIR still names a file that exists. --no-redirect-file opens the URL instead, for snap and Flatpak browsers that can't read the runtime dir; docs/reference.md says so.

2026-11-08, a Host-rewriting proxy needs allow_origins (#546) ​

docs/security.md said a proxy that rewrites Host to 127.0.0.1:<port> needs no setting. It does get past the Host check, but the origin check (routes.rs origin_allowed, used by the XSRF check and every websocket) compares the browser's Origin with Host, and those no longer match. So saves and kernel connections fail until the public origin is in allow_origins. jupyter_server behaves the same way. The docs now prefer passing Host on, and say what the rewrite needs.

2026-11-08, pump backlog warning and replaced sessions (#579) ​

#568 moved the API's pump to a lossless channel, which took away the pump lagged warning: a backlog could grow with no sign of it. The pump now logs a warning when its queue reaches 10 000 messages, once until the queue falls below half.

A restart replaces the kernel's session while the old session's pump may still be forwarding what it had queued, so the old kernel's output and status could reach clients after the new kernel had started, and set the kernel's state from the wrong process. Each pump now forwards through forward_from, which drops a message when its session is no longer the kernel's. After a crash this changes nothing: the old pump forwards everything before the crash handler starts the new session.

2026-11-08, lab install picks a release with a pure wheel (#537) ​

newest_matching chose the newest matching release with any unyanked file. When that release had only an sdist or platform wheels, install_wheel found no py3-none-any wheel and the install failed, even though an older release had one.

The pure-wheel rule applies only to packages that get installed. The install loop also resolves every dependency it walks (tornado, pyzmq, numpy) to read its classifiers and requirements, and those have no pure wheel. So newest_matching and resolve take a pure_only flag. The walk resolves without it, and a package that is about to be installed is resolved again with it when its release has no pure wheel. A lone == pin is fetched directly as before, so a pinned release with no pure wheel still fails in install_wheel.

Second review: when the pure-wheel fallback picks an older release, the install loop now rebinds to that release's metadata, so the dependency walk reads the Requires-Dist of the version that was installed rather than the newest one's.

2026-11-08, a timeout while queued has its own error (#576) ​

Since #559, execute_with interrupts a timed-out cell only if the kernel had started it, but both cases returned Host(Timeout). A queued request still runs when its turn comes, so a caller reporting "timed out" was misleading. ganymede_engine::Error::Queued(Duration) now marks that case; its message says the kernel will still run the code, and the CLI prints it as is. Adding a variant to the public Error enum breaks exhaustive matches in embedders; the crates are pre-1.0 and docs/embedding.md lists the variants.

2026-11-08, no runs in a read-only room (#548) ​

A room whose notebook another server owns (#272) is read-only and never saves, yet execute.rs enqueue still queued cells into it: the execute endpoint answered 200, MCP notebook_run_all reported the run, and the kernel ran the code, but the outputs went into a room that never saves. enqueue now refuses a read-only room with a message saying where the notebook is open, which the endpoint returns as a 400 and MCP as an error, like MCP's edits already do. docs/rooms.md says so.

2026-11-08, release.sh and tag-release resume after a partial failure (#572) ​

scripts/release.sh --execute run from a release/vX.Y.Z branch whose head is "Release X.Y.Z" now resumes: it skips the bump, pushes, reuses an open "Release vX.Y.Z" issue, and stops if the PR is already open. The bump steps moved into a prepare function so the resume check reads first. If the branch already exists when a fresh run commits, the run undoes its own commit (git reset --keep HEAD~1) and says to resume from the branch instead.

tag-release.yml used to exit as soon as the tag existed, so a run that pushed the tag but failed to dispatch release.yml could never be finished by a rerun. It now dispatches when the tag is on this commit and there is neither a release nor a release.yml run for the tag.

Tested the resume path in a scratch repo with stub cargo-release, git-cliff and gh: first rerun pushes and opens the issue and PR, a second exits on the open PR, and with only the issue left it reuses it.

2026-11-08, removals respect a running install (#570) ​

lab remove, lab uninstall and lab extension remove take the exclusive lock that lab clean takes (#562) and fail, removing nothing, while an install holds the shared lock. They don't wait: an install can run for minutes, and a removal that silently waits looks hung. clean still skips instead of failing, since its leftovers can wait. The lock logic is one exclusive_lock for all four; where locks don't work they go ahead unlocked, as before.

uninstall locks both directories before deleting either, so an extension install (or lab install's default extensions) leaves the JupyterLab versions in place too. It deletes the lock files with the directories, so an install that was waiting re-checks, after it gets the lock, that its file is still the one at the path, and starts over on a new one if not.

2026-11-08, request timeout covers the send (#535) ​

KernelSession::request started its timeout after sink.send returned. A ZMQ DEALER to a dead kernel blocks a send once its queue fills, so such a request hung with no timeout. The deadline now starts before the send and covers both it and the reply; a send that misses it fails with Error::SendTimeout. a_request_whose_send_blocks_times_out uses a sink whose send never finishes.

Review follow-ups: the request wraps the send and the reply in one tokio::time::timeout, which handles huge timeouts (a now() + timeout deadline panicked on overflow), and labels the timeout by whether the send finished. a_slow_send_comes_out_of_the_reply_wait checks they share one deadline. Kernel::execute_with no longer interrupts the kernel after a send timeout: the request never reached it, so the interrupt would hit someone else's cell.

Second review: the send timeout is its own variant, Error::SendTimeout, rather than a Timeout("send") label other crates compared as a string, so the compiler holds that contract. ganymede-exec keeps it out of CellTimeout, so the MCP scratch run no longer says the code will run later (the request was dropped), and the REST 504 says the kernel did not accept the request.

2026-11-08, room lock probe vs. this server's own room (#547) ​

Locks::owned_elsewhere takes and drops a notebook's room lock to answer the contents API's writable. flock locks belong to the open file, not the process, so a room of the same server calling acquire during the probe got WouldBlock and started read-only, as if another server owned the file, until its next retry. Both now hold the server's held set across their try_lock, so they can't overlap. The test also caught a second gap: RoomLock::drop left the held set before its file closed, so a probe in between found the lock taken and not held here. It now closes the file first, under the same guard. The new test runs a prober thread against 2000 acquires. Undoing the acquire fix fails it every run; undoing only the Drop fix fails it some runs, since that window is narrower.

2026-11-08, Rooms ping test waits on a deadline (#520) ​

rooms_ping_clients_and_drop_silent_ones waited for the silent client's room to retire for 100 iterations of "read the live socket for up to 20 ms". The live socket gets a ping every 50 ms, and each one ends an iteration early, so the real bound was well under 2 s, against a server that needs about 650 ms (idle timeout, one ping interval, cleanup delay, and one 250 ms tick of the room's loop). A slow macOS runner ran past it. Both waits in the test are now wall-clock deadlines (10 s for the retire, 5 s for the room to open), and the failure message says how long it waited. Both keep reading the live client, so it answers its pings throughout, and a close or drop of it fails the test: otherwise a slow runner could drop the live client instead and the room count alone would still pass. Counting loop iterations as a time bound is unreliable whenever the loop body can return early.

2026-11-08, Rooms: no room opens mid-rename (#522) ​

patch_contents renamed the file on disk, then Collab::moved moved the file ids and bumped moves. A join in between read the new moves, looked the id up (still the old path), took the rooms lock before moved did, and opened the room on a file that was gone: the client got 4404. Checking moves can't catch that, since nothing had bumped it yet. Collab now has a move_lock (a tokio RwLock<()>): the rename holds it for writing, through Collab::begin_move(), from before the disk change until the ids follow, and opening a room holds it for reading across the path lookup. A joiner waits for a rename without polling, and a failed rename just drops the lock, since the path hasn't changed. moves still catches a rename or delete that finishes between the lookup and the open.

The websocket join and send_to_notebook_room now share one helper, send_to_room, and serve_socket no longer looks the path up first. An open room takes the join before any lookup, so a rename elsewhere costs a joiner nothing, and a client joining the room of a just-deleted file reaches the room (which says "File deleted") instead of getting "Unknown file id". A room entry whose task has stopped is replaced by a fresh room rather than reported as an unknown file id.

2026-11-08, a dropped kernel session closes its transport (#564) ​

KernelSession::start_with spawned route with a strong Arc<Inner>. Inner owns the transport sink, whose socket tasks own the sender of the channel route reads, so the three kept each other alive: a session dropped without shutdown never closed its ZMQ sockets. route now holds a Weak<Inner> and upgrades it only while it handles a message, as the heartbeat monitor and process watcher already did. When the last KernelSession drops, ZmqTransport's Drop aborts its socket tasks, the channel closes, and route ends.

Inner now also runs mark_dead on drop, so watch_alive receivers see false, waiting requests fail, and close() runs for transports that free resources only there, instead of relying on each sink's own Drop.

2026-11-08, Shell waits for the heartbeat port (#501) ​

parallel_starts still failed on macOS with a cdp-node kernel that couldn't bind one of its ports: cdp-kernel retries a taken port for five seconds, answers kernel_info meanwhile, then exits. The start had already succeeded, so the kernel died under the test's first execute. The port's holder showed as "unknown" (no socket lsof could see), so the port reservations (#327) can't help there.

The ZMQ transport's shell socket already waited for stdin and iopub before sending anything. It now also waits, for up to 10 s, until the heartbeat port answers a ZMTP handshake: a bare TCP accept would pass for a port another process listens on. A kernel still waiting on that port doesn't receive the start's kernel_info_request, so its death fails the start, and Relaunch::start (and the server's start) retries on fresh ports. A clash on shell or control was already caught, since the start's nudge needs a reply on both, and stdin and iopub were already gated.

After the 10 s grace, longer than cdp-kernel's retry, shell sends anyway, so a kernel whose heartbeat port never answers here (not served, or an attached kernel with only some ports tunnelled) still starts, as it does with jupyter_client. The general fix is in cdp-kernel, which could answer on shell and control only once all its channels are bound.

2026-11-08, tag-release.yml job permissions (#538) ​

tag-release.yml granted contents: write and actions: write to the whole workflow, against the rule in docs/development.md that a workflow starts from contents: read and a job asks for more itself. The tag job, the only one, now holds both. It runs only when a release pull request merges, so the first release after this change exercises it.

2026-11-08, Trust: nbformat 3 notebooks are checked by their worksheets (#531) ​

trust::check_cells looked only at the top-level cells. An nbformat 3 notebook keeps its cells under worksheets[*].cells, so nothing was checked, the notebook counted as trusted, and a save signed it whatever its outputs held. nbformat's NotebookNotary walks the worksheets for v3, uses v3's names for the unsafe outputs (pyout and display_data) and safe keys (prompt_number, not execution_count), and never trusts a notebook older than v3. check_cells and mark_cells now do the same.

The fixture generator (tests/fixtures/generate_trust.py) gained five v3 and v2 cases, recorded from nbformat 5.11.1; the existing fixtures came out unchanged.

A test saving a v3 notebook through FsContents found a second gap: save upgrades it to v4 and signed the upgraded notebook with its orig_nbformat metadata, which writing strips, so the signature never matched what get reads back and a saved v3 notebook was never trusted on reopening. Save now signs the notebook read back from the bytes it writes.

2026-11-08, Windows: no colons in API paths (#545) ​

ApiPath::parse refused backslashes, a leading slash and .., but on Windows a component such as C:x is drive-relative: joined onto the contents root it replaces it, so the request reached a path on drive C: outside the root. a:b also opened an NTFS stream of a. On Windows a path with a colon is now OutsideRoot, like a backslash. Other platforms keep allowing colons in names. parse_for takes the platform as an argument so the rule is tested on every CI runner, since Windows has none.

2026-11-09, cdp-kernel 0.9.0 (#621) ​

CI, the container image and the docs now use cdp-kernel 0.9.0. It brings cdp-kernel #444: a later cell can redeclare a name an earlier cell declared another way (import { x } after const x), the clash that broke the journal run's probe cells (#609). Top-level const now runs as let, so a later cell can reassign it.

2026-11-09, Cell API reference on the site (#607) ​

The reference pages for what cells call, generated from TSDoc in cdp-kernel (jupyter, widgets and comms, tlockney/cdp-kernel#441) and ganymede-device (device, tlockney/ganymede-device#88), now show on the site under "Cell APIs" (/docs/cell-api/). Like ganymede-ui's docs, they are fetched at build time (npm run fetch-cell-api), not committed. The fetch renames the pages (jupyter-reference.md to jupyter.md, and so on) and rewrites their links: between the pages, to cdp-kernel.org for cdp-kernel's guides, to this site for ganymede-ui's device guide, and to GitHub for anything else, so a new link upstream can't fail this build. "Edit this page" points at the doc comments' source. Next on #596: bundle the pages in the apps.

2026-11-09, cell_snapshot follow-ups (#618) ​

A second review of #613 found five small gaps in cell_snapshot. A long Markdown output cut at 4,000 characters could end inside a code fence and turn the rest of the pasted snapshot into code; a cut one now goes in a text fence instead. The notebook name went into file names as is, so Q#3 results.ipynb gave a link a renderer reads as a fragment: names keep [A-Za-z0-9_-] like cell ids, and link paths encode #, ? and % as well as < and >. The cell id in the heading and alt text is the sanitized one, so a backtick in an id can't end the code span. Stream text collapses \r frames to the last, so a progress bar's final line isn't lost to the cut. Markdown cells' attachments are saved like image outputs and their attachment: links point at the files.

These reuse fenced, overwrite_returns and replace_attachment_refs from ganymede_nbformat::export, which are now public; the snapshot's own fence helper went.

The review of this change found that attachment links in angle brackets broke <img src="attachment:…">, the usual way to size an attachment, so they now use export's percent-encoded url_path (also made public). Notebook names keep letters in any script, so 分析.ipynb keeps its name. Raw Markdown, from an output or a Markdown cell, gets a closing fence when it leaves one open, and the long-Markdown check counts the trimmed text.

2026-11-09, Snapshots of cells for the agent's user (#611) ​

Thomas wanted a journaling agent to show what the notebook produced in its chat replies: a chart, a table of results, the code behind them. The new MCP tool cell_snapshot(ids) returns cells as Markdown: the code in a fence tagged with the notebook's language, each image output saved to a file and linked by path, HTML tables (pandas, Polars) as Markdown tables cut to max_rows, Markdown output as it is, and other text without ANSI colours. Images go to snapshots/ in the private outputs directory, or with dir to a directory under the server root through the contents API (not in read-only mode). The shaping lives in mcp/snapshot.rs, which has no I/O; the tool writes the files.

The same tool fixes the third rough edge from the Fremont Bridge run: on a shared serve --mcp without mcp_images the agent never saw its charts, and wrote "stayed near 30%" from a table while the chart showed a climb to 44%. cell_snapshot returns the images as MCP image content whatever the server's image setting, since the agent asked for them. The journal skill and the journal prompt now say to look at each chart before writing its finding, and to paste snapshots when reporting to the user. The journal-reviewer agent gets the tool to check findings against charts. images in cell_run replies now uses the same image picker, so an output with both PNG and JPEG sends only the first.

The HTML table reader is a small scanner over <tr>, <th> and <td> rather than an HTML parser dependency. It takes the first table in the output and its first row as the header, which fits pandas and Polars' HTML. Vega-Lite specs without an SVG or PNG still come out as text.

The reviewer of #612 found that an error's ename and evalue still reached the agent with colours (#614): cdp-kernel describes a thrown non-Error with inspect, colours on, so throw { code: 1 } arrived as { code: \x1b[33m1\x1b[39m } in the @@output head. Those two fields are stripped now too, and the per-frame strip of tracebacks went, since the joined body is stripped anyway.

The review of #613 caught that the image links used the bare path as the Markdown destination, so a notebook named Fremont Bridge.ipynb gave a link that renders as text. Links are now ![…](notes/<path>). File names got a short hash of the image (a re-snapshot no longer overwrites a file an earlier reply links to) and keep only [A-Za-z0-9_-] of the cell id, which nothing validates. Rows in <thead> after the first (Polars' dtypes) are left out of tables, and errors and Markdown are cut at 4,000 characters like other text.

2026-11-09, Device API is macOS and iOS only (#615) ​

The docs never said the device API exists only on Apple platforms. app.md now says so, and the "Cell APIs" sidebar labels the page "device (macOS and iOS)". The page itself comes from ganymede-device's reference, which carries the same note (tlockney/ganymede-device#117), as does ganymede-ui's guide (tlockney/ganymede-ui#431).

2026-11-09, downloads retry a 5xx or a timeout (#634) ​

Item 13 of the project read of 2026-11-09 (#629).

The weekly CI run of 2026-11-09 failed in e2e's install_from_github: ganymede ui install got an HTTP 504 from a GitHub release download and gave up. ganymede lab install and lab extension install fetch from PyPI through the same agent and gave up the same way.

  • retry in crates/ganymede-cli/src/lab/pypi.rs sends a request again after 1, 2 and 4 seconds while it fails with a 5xx status or ureq's timeout for the response, and prints a line on stderr each time. The three requests that fetch something go through it: PyPI's JSON, a wheel, and a release file (each hop of the redirects ganymede ui install follows by hand).
  • Nothing else is retried. A 404, a refused connection, a failed name lookup or a TLS error would fail the same way again, and someone offline should hear so at once and not seven seconds later. The connect and name lookup timeouts are not retried either (the review of #635 caught that the first version matched every timeout): a host that drops packets would have taken four 30 second waits to report.
  • It covers the request up to the response's headers. A body that stalls or is cut off part way still fails the install: retrying that means starting the file again, and the hash check already catches a short download. That is the next step if it turns out to matter.
  • The worst case is longer than before: four attempts at the 60 second wait for a response, where there was one.

The tests run a plain HTTP server on localhost that answers each connection from a script, so they see the errors ureq really reports for a 504 and for a server that never answers. The agent the CLI uses is HTTPS only, so the tests build their own and call the same function.

2026-11-09, ganymede-ui 0.6.0 by default (#601) ​

ganymede ui install now installs ganymede-ui 0.6.0. DEFAULT_SHA256 is the SHA-256 of ganymede-ui-0.6.0.zip from the release's SHA256SUMS, checked against a download. The zip is about 4.8 MB (10 MB unpacked), well inside the install limits.

The apps in 0.6.0 need macOS 26 or iOS 26, and the Mac app is Apple silicon only, so the landing page and docs/app.md lose their "Unreleased in ganymede-ui." markers and state the new floor. The server and CLI keep their wider OS and Intel support.

2026-11-09, journal notebooks open trusted (#597) ​

Thomas journaled a few notebooks with Claude Code and saw no outputs in the app. The outputs were in the files. The notebooks were unsigned, so the app treated them as untrusted: the p5.js canvases (HTML iframes) were sanitized down to their captions, and an SVG chart with no text fallback showed nothing.

A room saves through the contents manager like a frontend, and the contents manager signs only when every code cell arrives marked trusted. The room never marked any. Now it marks each code cell trusted unless it holds outputs the room read from an unsigned file, at load or when it merged a file change in (only outputs new in the file, so an unsigned write doesn't undo the room's own runs). The room keeps one set of digests of those outputs, not one per cell id, since a cell cut and pasted gets a new id. When a run through the execute path (which MCP uses) replaces a cell's outputs, their digests leave the set, so rerunning an old journal repairs it even when the outputs come out the same. Trusting the file with the room open (ganymede trust, a frontend's Trust) is seen at the next save, which finds the file signed and forgets the entries.

The first version keyed by serialized output text and failed open: the room gives output objects back with their keys in another order (Yjs maps are hash maps), so nothing matched and untrusted HTML got signed. Digests now hash a canonical form (keys sorted) of the outputs as the room holds them, with the file passed through a throwaway room first so numbers match too. Matching per output, not per list, keeps a cell untrusted when someone removes only one of its outputs.

Outputs a client writes into the room count as trusted, as they would if that client saved through PUT /api/contents with its cells marked trusted: both need the server's token.

The second half of the ask: keeping outputs stays the default, and keep_outputs: false / cell_clear_outputs let an agent keep a cell's code but leave its outputs out. The mark sits in metadata.ganymede.outputs so notebook_run_all and later edits honour it. It clears outputs after the run, so it is not a way to hide credentials; the skill says not to print them at all.

2026-11-09, JupyterLab 4.6.6 (#638) ​

Item 9 of the project read of 2026-11-09 (#629). JupyterLab's version was written in three places that disagreed: ganymede lab install pinned 4.6.4, CI's lsp job installed jupyterlab==4.6.5, and ganymede-ui's @jupyterlab/* packages were 4.6.4. PyPI's latest is 4.6.6, so the weekly pins job had been failing. All three move to 4.6.6; ganymede-ui's in tlockney/ganymede-ui#455.

  • DEFAULT_VERSION and DEFAULT_SHA256 in crates/ganymede-cli/src/lab.rs are 4.6.6 and the SHA-256 PyPI lists for jupyterlab-4.6.6-py3-none-any.whl. tests/lab.rs with GANYMEDE_E2E_LAB=1 downloads the wheel and checks it against the pin, so a wrong hash fails there.
  • The validation scripts drove 4.6.6 in headless Chromium against ganymede serve and cdp-kernel: login.mjs, trust.mjs, widgets.mjs with RELOAD=1, and jupyterlab.mjs, as scripts/test-workstation.sh runs them. All four passed. The default extensions (jupyterlab_widgets 3.0.17, anywidget 0.11.0) are unchanged and still the latest.
  • The docs name the default in two places a reader acts on, docs/install.md step 4 and docs/frontends.md. Each has an "Unreleased" note saying the latest release installs 4.6.4. This is a change to a released command, which needs no note by the rule, but without one the page would tell someone on the release that ganymede lab remove 4.6.6 removes what they installed.
  • Tests that build a stand-in bundle keep 4.6.4 as its version. They don't read the pin.

The three places still have to be moved by hand together. pins checks the first against PyPI; nothing compares the other two with it.

2026-11-09, MCP replies without ANSI colours (#610) ​

A real ganymede-journal run on cdp-kernel showed results reaching the agent as \x1b[32m'day'\x1b[39m: cdp-kernel's text/plain is Node's util.inspect with colours on, and the MCP reply stripped escapes only from tracebacks. render_outputs now strips them from every body it sends (streams, Markdown, plain text, stripped HTML) before the inline limit is applied, so a spilled file has none either. The notebook keeps the colours, which JupyterLab and the apps render for people. render_outputs and spill became free functions so a test can call them without a server.

The same run hit a declaration clash: a scratch probe's const { hourly } made a recorded import { hourly } fail. V8's REPL mode only lets a name be redeclared with the same kind of declaration, and cdp-kernel turns imports into var. The kernel fix is tlockney/cdp-kernel#444; until it ships, the journal skill tells agents to wrap TypeScript probes in a block.

2026-11-09, cdp-kernel's Node floor is 22.18, not 24 (#632) ​

Item 7 of the project read of 2026-11-09 (#629).

site/install.sh skipped cdp-kernel below Node 24 and said "cdp-kernel needs Node 24 or later", and the README, the install page, the landing page and the install diagram said the same. cdp-kernel's floor is Node 22.18: its engines, its README and its CI, which tests 22, 24 and 26. So someone on Node 22 LTS got Ganymede with no kernel and a message that was wrong. The 24 came from what Ganymede's own CI runs, which is a choice of what to test with; CI stays on 24.

  • The installer compares major and minor now. The old check took the major alone from node -p. The new one reads process.versions.node and splits it in the shell, and treats anything that isn't a number as 0, so an odd node gets the upgrade hint and not an npm install.
  • scripts/test-install.sh runs the installer with a stub node at 22.18.0, 22.23.4, 23.0.0 and 26.1.0 (kernel installed) and at 22.17.1, 20.19.5 and 18.20.8 (hint, no npm, exit 0). The second group fails against the old installer.
  • The installer goes live when this merges and installs the latest release as before, so nothing here waits for a release and nothing needs an "Unreleased" note.

Also in this PR: docs/architecture.md no longer describes ganymede-ui's packages/client, which tlockney/ganymede-ui#452 deletes.

2026-11-09, notebooks_search (#624) ​

The notebooks-from-notebooks research (/mnt/project-files/research/2026-11-09-notebooks-from-notebooks.md) found that nothing searches across a collection of notebooks, and that "what do I already know about X" is the first thing Journal needs from it. notebooks_search is the agent side of that: every word of a query, ignoring case, over cell sources and optionally text outputs, under a directory.

A notebook open in a room is read through Collab::open_notebook, which looks the file id up without making one (FileIds::get) and reads only a room that is already open; others are read from disk through the contents API. So a search opens no rooms, takes no room locks, and adds no rows to the file id table. The walk goes through the contents API too, so hidden files stay out as they do for the rest of the API, and stops at 2,000 notebooks. The review found that the walk followed directory symlinks: a link to an ancestor repeated results, and two made the walk exponential. It now keeps the canonical path of each directory it lists and skips one it has seen; for contents that aren't a local directory, it stops after 10,000 directories.

Plain substring matching, no index: a journal directory is small, and an index (a new dependency such as tantivy) can wait until a search is slow. A "finding" cell tag, which would let search return only findings, is an open question for Thomas, as is an in-kernel library.

The journal skill and the journal prompt now search before starting a new journal.

2026-11-09, portability job fails on warnings and checks wasm-smoke's lockfile (#636) ​

Items 14 and 15 of the project read of 2026-11-09 (#629). Both are about things CI built without looking at.

  • Warnings. The portability job is the only place the core libraries are compiled for iOS, Android and wasm. Clippy runs with -D warnings, but for the desktop targets, so a warning that appears only on the others showed in a log nobody reads: ganymede-terminals printed 8 on iOS and wasm until #626. The job now sets RUSTFLAGS=-D warnings. Cargo caps lints for registry dependencies, so this covers the workspace's own crates and e2e/wasm-smoke, not theirs.
  • The lockfile. e2e/wasm-smoke is its own workspace, so its Cargo.lock is tracked but read by one CI step only, and that step built without --locked: cargo rewrote the stale file in each run and threw the result away. It went stale at every release, because cargo-release bumps the workspace and knows nothing of this file, and whenever a crate it depends on gained a dependency. The step now checks the lockfile first (cargo metadata --locked) and fails with the command that refreshes it, then builds --locked. scripts/release.sh runs that command after cargo-release's commit and amends the lockfile into it.
  • cargo update --workspace is the refresh that changes least: it updates the path dependencies' versions and adds what is missing, and leaves every registry dependency where it was. Simulating a bump to 0.7.1 changed five lines, one per crate.

The cost: a PR that adds a dependency to a crate the engine needs, or that raises a version requirement past what this lockfile holds, now fails portability until the lockfile is refreshed. That includes a Dependabot PR for the main workspace that raises a requirement in a manifest. The error names the command.

Two things the review of #637 caught. The refresh in release.sh runs after cargo-release has committed on main, so a failed cargo update left that commit there with no release branch, and a rerun stopped on "HEAD is not origin/main". The script now undoes the commit when the refresh fails. And the CI step called every cargo metadata --locked failure a stale lockfile; it prints cargo's error and adds the annotation only when cargo says --locked stopped it.

2026-11-09, Privacy page: the Mac app's update check (#599) ​

ganymede-ui's Mac app now checks GitHub daily for a new release, on by default (tlockney/ganymede-ui#411). The privacy page said crash reporting was the only exception to "no telemetry", so it now describes the check: one GET of the release feed, nothing about the user sent, off in Settings. It carries the Unreleased in ganymede-ui note until that release.

2026-11-09, rmcp 3.9.0 for RUSTSEC-2026-0462 (#603) ​

cargo-deny's audit job started failing on every PR: RUSTSEC-2026-0462 says rmcp's Streamable HTTP clients before 3.9.0 buffer a response body with no size limit. Ganymede enables only rmcp's server features (server, transport-io, transport-streamable-http-server), so the affected client code isn't built. The lockfile moves to rmcp 3.9.0 anyway, so audit passes without an ignore.

Only the rmcp and rmcp-macros entries changed. A plain cargo update -p rmcp with a newer local cargo also re-resolved unrelated windows-sys and getrandom edges, so those hunks were left out; cargo metadata --locked accepts the result.

2026-11-09, diagrams for the rooms page (#594) ​

docs/rooms.md described rooms in prose only. It now has four SVG diagrams in docs/images/rooms/, in the style of the architecture diagrams: an overview of clients, the room and the file; the cell-by-cell merge as a table of cases; running cells through the execute endpoint as a sequence; and two servers on one notebook. The merge reads more easily as a grid of "room + file → result" rows than as a flow, since each case is independent. The SVGs were generated by a short script and checked in light and dark in Chromium.

The execute diagram leaves out the unreleased wait reply, so the diagram stays true for the latest release; the "Waiting for the cells" subsection, which carries the Unreleased note, describes it.

#411 moved the description of document rooms into docs/rooms.md and left protocol.md's "Document model and collaboration" as a short design note that links there. The roadmap's "Document rooms" entry and api.md's "Every route" still linked that note for how rooms and their endpoints work, so a reader took an extra hop. Both now link rooms.md. Found by the weekly docs freshness check.

2026-11-09, JPY_SESSION_NAME is the notebook's path (#623) ​

The kernel host set JPY_SESSION_NAME to the kernel id for every kernel. jupyter_server sets it, for a session's kernel, to the kernel's directory for the session path joined with the session name (SessionManager.get_kernel_env), and updates it on a rename for the next restart. ipykernel reads it for __session__, and it is the only way kernel code can find the notebook it runs in, which the notebooks-from-notebooks research needs first.

KernelManager::start_for_session takes the value and keeps it on the kernel, so a restart (asked for or after a crash) passes it again. SessionManager::update stores the new value on a path or name change without restarting. The host still defaults to the kernel id, and a launch's env now overrides it. A kernel started with POST /api/kernels keeps the id: jupyter_server sets nothing there, and dropping the variable could break a kernel that reads it.

2026-11-09, sign before writing a notebook (#617) ​

mcp_journals_into_a_notebook failed once on macOS at "journal signed". The room's saves are all trusted (no outputs came from an unsigned file), so the cause was not mark_trusted: FsContents::save wrote the file and then stored its signature. The test polls the file, and a read between the two found the new contents with no signature yet. Any reader could hit the same window, such as a frontend opening the file just after a room save, which would show it untrusted.

jupyter_server's FileContentsManager.save calls check_and_sign before _save_notebook, so the save now signs first. A failed write leaves a signature for contents that never reached disk, as in jupyter_server; it does no harm, since nothing on disk matches it.

copy signed after writing too, and now signs first as well.

the_signature_is_stored_before_the_file_is_written (in crates/ganymede-contents/tests/trust.rs) uses a signature store that records whether the file already held contents when the signature was stored, for a save and a copy.

2026-11-09, remove the ganymede-server binary and four unused public functions (#630) ​

Items 4 and 5 of the project read of 2026-11-09 (#629).

  • The ganymede-server binary is gone. crates/ganymede-server had a main.rs that parsed ServeArgs and called serve::run: what ganymede serve does, without the CLI's other flags. No release, image or script shipped it, and only the crate's README named it, but every workspace build and test run linked it. The crate is a library now; its README shows cargo run -p ganymede-cli -- serve.
  • Four public items had no caller in this repository, ganymede-ui, cdp-kernel or ganymede-device, and no page of the docs names them: ContentsModel::without_content, iopub_topic, host_socket_kind with its SocketKind, and Cell::metadata_mut. The ZeroMQ transport (ganymede-kernel-host/src/zmq.rs) subscribes to every iopub topic and connects each socket by its type itself, so it needs neither iopub_topic nor host_socket_kind.

This is an API change for an embedder: the workspace is publish = false, but ganymede-engine re-exports ganymede-nbformat and ganymede-protocol, so three of the four were reachable as ganymede_engine::nbformat::Cell::metadata_mut and ganymede_engine::protocol::wire::{iopub_topic, host_socket_kind}. A Cell's variants and their metadata fields are public, so a caller that wants to change metadata matches on the cell, as the code here does. Left in place on purpose: to_writer (the nbformat README names it), Engine::adopt_launched (Embedding documents it) and ExecuteBody.client_id (accepted and ignored, as jupyter_server's clients send it).

How they were found: for each pub fn and pub enum in the workspace, a search for its name outside its own definition, then a look at each hit.

2026-11-09, unused dependencies, dead helpers, iOS build warnings (#625) ​

A read of the whole project for things that are broken or no longer needed found little in this repo that tools flag: clippy, the tests, the docs build and the links are clean. What it did find:

  • Dependencies nothing uses. A script compared each crate's Cargo.toml with the identifiers in its sources. Removed: ganymede-protocol from ganymede-api and ganymede-exec, serde from ganymede-gateway, thiserror from ganymede-server, the dev-dependencies tempfile and anyhow from ganymede-engine and anyhow from ganymede-kernel-host, and chrono from ganymede-kernel-host's browser-wasm section. That last one only turned on chrono's wasmbind, which ganymede-protocol already does for the whole build; kernel-host has no chrono dependency otherwise. rustc doesn't warn about an unused dependency, and cargo-machete or cargo-udeps isn't in CI.
  • e2e/wasm-smoke/Cargo.lock was three releases behind. It listed the workspace crates at 0.4.0 and lacked ganymede-nbformat's base64 dependency. The portability job builds it without --locked, so cargo quietly fixed it up in each run. The file is refreshed here; it will drift again at the next version bump, since scripts/release.sh doesn't touch it. Building with --locked would catch that, and would also fail every release pull request until the release hook updates this lockfile too.
  • Dead helpers. testing.rs in ganymede-kernel-host kept an unused mpsc import alive with an _unused function under #[allow(dead_code)]; both are gone. KERNELS in ganymede-cli's test helpers had no users.
  • iOS and wasm warnings. With Rust 1.97, cargo check -p ganymede-terminals --target aarch64-apple-ios printed 8 warnings: the stub pty::Waiter was an empty enum, so rustc reported everything after process.waiter() in Terminal::start as unreachable and the variables before it as unused. The stub is now a unit struct. Nothing can make one, since the stub Process is still an empty enum. The portability job uses cargo check, which passes with warnings, so these never failed CI.
  • .dockerignore. node_modules matches only the repository root. A local docker build -f container/Dockerfile . sent docs/node_modules and validation/node_modules to the daemon. It is **/node_modules now. CI's checkouts have neither directory.
  • pages.yml. The comment about the cell API reference sat above the npm test step.

Checked locally: cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings, the Windows clippy run, and the portability job's checks and tests for iOS, Android and both wasm targets.

2026-11-10, in-app kernel registration design (#266) ​

On the iPad and iPhone the in-app kernel runs beside the embedded server, not through it: the notebook page runs its own kernel service and Swift relays messages to a Worker in a hidden web view. So rooms, the execute endpoint and the agent tools built on it don't reach notebooks on that kernel. The direction review of 2026-11-09 put fixing that before the choice of a native engine, and this note is the design for review before any code: In-app kernels as server kernels.

It proposes three C functions and a callback table that register the app's kernel with the embedded server, with Jupyter JSON per channel, and keeps today's Worker kernel unchanged behind them. It also covers a "lost" reason for kernels iOS ends in the background with a Restore action, kernel capabilities in kernelspec metadata, and the two places a kernel core could run once a native engine replaces the Worker. Reading the code for it showed that the kernel host is per window today (WebView.swift makes one per web view), so registration moves it to the app, and that cdp-kernel's browser kernel doesn't use the service-worker relay, which only matters once Pyodide registers.

2026-11-10, registering an app's kernels through the C ABI (#266) ​

Built Ganymede's half of In-app kernels as server kernels: ganymede_kernel_register, ganymede_kernel_deliver and ganymede_kernel_ended, over a new RegisteredKernels in ganymede-kernel-host that is a kernelspec source, provisioner and transport factory at once. The server puts it in front of whatever kernels it would otherwise have (Startup::registered), so the iPad's in-app kernel can sit beside a gateway's.

Two things the seams didn't give for free. The transport factory gets only a LaunchedKernel, with no kernelspec name, so RegisteredKernels recognises its own launches by the address of the process handle it made, and passes anything else to the fallback. And a kernel the platform ended needed a way to say so: KernelProcess gained exit_reason(), which the crash path reads to restart a "lost" kernel without counting it toward restart_limit and to add "reason": "lost" to the status: restarting it announces.

Messages from the app go into an unbounded queue, so deliver never blocks the app's thread, and a task moves them into the session's bounded one. The test in crates/ganymede-ffi/tests/server.rs drives a fake kernel through the C functions over the REST API: a session starts it with the notebook's path, "lost" restarts it under the same id, a DELETE stops it, and release runs once at server stop. The apps' side is ganymede-ui's next step.

Review fixes: the host's stop now drops the run from the registry (it stayed listed before, with its forwarding task), the kernelspec file route returns 404 for a kernelspec with no directory instead of reading from the working directory, and the header and docs say a stopped run delivers nothing more, since a restart reuses its id. Losses don't count toward the restart limit, so repeated losses restart without a cap; the design note lists that under its open question on restarts.

Second review: the file route checks for an empty resource directory rather than a relative one, since kernelspecs under a relative JUPYTER_PATH have relative directories. Registered kernelspecs are now listed after the server's own, so the server's default kernel stays the default, and their names follow the on-disk rules (lowercased, [a-z0-9._-]).

Third review (pass) lows: comments that still said registered kernels are listed first are fixed; the header documents deliver's return codes and that a loss before the kernel first answers is a failed start; and the header and embedding page say to stop the server off the main thread when registered kernels' callbacks need it.

2026-11-10, site intro by what Ganymede enables (#640) ​

The landing page opened with "The Jupyter server, without the Python." and the README with "no Python runtime and no Python dependency". Both describe Ganymede by what it lacks, which says little to someone who never needed Python in the first place, and undersells the apps and the agent work. The first screen, the README and the docs home now say what it is for, with three ways in: TypeScript notebooks on cdp-kernel, agent journals over ganymede mcp, and the Mac, iPad and iPhone apps.

The Python-free detail stays where it is useful: the "No Python runtime" feature card, the Replacing Python page, and the README's status section. The "Why" section now starts from the two uses that started the project, TypeScript notebooks and an iPad app, rather than from Python. The copy describes; it doesn't promote.

2026-11-11, agents overview page (#689) ​

The Agents group started with setup (Agents over MCP), so nothing said why an agent should journal into a notebook or how the server keeps a person and an agent on one live document. The "Ganymede for agents" page written for the project on 2026-11-10 said both, outside the repo.

docs/agent-journals.md brings its argument into the docs as the group's first page: why a journal beats a write-up, the three layers (MCP tools, document rooms, the file), the tool design, and the Claude Code plugin, each linking to Agents over MCP or the rooms guide for details. Left out on purpose: the "no Python" opening (the site stopped describing Ganymede by what it lacks in #641), the comparison table against other notebook MCP servers (outward-facing, and it goes stale), and the availability box, since everything it named shipped in v0.8.0. The page says the apps don't show an agent's edits live yet. The top nav's Agents link opens it.

2026-11-11, The API by example: review follow-ups (#689) ​

Lows from the review of #707, fixed after it merged:

  • The intro said every exchange came from ipykernel. The run example came from cdp-kernel, whose package-stats notebook is in cdp-kernel #472. The intro now says so.
  • The new examples sent Authorization: token <token>. They now send tok, the token the page's server uses.
  • The grant section named jupyter.host(), which is cdp-kernel's client. A grant covers host calls from any kernel, so the section now says "the host API". It is also marked as Ganymede's own route, like the run section.
  • The grant section now gives the 404 and 409 answers. "Every route" links the sections on this page as well as reference.md.

2026-11-11, The API by example: runs and grants (#689) ​

api.md showed requests and answers for the Jupyter routes but only listed Ganymede's own POST /api/notebooks/run and /api/host/grants/{path}; their shapes were in reference.md's prose. Two sections now show each with a real request and answer, captured from ganymede serve 0.9.0 running cdp-kernel's package-stats example: a run that succeeds, one that fails after its kernel started (200, "status": "error"), a notebook that can't be read (404), and a grant's PUT with its defaults. reference.md stays the place for every key and status.

2026-11-11, apps status wording on the site and README (#684) ​

The landing page's frontends table still called ganymede-ui a "Prototype" and "a Mac and iPad app", though the Mac app has shipped signed and notarized releases since ganymede-ui 0.4.0 and the iPad and iPhone app is on TestFlight. The README and the docs overview also left out the iPhone. All three now name Mac, iPad and iPhone, and the table gives the release state per platform. Found in the docs and web presence review; the larger restructuring it proposes waits on Thomas.

The review found more pages saying "Mac and iPad app": app.md's heading (its anchor, linked from app.md's table and known-gaps.md, is now #the-mac-ipad-and-iphone-app), architecture.md, releasing.md, roadmap.md, ui.md and ipados.md. They name the iPhone too now.

2026-11-11, cdp-kernel 0.10.0 (#670) ​

CI, the container image and the docs now use cdp-kernel 0.10.0. It brings jupyter.params and jupyter.result(name, value) (cdp-kernel #456), the kernel side of execute -p/--results and POST /api/notebooks/run, and jupyter.host() (cdp-kernel #461), the client for the host API. docs/getting-started.md names 0.10.0 instead of "the release after 0.9.0".

2026-11-11, Command flags generated from the CLI (#689) ​

reference.md listed every command but only the global and server flags; 50 of the commands' own flags (execute --inplace, run --json, mcp --read-only and the rest) were only in --help or scattered through the guides. A "Command flags" section now holds a table per command, generated from clap's definition by a test in ganymede-cli (src/reference.rs), so --help and the page can't drift: the test fails when they differ, and UPDATE_REFERENCE=1 rewrites the section between its markers. The help text is the flag's doc comment, with the default appended when clap has one. serve is left out and lab and ui skip the flags they share with it, since the "Server flags" table already has those with their config keys. Global flags are the root's own table; clap hasn't propagated them when the test reads the definition, so a subcommand lists only what it declares (mcp --server, not mcp call --server).

The section is generated rather than the whole page because the rest of reference.md (the config file, the host API, exit status) is prose that reads better written by hand. scripts/ci-changes.sh now counts docs/reference.md as code, so a docs PR that edits the section by hand runs the test.

Review fix: the first version left seven flags out. It dropped serve's flags from every command, not only from lab and ui, which take them all, so grant --root-dir, the mcp flags and trust --notary-dir went missing. It also dropped every flag named --version, which took lab install --version and ui install --version with clap's own. Now only lab and ui skip the server flags, and only clap's help and version actions are skipped.

The "Flags for every command" table is generated now too, from the root command, between its own markers, so it uses --help's wording and value names. Flags that can repeat say so, since --help doesn't. The "Server flags" table stays hand-written, because it has the config keys.

The second review's lows: a subcommand of a command with global flags now ends with "And mcp's flags." (only mcp call today). A third test checks that the hand-written "Server flags" table names every serve flag, so a new one can't miss the page.

2026-11-11, docs sidebar grouped by job (#689) ​

The docs sidebar grouped pages by reading level and appended ganymede-ui's pages as a group of their own, so the apps' user guide was the last thing in the sidebar and sat beside that repository's release steps. The groups now follow what the reader is doing: Get started, Use the apps, Work with an agent, Use Jupyter tools, Reference, Cell APIs, How it works, Background, Contributing. No page's text or URL changed.

ganymede-ui's pages are placed by name from uiPlaced in levels.ts: apps, shortcuts and device under Use the apps; architecture, deploying and releasing under Contributing. groups() takes which of them the fetch copied, so a build without npm run fetch-ui still has no dead entries, and a page ganymede-ui adds later lands in a "ganymede-ui" group until levels.ts places it. Security and Privacy moved from the guides to How it works, rooms to the agents group, Other kernels to Use Jupyter tools. The top nav is Home, Get started, Apps, Agents, Reference, Roadmap: #689 proposed Home, Apps, Docs, Examples, Roadmap and a first group "Start", but Examples doesn't exist yet, and "Get started" says what the group is for. Examples joins the nav with its pages. ganymede-ui's pages get no reading-level label, since the labels describe Ganymede's docs, and keep titles set in levels.ts, because their headings ("Releasing", "Architecture") repeat Ganymede's. uiUnplaced() reads the placed pages from what groups() emits, the build warns when a ganymede-ui page isn't placed, and docs/scripts/levels.test.mjs checks each page shows once.

First step of #689, the restructuring from the docs and web presence review; the new guides, examples and reference pages come next, each with its own group entry when its page exists.

2026-11-11, the apps' example notebooks on the site (#689) ​

The eight notebooks the apps copy with Open Example Notebooks now have pages under /docs/examples/, with an index at examples.md and an Examples group and nav entry. npm run fetch-examples (docs/scripts/fetch-examples.mjs) renders them from ganymede-ui's examples/*.ipynb on its main, like fetch-ui and fetch-cell-api, so the pages aren't committed and follow ganymede-ui as it re-runs them.

Each page shows the code cells and the outputs the notebook saved: Markdown, text, JSON and errors as they are, SVG and bitmaps as image files beside the page, HTML in place. HTML with a <script> (the React, Preact and Lit outputs) runs in an iframe with sandbox="allow-scripts" and no allow-same-origin, so it gets an opaque origin and can't touch the docs page; those scripts load their framework from esm.sh in the reader's browser, as they do in the app. A widget needs a kernel, so its page says so. Outputs keep a light panel in the dark theme, since they were drawn for a light notebook.

Fourth item of #689, first half; the Fremont and Oklahoma journals come next, re-run on the current release.

The example pages' names follow ganymede-ui's notebook file names, so fetch-examples also writes docs/examples/pages.json and config.mts builds the sidebar's Examples group from it; a link to an example page that wasn't rendered warns instead of failing the build, as links into ganymede-ui's docs do. HTML with a <style>, <link>, <pre>, an inline on…= handler or another embed goes to the sandboxed frame too.

2026-11-11, host API under ganymede execute (#647) ​

ganymede execute now answers its kernels' host calls with no server running. It builds the server's state without a listener (serve::LocalHost), rooted at the current directory, and answers with the same HostApi the server uses, so grant checks, run nesting and run width are one implementation. The engine's kernel isn't one the server started, so HostApi::pin names its notebook; unpin forgets it when the notebook's run ends.

The defaults are [host] from the config file with --grant read=PATH or run=PATH in place of each key named. A notebook's own grant from ganymede grant applies over them: the local host opens the same file id database as a server on that root. The first version used in-memory ids, which the review caught: a notebook narrowed with ganymede grant would have read the whole directory under execute, a grant silently widened. self.* is off for pinned kernels whatever the grant: execute writes the notebook itself at the end, and an edit through a room would race that write. If the config doesn't parse or the local host can't start, the run goes on without a host comm and says so on stderr, since execute worked without the config before.

The e2e test runs three executes of a cdp-node notebook that reads itself, a granted and an ungranted notebook, and runs another, under the defaults, under --grant, and under a config file.

2026-11-11, host API design note (#647) ​

Cells can ask the app for things through device but can't ask the server for anything, which blocks reading, searching and running other notebooks from a cell. Thomas chose, in the direction review, a host API over a comm the server opens rather than a server token in the kernel. This note is the design for review before any code: A host API for kernels.

It proposes the comm (ganymede.host.v1, opened on a kernel subshell at start, calls on iopub, replies on shell), five notebooks.* methods, per-notebook grants kept by the server, and a notebooks core shared with the MCP tools in a new ganymede-host crate that ganymede-engine uses. Reading the code for it showed two things. Because the server already fans out each kernel's iopub, it can keep the host comm's messages from every client, so the device comm's announce step and pings aren't needed. And the MCP tools return nb-cli text, so they need splitting into a core that returns data before a second front door can share them; mcp/search.rs already has that shape.

Thomas agreed the design the same day and settled its four open questions: reads cover the whole root by default, grants are kept by file id with ganymede grant --list and --revoke, kernels without subshells get no host API, and a notebook may edit its own cells (self.*) as the step after the read calls.

2026-11-11, host API: the comm and the read calls (#653) ​

The first step of A host API for kernels. A new crate, ganymede-host, opens the ganymede.host.v1 comm on a kernel subshell once a kernel has answered, answers hello itself and hands every other call to a Responder. ganymede-api's kernel manager attaches it at each boot and drops its traffic in forward, before the state tracking and the client fan-out, so the busy and idle statuses around the host's own messages don't move the kernel's execution state either. The server's HostApi answers notebooks.list, notebooks.read and notebooks.search with the [host] read grant, sharing the directory walk and the search with the MCP tools.

Two choices worth knowing. The link is stored under the same lock the pump checks, so no host message slips through to a client between the comm opening and the link being in place. And host messages are told apart by their parent's header.session, a per-link tag, rather than a set of message ids, so the filter needs no bookkeeping as calls come and go. The fake kernel gained subshells and a host client (host <method> <json>), which the tests drive.

The engine (ganymede execute) doesn't open the comm yet; it needs the file-based reads that the server gets from its contents manager.

The review moved the comm bookkeeping into the forwarder's order: every host comm id, the host's and each one a kernel opens while the driver runs, goes into a set that is_host_message fills as it sees the open, so a call sent right after a late open can't reach a client first. A kernel's open after the driver has stopped goes to clients, who close it. Dropping the link aborts its calls. Grants are matched where a path leads once symlinks are resolved, a directory is listed or walked only when the grant or the notebook itself lies under it (before the walk's caps count), and a kernel's notebook is the first notebook session the server sees for it, so one that joins later doesn't take its place. The manager holds the responder weakly: it holds the server state, which holds the manager.

2026-11-11, Host API grants over HTTP (#668) ​

The apps' granting sheet, the last step of the host API plan, runs in the web UI, which reaches the server only over REST. So /api/host/grants/{path} does what ganymede grant does: GET answers the notebook's own grant and the [host] defaults, PUT replaces the grant, and DELETE (or PUT {}) removes it.

The defaults come from a new AppState.host, the [host] table the server was started with, so a client can show what a notebook gets without its own grant. PUT checks the keys itself rather than relying on serde, since Grant reads stored grants with #[serde(default)] and would otherwise take a typo as an empty grant. Paths are normalized as the CLI's are.

The notebook must exist and be a notebook (index_existing, under the move lock, so a deleted path never gets an id). A server with file ids in memory answers 409, as ganymede grant refuses a store that isn't persistent. The route sits behind the token like the rest; a kernel has none, so it can't grant itself anything.

2026-11-11, host API: per-notebook grants and ganymede grant (#662) ​

A notebook's own grant sits in a host_grants table in the file id database, keyed by file id, so it follows a rename made through the server and is dropped with the file. The store holds it as opaque JSON; the server's Grant type (read, edit_self) gives it meaning. A key the notebook sets replaces the [host] default for it, which keeps one rule for both directions: read=journal narrows a server whose default is the whole root, and widens one whose default is [].

The server reads the grant on every call, so ganymede grant from another process takes effect at once. SQLite already answers each file id lookup, and a host call is rare next to that.

run waits for notebooks.run, so the command takes only read and edit_self for now.

2026-11-11, host API: a notebook reads another's named results (#660) ​

notebooks.results { path } returns { name: value } from the notebook's outputs, using the run contract's reader (ganymede_nbformat::named_results, #651), so the host API, ganymede execute --results and later notebooks.run agree on what a result is. It reads the copy notebooks.read returns: the room when one is open, so results a client hasn't saved yet count, and disk otherwise. It sits under the [host] read grant, like the other reads: a notebook that may read another may read its results.

2026-11-11, host API: a notebook runs another (#664) ​

notebooks.run is POST /api/notebooks/run (#659) behind the host API: run.rs now has one run_notebook both call, so the HTTP route, ganymede execute --results and the host call agree on what a run answers.

A run's kernel needs a grant before it can ask for anything, and its kernel can answer hello before the call that started it learns its id. So the server gives the run's kernel a launch variable, GANYMEDE_HOST_RUN, naming the run, and looks the grant up by it. The server reads its own record of the kernel's launch variables (RunningKernel::launch_var), not the process's environment, so a kernel can't take another run's grant. The grant is the intersection of the caller's and the run notebook's, without self.*, since a run writes nothing. The run also keeps every grant up its chain, and a path must pass each of them with symlinks resolved: intersecting the lists as text alone let a grant naming a symlink inside the caller's folder reach the link's target. It is forgotten when the call ends, however it ends; a run kernel with no grant left gets nothing.

Cancelling the call aborts its future: the run's kernel guard shuts the kernel down and its run slot frees, as when an HTTP client goes away.

2026-11-11, host API: a notebook edits its own cells (#656) ​

The second step of A host API for kernels: self.add, self.edit and self.delete on the kernel's own notebook, the one whose session the server started it for. They edit its document room, so JupyterLab and the apps see the change live, and a room with no client saves before it retires, as for the execute endpoint. An edit or delete names the source hash notebooks.read returned for the cell (MurmurHash2, seed 0, as the execute endpoint checks); a cell changed since fails source_mismatch, so a notebook can't overwrite an edit it hasn't seen.

[host] edit_self (default true) turns the calls off for every notebook, and hello lists them only when they're on and the kernel has a notebook. New cells get empty metadata: the MCP tools' agent provenance says an agent wrote the cell, which isn't so here.

2026-11-11, docs markers for the in-app kernel in the apps (#266) ​

ganymede-ui#470 registers the apps' TypeScript kernel with their server, so docs/app.md and docs/ipados.md describe the apps as they are in ganymede-ui's latest release but not its main. They keep their text until that release, with **Unreleased in ganymede-ui.** notes saying what main does instead, which ganymede-ui's release script lists. In Markdown the notes must be visible > [!NOTE] blocks (docs/scripts/check-unreleased.mjs); HTML-comment markers are only for site/index.html. The note in docs/in-app-kernel.md now says the apps' part is built.

2026-11-11, journal plugin: display output, widgets and plotting libraries (#710) ​

The journal skill said how to draw a chart with Observable Plot and little else about output. It now has an "Output, charts and widgets" section: format results with the kernel's display module (jupyter in cdp-kernel, IPython.display in Python), pull in a pinned plotting library when a result needs a chart, and add a widget when a person watching would explore a result. A new python.md sits beside typescript.md for ipykernel.

The skill now gives the reason for its TypeScript default: npm: imports resolve when the cell runs, so a journal that needs libraries re-runs anywhere without an install step, where a Python kernel has only what its environment has (or what a recorded %pip install cell adds).

Widgets are for the person. The agent gets only a widget's text/plain, and notebook_publish shows only that text (html.rs falls back to it), so the skill and the reviewer ask for a static chart or table beside any widget a finding depends on. Charts drawn in the frontend (Vega-Lite, Altair, Plotly) have the same limit for the agent.

Checked outside a kernel: the TypeScript widget example's kernel side against cdp-kernel's runtime/widget.mjs with a simulated frontend update (the listener redraws the SVG and sends only svg), its view module parses, and the Markdown table example renders. The Python examples ran with the pinned versions (polars 1.31.0, matplotlib 3.10.3, ipywidgets 8.1.7). Not run end to end in an agent session.

2026-11-11, the two agent journals as examples (#689) ​

The Fremont Bridge and Oklahoma earthquakes journals, kept with the ganymede-journal plugin on 2026-11-09, are now in examples/journals/, each with the module it imports, a fetch-data.sh that downloads its data as the notebook's recorded cells did, and prompts.md. examples/journals/run.sh fetches the data and runs each notebook in place with ganymede execute --inplace; data/ is not committed.

Re-run on Ganymede 0.9.0 and cdp-kernel 0.10.0 (cdp-node, Node 22) with freshly downloaded data, both notebooks ran clean (11 and 30 cells) and every output matched the saved one, so the findings still read true. Seattle's export now lists rows in a different order but holds the same rows. One Oklahoma table lists its network columns in another order (ok before us), since USGS's catalog came back in another order; the counts are the same. Oklahoma downloads about 55 MB, most of it the OCC injection workbooks, and runs in about a minute.

The Oklahoma prompts come from the session transcript. The Fremont session was driven by a script, so its prompts were written afterwards for the example; prompts.md and the page say so.

npm run fetch-examples renders both as /docs/examples/journal-<name>, with the prompts in a box after the title. pages.yml now runs on changes to examples/journals/, and scripts/ci-changes.sh counts examples/ as not code.

2026-11-11, say why a kernel didn't start (#713) ​

A kernel whose boot fails (it dies, or never answers kernel_info within startup_timeout, three launches each) is reported dead and removed. wait_started then found it gone and answered kernel <id> not found, which is what POST /api/notebooks/run passed on: an app link run showed "the kernel cdp-browser failed to start: kernel … not found", with no hint of the cause. The boot's error is now kept on the kernel and wait_started answers kernel <id> did not start: <why> (still 404).

2026-11-11, landing page and README lead with the apps (#689) ​

The landing page and README now follow the order the docs plan in #689 set: the apps, then notebooks as programs, agent journals, TypeScript, and one "Works with Jupyter" section. The hero shows the Mac app instead of JupyterLab, its buttons are the Mac download and the command-line install, and the install tabs moved under "Works with Jupyter", since the command line is now the second way in.

"No Python runtime" is no longer a lead feature: it is one sentence in the Jupyter section and in the README's, where it matters to someone replacing jupyter_server. The six-feature grid and the "Get started" reading-level cards are gone; the docs sidebar groups pages by job now, so the landing page links straight to the guide for each section. The frontends table went too, as the diagram and the Frontends card say the same thing. Their styles (.rt, .paths, .lvl) went with them.

Every feature the page names is in the latest releases (ganymede 0.9.0, ganymede-ui 0.8.0), so it needs no Unreleased note. The page doesn't link the MCP tools reference yet; that page is still in review (#706).

The Markdown copies that llms.txt points to rewrite each link the way the HTML does (#704). The rewrite also hit links inside code spans and code blocks, which are examples of Markdown rather than links, so an example such as [Install](notes/install.md) came out pointing at GitHub. rewriteLinks now skips fenced blocks and code spans. Found by the review of #704.

2026-11-11, llms.txt and Markdown pages (#689) ​

The docs build writes llms.txt (the llmstxt.org format) and a copy of each page's Markdown beside its HTML, so an agent reads install.md instead of scraping install. buildEnd in config.mts calls llms.ts with the sidebar's groups, so the index follows the sidebar's order and picks up ganymede-ui's pages and the example pages when they were fetched; a page that wasn't built is left out. Background and contributors' groups go under "Optional:" headings, which llms.txt readers may skip. Each entry carries the page's first sentence of prose, taken after notes, code blocks and lists. The development log is left out: its page is assembled by notes.ts, and notes.md alone is a stub.

The Pages workflow copies llms.txt to the site's root as well, and the deploy smoke test fetches it and one Markdown page. No dependency: the VitePress llms plugins would add one for what is about 90 lines here.

2026-11-11, MCP tools page generated from the tools (#689) ​

mcp.md's Tools table says what each tool does in a line; the parameters were only in the schemas an agent gets from tools/list. docs/mcp-tools.md now lists every tool with its description and a parameter table (type, required, description), generated from Notebooks::tool_router() by a test in ganymede-server (src/mcp/reference.rs), which fails when the page differs; UPDATE_REFERENCE=1 rewrites it. Types come from the JSON schema: optional values drop null, $refs resolve to the enum's values, and a documented enum (AddMode) shows each value's doc comment.

Nine parameters had no doc comment (id, source, action, two timeouts), so the page had blank cells and agents saw no description. They have one now; the two timeouts name their default, 600 seconds. The ten path fields without one have notebook_read's now, and the test fails on a parameter with no doc comment, so the page and tools/list can't differ. Only the part between the markers is generated: a tool that the latest release lacks gets its Unreleased note above the start marker. .gitattributes keeps the page's line endings LF, since the test compares bytes. scripts/ci-changes.sh counts the page as code, so editing it by hand runs the test.

2026-11-11, The apps' Notebook Access sheet in the host API docs (#668) ​

ganymede-ui#479 merged the granting sheet, the plan's last step, on top of /api/host/grants (#669). docs/host-api.md now says where the sheet is and stops listing it as next, with an "Unreleased in ganymede-ui" note until the apps' next release.

2026-11-11, "Notebooks as programs" guide (#689) ​

Running a notebook with parameters and named results is the project's first priority, but its docs were spread over five places: a subsection of Getting started, the formats and grants in reference.md, a route name in api.md, the host API design note in Background, and the links and Shortcuts tables in ganymede-ui's app guide. The host API was explained only in the design note.

docs/programs.md walks one notebook (fremont.ipynb, parameters counter and days, result weekday_drop, as in Getting started) through every caller: ganymede execute -p --results, CI, POST /api/notebooks/run, ganymede://run links and the Run Notebook with Parameters Shortcut, host.notebooks.run from another notebook, and grants. It links to the reference for formats instead of repeating them. The sidebar gets a "Notebooks as programs" group after "Use the apps".

Found on the way: cdp-kernel's reference still says host.notebooks.results, run and self.* are "not on a server yet", though v0.8.0 serves them; that is fixed in cdp-kernel (#468).

2026-11-11, POST /api/notebooks/run (#652) ​

The run contract's HTTP front door, for the apps' ganymede://run links and Shortcuts (ganymede-ui#303), which reach the in-process server over loopback REST. Parameters are set when a kernel starts, so a parameterized run can't use the kernel of a notebook already open; the endpoint starts its own.

It starts that kernel through the kernel manager, not a provisioner of its own, so it shows in /api/kernels, gets the host API comm, and can be interrupted like any other. KernelManager::start_with_env keeps the extra variables on the kernel, so a restart from a client still has the parameters. A drop guard shuts the kernel down, which covers a client that disconnects: axum drops the handler's future.

PARAMS_ENV, params_env and record_params moved from the CLI into ganymede-nbformat beside named_results, so the CLI and the endpoint share them. The body is one --results line, error a string as there.

Left out: save: "copy". The host API note says copies go "beside the run contract's other copies", a place no code defines yet; it comes with the run ledger. The fake kernel gained a result <name> <json> cell for the test.

2026-11-11, parameters and named results for ganymede execute (#650) ​

The first step of the run contract from the direction review: -p / --params-file in, --results out. The host stays language-free by passing parameters as data, one JSON object in GANYMEDE_PARAMS, and reading results as a MIME type, application/vnd.ganymede.result+json ({name, value}). Python's scrapbook types are read too, and the last output with a name wins, as in scrapbook.

  • An environment variable over a file: every launcher and kernel can use it, and it needs no cleanup. It is capped at 32,767 bytes, the Windows limit for a variable; bigger inputs belong in a file whose path is a parameter.
  • --results reads only the cells the run started. A cell after a failure, or one skipped by tag, still holds outputs an earlier run saved, and those aren't this run's results.
  • Values are read as JSON when they parse, as papermill reads numbers, so -p days=7 is a number. A string that looks like JSON needs its quotes (-p 'id="007"').
  • The reader, ganymede_nbformat::named_results, is in the format crate so the host API's notebooks.results and notebooks.run (#647) reuse it.
  • cdp-kernel's jupyter.params / jupyter.result (cdp-kernel#456) need its next release; the tests here write the MIME type by hand, so they pass with any release.
  • execute sets GANYMEDE_PARAMS on every kernel it starts, {} without -p, because a kernel's environment adds to the parent's: a notebook that runs ganymede execute from a cell would otherwise pass its own parameters on.

2026-11-11, Playwright jobs survive an apt mirror outage (#686) ​

From about 14:10 UTC the runners couldn't resolve archive.ubuntu.com, azure.archive.ubuntu.com or security.ubuntu.com, so workstation (ubuntu-latest) and lsp failed in npx playwright install --with-deps chromium before any test ran, on every re-run.

GitHub's Ubuntu image ships Google Chrome, so the libraries Chromium needs are already there; --with-deps mostly adds fonts. Both jobs now download the browser alone, then run playwright install-deps chromium as best effort: when apt fails they log a warning and carry on with the image's libraries. During the outage apt took about 10 minutes to give up (its own DNS retries), so the step is capped at 5 minutes. timeout only stops npx: the sudo apt-get Playwright started kept running beside the tests until the runner cleaned up, and would have installed fonts and held the dpkg lock mid-job had the mirrors come back. A failed step now stops it with sudo pkill -x apt-get.

Retrying apt with a backoff wouldn't have helped: the outage lasted hours. If a future image drops a library, Chromium fails to launch and Playwright names what's missing, so the failure stays readable.

2026-11-11, Publishing a notebook as a page (#677) ​

Thomas asked for a journal to be publishable as a page worth reading, as part of the journal plugin. The two worked examples (Fremont Bridge, Oklahoma quakes) had their pages built by hand, and their notebook renders were DOM snapshots of ganymede-ui taken with Playwright. Neither was something a tool could repeat.

The exporter sits in the core, in ganymede-nbformat beside the Markdown and script exporters, so every entry point gets the same page: ganymede_nbformat::to_html, GET /nbconvert/html/{path} (nbconvert's html format, so JupyterLab's export menu offers it), ganymede nb publish, and the MCP tool notebook_publish, which saves the page under the root (published/<name>.html beside the notebook by default). The journal skill gained a Publish step: finish the journal, publish, and, when the agent has a tool that hosts pages (a Claude artifact), host that file unchanged. "Artifact" here means the file. The server can't reach claude.ai, and one self-contained HTML file covers both cases.

The page uses the site's palette: warm paper, teal accent, serif prose, system fonts only. It has a contents column on wide screens and follows the reader's light or dark setting. Charts sit on a light card in both modes, since Plot draws in currentColor, which in an <img> is black. Code is folded above each result by default (--code shown|hidden). In a journal, cells without agent provenance are marked as a person's, and recorded steps are set apart. The header names who kept the journal.

What the page may hold was the main design point:

  • Only cell sources and outputs. Metadata stays out: the provenance history (which keeps replaced text, sometimes on purpose a secret's removal), cell ids and signatures. Only the kernel's display name and the agents' names appear.
  • The server replaces its root (both spellings, since macOS resolves /var to /private/var), the home directory and its token. The CLI replaces the home directory and the notebook's directory. The skill tells the agent to read the notebook for other private values before hosting the page, since no list of patterns catches them all.
  • No network and no notebook script. SVG goes in as a data: image, so its scripts don't run. This needed the SVG namespace added: Plot serializes SVG from an HTML DOM without xmlns, and an <img> draws nothing without it. HTML output goes in an <iframe sandbox srcdoc> without allow-scripts; allow-same-origin lets the page's one script size the frame. Raw HTML in Markdown is escaped, links keep only http, https, mailto and relative targets, and images other than data: ones become links. Outputs that need JavaScript (Vega-Lite, widgets) fall back to another bundle entry or a note.

New dependency: pulldown-cmark 0.13 (MIT), default features off, for Markdown. Nothing in the tree rendered Markdown to HTML, and a hand-written renderer would have been the larger risk. Image outputs come before HTML in the page's priority order, unlike nbconvert's, because an image needs no frame.

Served from /nbconvert/html/, the page runs under the files CSP (sandbox allow-scripts), whose opaque origin stops the frame-sizing script. HTML outputs then show at a fixed height with a scrollbar. The downloaded or hosted file is not affected.

The independent review found that the frames stopped scripts but not fetches: an HTML output's <img src="https://…"> or stylesheet still loaded in every reader's browser. Each frame's document now starts with a Content-Security-Policy meta (default-src 'none'; img-src data:; style-src 'unsafe-inline'), ahead of the output, so a policy the output adds can only narrow it. The page itself has no policy, since a host such as the artifact viewer may add its own scripts. Redaction now matches whole names only, and skips a root such as / (a notebook directory or server root of / had turned every / into .). The CLI and server share one helper, so both redact each directory as given and resolved. notebook_publish replaces only an earlier published page, recognized by its generator tag, unless overwrite: true. The title is parsed as inline text, so # 1. Setup keeps its number. Footnotes are off, since each cell renders alone and their ids would collide. A raw <img> that shows an attachment becomes an image tag of the page's own making.

2026-11-11, publish from the release commit's main build (#675) ​

Merging a release PR built its commit twice: once on the main push as a main-build, then again on the tag tag-release.yml pushed, each time five targets and the XCFramework, all on the same scarce macOS runners. Now the main push's version job does tag-release.yml's check (a version with a CHANGELOG.md section and no tag), and if it holds, that run is the release: it builds as X.Y.Z, tags the commit as it publishes, and skips main-build.

Two things change with it. A release build must not be cancelled by the next push, so release runs leave the shared main concurrency group. And only the commit that changed the version is a release run (it compares the workspace version with the commit main was at before the push): a merge that lands before the release publishes must not ship under notes that don't list it, nor drop out of the next release's notes. A failed release is rerun, or released from tag-release.yml by hand. The publish step makes the tag only if no other run has, and otherwise does nothing (the image too), so two runs can't publish the version twice. tag-release.yml stays, by hand only, to release from a tag when a run can't be rerun.

The release commit is the push that changed the version, compared with the commit main was at before the push (github.event.before), so a release PR merged by rebase with several commits still counts. tag-release.yml tags that commit, found from history, or a commit you give it, not main's head, so a recovery doesn't pull later merges into the release.

2026-11-11, releases pick up the latest dependencies (#673) ​

A release round was seven pull requests in six serial steps, three of them only moving a pin: cdp-kernel into Ganymede, the ganymede-ui release into ganymede ui install, and Ganymede back into ganymede-ui. Each waited for CI, the reviewer and a merge. The order is now cdp-kernel, Ganymede, ganymede-ui, and scripts/release.sh writes the latest cdp-kernel and ganymede-ui releases into the release commit itself through scripts/release-pins.sh, so the release pull request's CI tests them.

ui install's default keeps its built-in SHA-256: the script takes the release's SHA256SUMS line for the zip and checks it against the zip it downloads, so a mismatch stops the release. The cost Thomas accepted is that the default trails ganymede-ui by one release, since the apps now release after Ganymede.

The script edits each pin by a fixed string and fails unless exactly one line holds it, so a reworded doc fails loudly instead of being skipped. It fails too when a latest release is older than the pin on main.

The script does every lookup, download and hash check before it writes, rejects arguments other than --check, and counts a prerelease as older than its own release (sort -V alone ranks 0.11.0 below 0.11.0-rc.1). The same fixes came out of the review of ganymede-ui#490.

After review: a write run first does every replacement in check mode, so a line it can't find stops it before anything changes, and a missing line now prints which one. The pins it moved also go into the version's CHANGELOG.md section as "Pick up ..." lines, so the GitHub Release notes list them; git-cliff skips the release commit, so a later regeneration of CHANGELOG.md drops those lines from the file, but the published notes keep them. curl retries, and GitHub API calls use GH_TOKEN when it is set.

2026-11-11, roadmap follows the four priorities (#666) ​

Thomas set Ganymede's direction as four priorities in order: the notebook as a program, the apps as a full runtime, a person and an agent in one live notebook, and TypeScript notebooks for TypeScript developers. The roadmap still had Pyodide as the second "Next" item, kept the native in-app kernel and the host API under "Open" beside CurveZMQ, and didn't mention parameters, named results or the run endpoint.

"Next" is now those four priorities, each with its open issues. Work merged since v0.7.0 (the run contract, the host API including notebooks.run and grants, kernel registration through the C ABI) sits in a "Done on main" list under one Unreleased note, so the release moves it into "Done". A new "Not now" section holds what is wanted eventually but deferred: Pyodide, MCP Apps, a native non-JS kernel and CurveZMQ. "Open" keeps the undecided items.

2026-11-11, Roadmap marker for the share extension (ganymede-ui#449) ​

ganymede-ui#477 ships the share extension behind a Settings switch. The roadmap still lists it under Next, which stays right until ganymede-ui releases it, so the line gets an Unreleased in ganymede-ui note. The docs check only takes HTML-comment markers in site/index.html, so in Markdown it is a note block. ganymede-ui's release script lists such markers and opens an issue here to move the item once the release is out.

2026-11-11, run copies (#658) ​

save: "copy" on POST /api/notebooks/run and the host API's notebooks.run keeps the executed notebook at runs/<notebook path without .ipynb>/<UTC start>.ipynb, with -2, -3 for runs in the same second, and answers its path as copy. One runs/ folder at the root, not a folder beside each notebook, keeps notebook folders clean and leaves one place for the run ledger later; it isn't hidden, because hidden paths aren't readable through the contents API and the caller couldn't open the copy it was given.

The copy is written through the contents manager, after the run's kernel is shut down, with the parameters in metadata.ganymede.params as ganymede execute records them. A failed run is kept too. If the copy can't be written, the answer's status is error with the reason, after any run error.

From the host API, a copy needs a read of the source as well as a run grant. A copy holds the notebook's source and outputs, so without that check a notebook allowed to run secret.ipynb and read runs/ could read the secret through its copy, and grants only narrow. A leading dot in a path part becomes _ in the copy's folder, so a notebook in a hidden folder still gets a copy the contents API can write and read.

Cells a failed or timed-out run never started are cleared in the copy, outputs and execution count, so an older run's outputs don't read as this run's. The HTTP route normalizes the path as the host API does, so ./reports/daily.ipynb gets the same copy folder as reports/daily.ipynb.

The read check covers every outer caller too, so a run can't copy its own notebook under runs/ for a caller that may not read it. A read grant on runs/ reads every copy there, whoever made it; reference.md says so.

2026-11-11, one minor version with ganymede-ui (#717) ​

Since the release speed-up, Ganymede releases before ganymede-ui in a round, so Ganymede reached 0.9.0 while the apps were at 0.8.0, and the docs and site showed both. The two now share their minor version: ganymede-ui's release.sh minor takes Ganymede's latest X.Y.0 (tlockney/ganymede-ui#511), and patches stay per repository. The next round takes the apps from 0.8.0 to 0.10.0. The release order and pins don't change.

ganymede ui install's default stays one ganymede-ui release behind until Ganymede's next release, as before: Ganymede releases first, so its pin can only name the apps' previous release.

docs/reference.md's ui install row names that default and the reference test checks it against the CLI, but release-pins.sh moved the pin in ui.rs without the docs row, so the next release PR would have failed that test. It now rewrites the row with the pin.

2026-11-11, ui install pins ganymede-ui 0.7.0 (#672) ​

ganymede-ui v0.7.0 is out. ganymede ui install now defaults to 0.7.0, with the SHA-256 of ganymede-ui-0.7.0.zip, the archive it downloads, from the release's SHA256SUMS pinned beside it. The first push pinned the .tar.gz hash by mistake; the install_from_github e2e test caught it.

The "Unreleased in ganymede-ui." notes in docs/app.md, host-api.md, in-app-kernel.md, ipados.md, privacy.md and roadmap.md are gone: the in-app kernel registered with the app's server, the Notebook Access sheet, ganymede://run parameters and the Mac update check all shipped in 0.7.0. The text around two of them in app.md and ipados.md described the old page kernel and now says what the apps do.

The review also found text that still described the apps before 0.7.0: architecture.md's Mac and iPad setups, app.md's kernels table, the where-kernels-run diagram (the iPad row showed Ganymede serving files only and the kernel in the page) and its alt text. Those now say the in-app kernel is one of the server's kernels. in-app-kernel.md says its "The problem" section is the state before 0.7.0, and the roadmap lists ganymede://run parameters as released.

2026-11-11, ganymede update (#701) ​

Thomas asked for an update command that does in place what install.sh does. It is Rust in ganymede-cli, not a call to install.sh, so it works on Windows too and needs no shell, curl or tar. It keeps install.sh's checks: the latest version from the /releases/latest redirect, the archive and its .sha256 over HTTPS (redirects only to GitHub's asset hosts, through the Releases type ganymede ui install already used), the SHA-256 checked before unpacking, the native arm64 build under Rosetta, and the new binary run with --version before it replaces anything. That last run also stands in for install.sh's glibc check: a binary that can't load fails there and the old one stays. A release must report exactly ganymede X.Y.Z.

The target comes from the running binary's build (GANYMEDE_BUILD_TARGET), so a source build for a target releases don't cover (musl, say) is told to update from source. Binaries from cargo install, Homebrew, Nix or a cargo target directory, and debug builds, are refused with how to update them instead; overwriting them would leave the package manager's record wrong.

Choices made conservatively, open to change: it updates only the ganymede binary. cdp-kernel (npm), JupyterLab and ganymede-ui each have their own install commands, and it prints the ones to run for what is installed rather than running npm or more downloads itself. A main build (+main. in its version) follows main by default; --version goes back to a release. Only newer releases install unless --version names one, which may be older.

The latest version is always asked of GitHub, as install.sh does; GANYMEDE_DOWNLOAD_BASE only moves the file downloads to a mirror.

On Windows a running .exe can't be overwritten but can be renamed, so the old binary moves to ganymede.exe.<pid>.old and a later update removes it. The pid keeps a server still running from an earlier update's .old file from blocking the next one. After a release, main-build lags until the next push to main, so --main can install a build whose base version is older than the release; it says so when that happens. That path is untested, like the rest of Windows (best effort).

New dependencies: tar (no default features, so no xattr) to read the release's .tar.gz, and flate2 declared directly; it was already in the tree through zip with the same zlib-rs backend. save_checked's mismatch message said "PyPI lists" for every download; it now says "expected".

2026-11-11, measuring jitless V8 for the in-app kernel (#646) ​

Thomas chose to test V8 first for the in-app kernel's engine (#266) and keep it unless its size or speed is unacceptable. spikes/v8-engine measures it: its own Cargo workspace and workflow (v8-spike.yml), which nothing in Ganymede depends on. The README has the steps, including a bench app for a real iPad or iPhone.

What the build taught us:

  • rusty_v8 publishes a device library for aarch64-apple-ios, built jitless and without WebAssembly by its CI, and the v8 crate's build downloads it like any other target. No V8 build is needed.
  • The crate's published source can't build V8 itself (V8_FROM_SOURCE=1): Cargo's packaging drops directories with their own Cargo.toml (the vendored crates under third_party/rust) and ICU's iOS data. A source build needs a rusty_v8 git checkout with its submodules, as rusty_v8's own CI does.

Size ​

V8 152.2.0 (V8 15.2) linked into a stand-in iOS app, dead-stripped and stripped, against the same app without it (scripts/ios-size.sh):

size
added to the app binary18.7 MB
the same, gzip -9 (about what a download adds)6.9 MB
static library before linking67 MB

Not broken down further; ICU (for Intl) is likely a good part of it. The design note for iPadOS guessed 30 to 50 MB.

Speed and memory ​

Five runs of each engine on CI runners (not a device); each cell is the median of the five. cold is a new engine instance, loading the workload and its first run; steady the median of four more runs in that instance. init is V8's one-time setup per process. kernel-start is today's in-app kernel (cdp-kernel 0.9.0's browser kernel in a Worker) started to its first execute_result. One run alone was misleading: the first draft of this note, from a single run, had WebKit's first type strip slower than V8's. Five runs bear that out on Linux (241 vs 214 ms) but not on the Mac (83 vs 138 ms).

macOS arm64 (GitHub runner, Apple silicon) ​

workloadV8 15.2.124.1-rusty, jitless, 5 runsV8 15.2.124.1-rusty, 5 runsnode, 5 runsnode, jitless, 5 runsworker (webkit 26.6), 5 runs
init, once per process0.90.4–––
start2.9 / 0.01.3 / 0.020 / 0.137 / 0.117 / 0.0
cpu104 / 10153 / 4766 / 50122 / 10649 / 34
ts-strip138 / 11748 / 1072 / 16153 / 11983 / 25
large-output35 / 3826 / 2951 / 3660 / 3133 / 24
memory122 / 12837 / 4356 / 42147 / 14479 / 53
kernel-start––––41 / 0.5

Engine heap after the workload (physical MB), and the process's peak memory (resident set; on iOS, the footprint iOS counts against the app's limit):

workloadV8 15.2.124.1-rusty, jitless, 5 runsV8 15.2.124.1-rusty, 5 runsnode, 5 runsnode, jitless, 5 runsworker (webkit 26.6), 5 runs
start1197–
cpu62755352–
ts-strip49495647–
large-output13485227102–
memory268249444458–
kernel-start–––––
peak RSS, whole run363441604635–

Linux x86_64 (GitHub runner) ​

workloadV8 15.2.124.1-rusty, jitless, 5 runsV8 15.2.124.1-rusty, 5 runsnode, 5 runsnode, jitless, 5 runsworker (webkit 26.6), 5 runs
init, once per process0.60.6–––
start2.4 / 0.02.6 / 0.034 / 0.165 / 0.119 / 0.0
cpu114 / 10775 / 6897 / 77142 / 11459 / 39
ts-strip214 / 185103 / 22136 / 30240 / 182241 / 37
large-output62 / 7547 / 5096 / 67111 / 4847 / 35
memory206 / 22362 / 8491 / 74220 / 20870 / 60
kernel-start––––58 / 1.0

Engine heap after the workload (physical MB), and the process's peak memory (resident set; on iOS, the footprint iOS counts against the app's limit):

workloadV8 15.2.124.1-rusty, jitless, 5 runsV8 15.2.124.1-rusty, 5 runsnode, 5 runsnode, jitless, 5 runsworker (webkit 26.6), 5 runs
start11108–
cpu62596857–
ts-strip49494847–
large-output13585227103–
memory279249463459–
kernel-start–––––
peak RSS, whole run357424612618–

What the numbers say, pending a device (Mac medians):

  • Start. A jitless V8 isolate and context reach a first result in about 3 ms, plus about 1 ms of one-time init (the first start in a process ran 2 to 12 ms). A WebKit Worker took 17 ms (7 to 115 ms across runs), and today's kernel 41 ms to its first result. A V8 kernel would add its own code on top: the browser kernel's bundle is about 840 KB, and loading the 700 KB stripper bundle took jitless V8 about 13 ms.
  • Compute is where the JIT shows, and WebKit in the apps keeps its JIT on iOS. Jitless V8 is about 1.5 to 5x slower than WebKit: the CPU cell 104 vs 49 ms on a first run (101 vs 34 steady), stripping types 138 vs 83 ms first (117 vs 25 steady), the allocation-heavy cell 122 vs 79 ms. Repeated type stripping is the worst case, about 4.7x slower once WebKit's JIT has warmed up. Node with --jitless lands with jitless V8, as it should.
  • Memory. Jitless V8 kept the smallest process: about 360 MB peak for the whole run, against about 440 MB for V8 with its JIT and about 610 MB for Node. The memory workload's 500,000 objects take about 270 MB of heap in every V8; rusty_v8 builds without pointer compression, which would roughly halve that.

So: about 7 MB to download, a faster start, less memory, and compute 1.5 to 5x slower than WebKit (5x for repeated type stripping). Whether that is acceptable is the call this spike was for. A typical cell (well under 100 ms of work) would stay under a quarter of a second; a heavy loop would take one and a half to five times as long as it does in today's kernel. The device run will show whether the ratios hold on an iPad and iPhone, and what iOS's memory limit leaves. That run is by hand (the README's steps; listed in ganymede-ui#273).

2026-11-11, Why Ganymede: the 0.9.0 row (#689) ​

v0.9.0 came out after the Why Ganymede page merged, so its release table gets a row: ganymede nb publish, the one feature 0.9.0 adds for users. Its other entries are CI and release tooling. Host calls under ganymede execute (#696) merged after the release, so they wait for the next row.

2026-11-11, "Why Ganymede" page (#689) ​

Where Ganymede came from and what it is for were spread across a paragraph at the bottom of the landing page, the iPad design note, "Replacing Python", and the development log's 285 entries. Background now starts with docs/why.md: the ts-on-ipados origin, the four priorities from the project's direction, the principles (only the core is Rust, the host knows no language, the Jupyter API as a compatibility target, the file as the source of truth, narrow grants), how it is built (Thomas directs; Claude sessions write most of the code from issues; another Claude session reviews each PR), and one row per release.

Thomas agreed on 2026-11-11 that the page says Claude sessions write most of it. The release rows summarize the changelog by hand; they are history, so they don't need updating except to add a release.

2026-11-12, a kernel that never answers no longer holds up shutdown (#727) ​

The Mac app's in-app kernel once never loaded its page, so it never answered kernel_info_request. Interrupt gave up after 10 s, but Restart, a session's kernel change and quitting the app hung. The cause was the lifecycle lock: a start holds it while it waits for the kernel's first reply, which is up to startup_timeout (60 s) for each of three launches, and shutdown, restart and the server's stop (shutdown_all) all wait for that lock. A kernel change shuts the old kernel down, so it waited too, and the app's quit waited on the server's stop.

Now each kernel has an abandon_boot counter. A shutdown (a client's DELETE, a kernel change, the server's stop) or a restart bumps it before it waits for the lock. Core::boot races its nudge against the counter moving from the value its caller saw before queuing for the lock; when it moves, the boot ends the session, leaves the kernel listed, returns an error, and releases the lock, so the shutdown or restart goes ahead at once. A restart takes its baseline from its own bump, and the crash handler reads the counter before it waits for the lock: a call that queues behind either still stops its boot (restart, restart, quit on a silent kernel would otherwise wait out the second restart's start). A wait_started caller that gets the lock after an abandoned boot answers 409 rather than a model for a kernel with no session. A restart that finds the counter moved once it holds the lock answers 409 without launching. If the caller that bumped the counter goes away before taking the lock (a client disconnects), the abandoned boot hands its dead session to the crash path, so the kernel is relaunched rather than left listed and dead. That path treats it as a crash: it counts toward restart_limit, logs a death, answers queued requests as died, removes the kernel when restarts are off, and a dropped DELETE ends in a relaunch rather than a shutdown. All beat a listed, dead kernel. abandon_boot reads the new value inside send_modify, so a bump made at the same moment can't fold into a restart's baseline. Culling idle kernels doesn't abandon a boot: a booting kernel isn't idle.

A start nobody interrupts still fails as before: up to three launches, then the kernel is reported dead and removed. A restart cancelled by a shutdown or by another restart answers 409, even when its new kernel was only slow; the kernel is restarted either way.

Test: a_kernel_that_never_answers_does_not_hold_up_shutdown_or_restart (sessions.rs) starts a kernel that stays connected and never answers, then checks a shutdown, a restart, a session's kernel change and shutdown_all each finish within 5 s. Each waited the full start before. a_shutdown_queued_behind_two_restarts_stops_the_second_ones_start runs restart, restart, shutdown_all against silent kernels; it timed out before the baseline moved ahead of the lock. waiting_for_a_start_that_a_shutdown_cuts_short_answers_409 covers the queued wait_started. a_dropped_restart_leaves_the_kernel_running is a regression guard only: it passes without the change too, because the pump reports the death after booting clears in that schedule.

restart_racing_shutdown_leaves_nothing_running said the shutdown waited for the restart to finish; now the restart may answer 409 instead, and the test accepts either.

2026-11-12, app rooms markers (#720) ​

ganymede-ui#510 makes the apps open notebooks through document rooms, so an agent's edits show live. Until ganymede-ui releases it, these carry **Unreleased in ganymede-ui.** notes: docs/mcp.md (after the connection list, which already said ganymede-ui shows edits live, and in "Changes by others"), the roadmap's third priority, the "In the apps" section of docs/agent-journals.md, and the Restore section of docs/in-app-kernel.md, whose "once the app uses rooms" clauses turn present tense. The latest ganymede-ui release locks the notebook on each outside write, so the notes say that rather than "after a reload". Notes go outside numbered lists where they can: GitHub doesn't render an alert nested in a list item.

2026-11-12, docs for ganymede-ui v0.10.0 (#725) ​

ganymede-ui v0.10.0 opens notebooks through rooms on a Ganymede server, the apps' own included (ganymede-ui#510), and carries the share extension behind its switch (ganymede-ui#477, first in v0.8.0). The six "Unreleased in ganymede-ui." notes that pointed at them are gone, and the text around them now reads as shipped: agent-journals.md says the apps show an agent's edits live, in-app-kernel.md drops "once the app uses rooms", mcp.md drops the lock-and-Reload caveat, and the roadmap moves both to Done, leaving the journal view (ganymede-ui#184) and journal evals (#316) as the third priority's next steps. The share extension note was #700's too, so this closes it.

2026-11-12, journal hooks and tool docs follow the connection's folder (#732) ​

A review of #730 that arrived after it merged found places still written for root-relative paths.

  • The journal hooks ran ganymede mcp call from the hook's current folder, which follows the agent's cd in Bash. ganymede mcp call now sends that folder as the connection's directory, so after cd sub the hooks wrote to sub/journal/…. The hook state keeps the session's start folder (home) and every call runs from it. A test changes folder between the open and the next prompt.
  • Tool argument and description text says "relative to this connection's directory" and how a leading / reads; docs/mcp-tools.md is regenerated. docs/mcp.md's opening line no longer contradicts the section below it.
  • notebook_publish errors, resource names (list_resources) and read_resource use the connection's paths, so a name in an answer reads back to the same file.
  • initialize rejects a _meta["ganymede/dir"] with .. or \, naming the bad folder, rather than failing each later call with an outside-root error about the agent's path.

2026-11-12, ganymede mcp paths start in the agent's folder (#729) ​

The Mac app is to serve /mcp and write a server info file (ganymede-ui #304), so agents configured with ganymede mcp reach the app when it runs and a server of their own when it doesn't. The app's server is rooted at /, so a forwarded a.ipynb meant /a.ipynb, not the file in the agent's folder.

ganymede mcp now sends the agent's folder, relative to the server's root, as _meta["ganymede/dir"] on initialize. The server keeps it per connection: paths without a leading / start there, and paths in answers are shown from there (below it) or from the root with a leading / (elsewhere, and the folder itself), so what an answer shows reads back to the same file.

  • _meta rather than a header: a folder name may be any Unicode, and a header value would need encoding on both sides.
  • The proxy can't rewrite paths itself: answers carry root-relative paths in tool text, which an agent passes back.
  • .. is still refused, as the contents layer does; a leading / reaches a file outside the folder.
  • A change for anyone running ganymede mcp below a ganymede serve root: sub/a.ipynb from sub/ is now a.ipynb (or /sub/a.ipynb).

2026-11-12, an outside delete closes the room (#719) ​

A notebook deleted by another program (rm, not DELETE /api/contents) left its document room open. The watcher's reload logged cannot reload and kept the old cells, and the path kept its file id. A new file made later at that path got the same id, so a client joined the stale room and saw the deleted notebook. ganymede-ui's e2e suite found it (#510).

Now reload and poll report a missing file as gone. The room then takes Collab::begin_move's lock, as an API delete does, checks the file is still gone, and calls Collab::removed: the ids go, and the room closes its clients with 4404 through the same Cmd::Removed an API delete sends. A file recreated before the check is merged as an ordinary change. The room skips its save in that tick, since a save would write the deleted file back; a save that meets the delete (412, then a reload that finds no file) stops retrying.

The test in tests/http.rs deletes the file from the filesystem, waits for the 4404, writes a new file at the path, and checks it gets a new id and opens with its own cell.

2026-11-12, workflow cleanup across the four repos (#736, #737) ​

A review of the GitHub Actions workflows in ganymede, ganymede-ui, cdp-kernel and ganymede-device found them mostly consistent: pr-issue.yml is identical everywhere, every CI has the same changes job, actions are pinned by SHA and every job has a timeout. The changes, one PR per repo:

  • ganymede (#737): a failed weekly CI run opens or comments on a "Weekly CI run failed" issue. It failed on 2026-10-26 and 2026-11-09 and nobody was told. A pull request checks RustSec advisories only when it changes Cargo.lock, a Cargo.toml or deny.toml (ci-changes.sh's new deps output); bans and sources run on every code PR, and pushes to main and the weekly run check advisories every time. The audit job keeps its name, so the ruleset is unchanged.
  • cdp-kernel (#473) and ganymede-device (#130): a new push cancels a PR's older CI run, as ganymede and ganymede-ui already did. Without it, the old run kept a macOS runner the four repos share. Checkouts set persist-credentials: false, except cdp-kernel's tag job, which pushes. npm and Playwright browsers are cached.
  • ganymede-ui (#547): CI no longer builds an unsigned Release app on pushes to main, since main-build.yml publishes the signed one, and the Apple setup five jobs copied is one composite action.
  • Names: Title case (CI, Pages, Publish, ...). Only name: changed; file names stay, because npm and JSR trusted publishing and scripts refer to workflows by path, and required checks use job names. ganymede's tag-release.yml is "Tag release (recovery)", since ganymede-ui's Tag release runs on every release and this one never does on its own.

"Review gate" still shows in each repo's Actions sidebar although no repo has the file: GitHub lists a workflow while any of its runs exist. Deleting its runs removes it.

Rust 1.100 (2026-11-09) warns on an unused ExitCode, and CI's clippy denies warnings, so four set_disabled calls in ganymede-cli's tests now discard the code with let _ =.

2026-11-13, refuse unseen edits and flag others' changes (#764) ​

First step of tracking #763, from the design note An agent that responds to your edits.

own_edit, which every MCP edit goes through, now checks the cells it is about to change against the connection's read mark before it edits: a cell whose source or type differs from the mark, or that the mark lacks, was changed or added by someone else since the agent read it, so the edit is refused with the cell as it is now. New cells (cell_add, cell_run) aren't in the room yet, so they are never refused, and cell_clear_outputs names no cells for the marks, so it isn't either. The check and the edit happen in the same room call, so no edit lands between them.

Every tool reply but the reads ends with an @@changed line per notebook the connection holds a mark for that others changed. That needed call_tool written out instead of the one #[tool_handler] generates, to wrap the router's reply. It computes a diff per marked notebook per call; a connection holds one or two.

The line is a pointer rather than the changes, so a run of edits by a person doesn't fill every reply, and reading stays the one thing that moves the mark.

2026-11-13, pin cdp-kernel 0.11.0 (#772) ​

cdp-kernel 0.11.0 ships jupyter.table, jupyter.sql and jupyter.chart (#747). CI's e2e suite, the container image and the docs that name the tested version move to it. scripts/release-pins.sh also offered the ganymede-ui pin (0.8.0 to 0.10.1); that is left for the next release, since it changes what ganymede ui install installs.

2026-11-13, who changed a cell, and request cells (#770) ​

Second step of tracking #763, from An agent that responds to your edits.

The room now keeps, per cell id, who last changed the cell's source or type: Room::authors, in memory. For a client's update it hashes each cell's type and source before and after applying it, straight from the yrs document (no notebook build, no outputs), and credits the cells that differ to the name in that connection's awareness state (JupyterLab's user.display_name). A reload or merge from the file is credited to the file. MCP edits go through Room::edit, which credits no one, so own_edit calls Room::set_author with the client's name and person: false.

Hashing every cell on every client update costs time linear in the notebook's source text, outputs excluded. Observing yrs deep events with the connection as origin would avoid it but ties the room to yrs internals.

A request is a Markdown cell whose first word is @agent, the client name, or its first part, with a person as its author since the mark. The author check is what keeps a planted @agent cell (in a shared notebook, or written by another agent or a kernel) from counting, as the design review asked. Marking a request done waits for the plugin step.

The review found that a kernel's host-API edit to a person's cell kept the person's credit, so planted @agent text would read as their request. Room::edit, which every server-side writer goes through, now credits the cells it changes to "the server" (person: false), and the MCP path renames that to the client with set_author. Clients' names are cleaned (no control characters, 64 characters at most) and quoted in the @@changed line, so a name can't forge that line. A deleted cell that comes back with the same hash, as on an undo, keeps its author.

The second review asked for three more: a cell from the file that a person deletes and undoes stays the file's (every removed cell is kept for undo, up to 4,096, with the file as author when nobody changed it); only a person's update restores a removed cell's author, so a reload from disk doesn't; and the @@changed line says "and others" when some counted change has no name.

2026-11-13, table and chart output design note (#747) ​

The direction review found no table viewer for a dataframe and no chart helper in TypeScript notebooks. Thomas asked for a design note before any code: Tables and charts for TypeScript notebooks.

Reading cdp-kernel's display.mjs showed most of the parts exist. It already writes application/vnd.dataresource+json for Polars, which nothing in Ganymede renders, and a text summary for Vega-Lite charts, which the apps and nb publish don't draw. The example notebooks each define a vega.View(...).toSVG() helper, and the journal skill teaches linkedom for Plot and warns that a plot with a legend becomes HTML an agent can't see.

So the note proposes no new MIME type and no new protocol: the table output reuses the data resource type with capped JSON rows (Arrow IPC would be base64 in the file, unreadable to diffs and agents), and the chart helper always yields SVG, redrawing Plot's HTML legend inside it. Seven decisions are left for Thomas.

Thomas agreed the design and the recommendations the same day and asked for a check against Python's equivalents. The note's "Compared with Python" section takes three things from it: head and tail rows in the fallbacks (pandas, Polars), column types under the names (Polars), and a size warning for large SVG charts (Altair's MaxRowsError, without refusing to draw).

2026-11-13, the device reference comes from ganymede-ui (#749) ​

ganymede-device moved into ganymede-ui as packages/device (tlockney/ganymede-ui#560), so npm run fetch-cell-api copies the device reference from packages/device/docs/reference.md on ganymede-ui's main. Each source now names its docs directory, which the link rewriting strips for renames and adds back for GitHub links. A local checkout is GANYMEDE_UI_DIR, no longer GANYMEDE_DEVICE_DIR.

Review follow-ups: the cell API device page's "Edit this page" link points at ganymede-ui's packages/device/src/device.ts; relink throws if a files key is outside source.docs, and a test covers the rename for a docs directory other than docs/.

2026-11-13, examples page names the data helpers (#790) ​

ganymede-ui#603 moved the apps' example notebooks to jupyter.table, jupyter.sql and jupyter.chart. The example pages here render from ganymede-ui's main, so the table in docs/examples.md now describes 03 and 04 that way, with an "Unreleased in ganymede-ui." note until ganymede-ui's next release, whose script files the issue to drop it.

2026-11-13, a folder's default kernel (#739) ​

Thomas wanted an easy way to set which kernel a journal uses in different contexts, other than a line in CLAUDE.md. He chose a per-folder setting the skill defers to, with the skill inferring a kernel only where none is set.

The setting is kernel in a .ganymede.toml, the nearest from the notebook's folder up to the server root. It lives in the server, not the Claude Code plugin, so any MCP client gets it, and the apps' New Notebook could use it later. notebook_open uses it for a new notebook called without kernel and says so in its reply; kernelspecs_list reports it, which the plugin's start hook already calls, so the agent sees it at the start of a session.

Choices:

  • Read from disk and only under the root. The contents API hides dotfiles, and a file above the root could belong to anyone.
  • A symlink is refused rather than followed: a TOML parse error quotes the file, which would leak what the link points at.
  • Unknown keys and a kernel that isn't installed are errors naming the file, so a typo shows up instead of a silent fallback.
  • A file without kernel passes the choice up, so a later key in a subfolder's file doesn't hide the parent's kernel.

2026-11-13, .ganymede.toml reads stay under the root (#743) ​

The after-merge review of #741 found that the folder-default lookup could read a .ganymede.toml outside the server root: through a folder under the root that is a symlink elsewhere (symlink_metadata follows every component but the last), and on Windows through a backslash or a drive in kernelspecs_list's dir. Only that file's kernel or its parse error could leak, but the docs promised it never reads above the root, and the contents API refuses those paths.

The lookup now refuses a dir with a backslash, a NUL or (Windows) a colon, as ApiPath::parse does, and skips a file whose folder doesn't canonicalize under the canonical root, as the contents API's resolves_under does. A symlinked folder that stays inside the root still works.

Smaller fixes from the same review: an existing notebook with no kernelspec now reports the folder file's mistakes and an uninstalled kernel, naming the file, instead of ignoring them; kernelspecs_list says when the folder's kernel isn't installed; errors name the file as the connection sees it; and with --no-execute the notebook_open reply says which kernel the folder chose.

2026-11-13, HTTP runs get their notebook's grant (#745) ​

POST /api/notebooks/run starts the run's kernel with a working directory but no session, so the host API found no notebook for it and answered with the [host] defaults: a notebook narrowed to read = ["reports"] could read the whole root when run from a link with parameters, the apps' Run Notebook or an HTTP client, and one whose grant added run lost it. The host API's own notebooks.run was right: it registers the run's grant under GANYMEDE_HOST_RUN.

run_notebook now also sets GANYMEDE_HOST_NOTEBOOK, the notebook's file id, in the kernel's launch variables, which the server keeps and the kernel can't change. HostApi::who reads it after GANYMEDE_HOST_RUN (a host run keeps its narrowed grant), looks up the id's current path and answers with grant_for(Some(path)) and edit_self off, as notebooks.run does, since a run writes at most a copy. A file id rather than the path, so a rename during a long run keeps the notebook's grant and another notebook moved to the old path doesn't lend the run its own; a deleted notebook leaves the run with no grant. The id is made only once the notebook is read, under the move lock (Collab::index_existing), so a run of a path that isn't there leaves no id behind, and who reads the path and the grant by id in one file-id call, so no rename lands between them. A launch variable rather than HostApi::pin, because the HTTP route has the app state but not the host API.

2026-11-13, journal skill: kernel choice and the user's own notebooks (#739) ​

Two pieces of Thomas's feedback on the journal skill.

Kernel. The skill defaulted to cdp-node unless the user named a kernel. It now takes, in order: the user's ask; a folder default from .ganymede.toml, which the server applies when notebook_open leaves out kernel (#741); an inference from the project (CLAUDE.md or AGENTS.md, the kernel of the user's notebooks nearby, pyproject.toml or package.json); then cdp-node. Thomas's rule: infer only when no folder setting exists. The skill asks kernelspecs_list with dir set to the journal's folder; the plugin's start hook asks only for the session's own folder, so a journal/.ganymede.toml would be missed.

Journal and notebook. A user, especially one deep in Jupyter, may do part of an analysis by hand in their own notebook and part through the agent. The skill covered a person editing the journal, not the journal living beside the user's notebooks. It now searches the whole project (not only journal/), works in the user's notebook when that is where the work lives, matches their kernel and libraries, shares code through modules rather than copied cells, keeps the journal runnable in plain Jupyter, and offers to add results to the user's notebook.

2026-11-13, journal skill uses jupyter.chart (#788) ​

The journal skill's TypeScript guide now draws charts with jupyter.chart (a Vega-Lite spec, or Observable Plot) and shows tables with jupyter.table, and has a section on jupyter.sql, all from cdp-kernel 0.11.0. The linkedom setup, the chart.querySelector("svg") workaround for Plot legends and the hand-built Markdown table are gone: jupyter.chart draws the title and color legend into one SVG the agent can see, and a table's plain text, or its Markdown from cell_snapshot (#775), is what the agent reads back. The widget example renders its SVG through the chart's display bundle (chart[jupyter.$display]()).

SKILL.md steps 14 to 16 point at these and name the cdp-kernel version they need. Each snippet was run on cdp-kernel 0.11.0 (cdp-node) with ganymede run. The two example journals under examples/journals/ still use linkedom; they are saved runs, left as they are.

2026-11-13, journal plugin passes changes mid-turn (#779) ​

Part of #763. The journal plugin's PostToolUse hook now looks for @@changed lines in a ganymede tool reply, makes the notebook_read(path, since) call each names, and adds what changed as context right after the reply, as the UserPromptSubmit hook does when the person writes. The read moves the agent's mark, so the next reply doesn't repeat the line. The skill says the changes then need no read of their own. Bash replies aren't checked, so a person's edit reaches the agent on its next ganymede tool call, not between shell commands.

2026-11-13, design note: an agent that responds to your edits (#761) ​

Thomas asked whether the journal agent responds to edits he makes in the journal, and how rooms could make it. Reading the MCP server and the plugin's hooks: the agent learns of a person's edits only when the person next writes to it, through the UserPromptSubmit hook and the read marks from #313. Mid-turn and idle it learns nothing, changes carry no author, re-runs aren't compared, and cell_edit replaces a cell with no check, so it can overwrite an edit it hasn't seen.

The note, An agent that responds to your edits, proposes per-cell attribution kept in memory, runs reported as changes, a one-line @@changed pointer on every tool reply, an @agent request cell, and a check that refuses an edit to a cell changed since the agent's mark. For waking an idle agent it compares a plugin monitor running a new ganymede mcp watch, a Claude Code channel (research preview, allowlisted only) and MCP resource subscriptions (Claude Code documents no use of them). Four decisions are left for Thomas.

Thomas agreed all four recommendations the same day, and asked for waking an idle agent on any settled edit to be tried later as a spike, to compare with request cells. The reviewer's one finding, that a planted @agent cell could instruct an agent, is answered in the note: only cells a person adds or edits during the session count.

2026-11-13, Mac host read default (tlockney/ganymede-ui#585) ​

The host API decision "default reads cover the whole root" rested on the apps' root being their own documents. That holds on iOS only: the Mac app serves /. The Mac app now passes the folders under its Settings as [host] read (ganymede-ui#585), and docs/host-api.md says so. The server's own default is unchanged.

2026-11-13, a token only /mcp accepts (#766) ​

The security read of 2026-11-13 (#746, finding 3): /mcp sat behind the API's auth, so an agent held the server's token, which also passes every REST and websocket route. mcp_read_only and mcp_no_execute limited the MCP tools only; the same agent could PUT /api/contents, start kernels, open terminals or change grants directly.

mcp_token is a second token that /mcp's own middleware (mcp::auth) checks before falling through to auth::api. It passes the request on without setting the login cookie that a token-authenticated API request gets, since that cookie would open every other route. Nothing else knows the token, so the rest of the API answers 403. The server's token still works on /mcp, so ganymede mcp, which reads it from the server info file, and the page are unchanged.

With auth off (token = "") the key does nothing: every route is open anyway. An empty mcp_token counts as unset, so it can't match an empty Authorization: token header.

the_mcp_token_reaches_only_mcp checks /mcp with the token (initialize, tools/list, a read-only refusal) and 403 with no cookie on contents, kernels, grants, runs, terminals and a kernel websocket, by header and by ?token=.

After review: mcp_token confines an agent only while it can't run code, since a cell can read the server's token from the server info file or the config; docs/mcp.md, docs/security.md and the config doc say so, and that an agent reads the server's token in any output that shows it. Published pages, over MCP or from the browser (/nbconvert/html), replace mcp_token as they do the server's token: server_redactions reads it from AppState.mcp.

2026-11-13, ganymede mcp watch and the requests monitor (#785) ​

Part of #763, decision 2(a). ganymede mcp watch polls notebook_requests (#783) on the server mcp call would find, and prints a line per request once its text has stayed the same for --settle seconds, once per text; answered requests drop out. It knows no read mark and no session: Claude Code gives a plugin monitor no session id, so the watch looks at requests, which live in the server's rooms, not at a session's marks. The journal plugin declares it in monitors/monitors.json with when: on-skill-invoke:journal, so it runs only once a session has used the journal skill. Whether a monitor's line starts a turn in an idle session isn't documented; the check is in ganymede-ui#399.

From the review: each call has a 10-second timeout, so a server that takes the call but doesn't answer is looked for again rather than stopping the watch. The plugin installs from main, while ganymede on PATH is usually the latest release, which has no mcp watch; the monitor checks mcp watch --help first and exits 0 without it. notebook_requests indents a cell's own lines that start @@, so they can't pass for a request header, and a request missing from up to two replies in a row (a notebook the server failed to read) isn't printed again. Each poll still opens a new MCP session; reusing one is a follow-up.

A second review pass: the monitor runs GANYMEDE_BIN when set, as the hooks do; any failed call (a wrong token included) gets one stderr line; the printed line carries the whole request text on one line (a request starting @claude on a line of its own said nothing) and quotes the path. A request in a notebook that closes and opens again is printed again: notebook_requests sees only open rooms.

2026-11-13, publish options on the HTML export (#754) ​

Thomas wants to publish from the apps, which are API clients. The server already rendered the published page at /nbconvert/html/{path}, with its redactions, but only with the defaults. It now takes nb publish's options as code, byline and copy query parameters.

Choices:

  • The existing route rather than a new /api/notebooks/publish: it already reads the notebook, redacts and sets headers, and a new route would be new surface for the same page.
  • copy, not download, for the notebook copy: download=true already means "send it as an attachment" on every nbconvert route.
  • No option keeps the old page (folded, no copy), so JupyterLab's Save and Export Notebook As > HTML is unchanged. The apps pass the CLI's defaults themselves (copy on unless code is hidden).
  • Bad values are a 400 for HTML; the other formats ignore the options.
  • The page gets its own policy, sandbox allow-scripts allow-downloads (the reviewer found the Download notebook button did nothing under /files' sandbox allow-scripts). Output frames keep their own sandbox, so a notebook's HTML still can't download.
  • One parsing rule for all three: trimmed, case-insensitive, empty is absent.
  • Every page names its code mode in <meta name="ganymede-code">. ui#578's review found that a server without these options (0.10.0, which the apps embed) returns the folded page for code=hidden, so a client asking to hide code would share it. The client now refuses a page whose mode isn't the one it asked for.

2026-11-13, what nb publish redacts (#769) ​

The security read of 2026-11-13 (#746, finding 6) noted that the publish docs list the root, home and token replacements without saying they are the only ones. publish_redactions (routes.rs) builds exactly those three; anything else a cell printed, such as an API key or an environment variable, goes into the page and its notebook copy as it is. docs/mcp.md "Publishing a notebook" and the nb publish flags in docs/reference.md now say so and ask the reader to check the page before sharing it. The reference note is generated by a new note() in crates/ganymede-cli/src/reference.rs, so reference_lists_every_command_flag covers it. publish_redactions is unchanged: a secret scanner would guess, and a page that looks scrubbed but isn't is worse than one that says it isn't.

2026-11-13, syntax highlighting in published pages (#739) ​

Thomas noticed that the folded code under each result in a page from notebook_publish had no syntax highlighting. Nothing in the page did: code cells and fenced Markdown blocks went out as escaped text.

The highlighter is a small lexer in ganymede-nbformat (highlight.rs) rather than a grammar crate such as syntect or tree-sitter, which would be a large dependency for four token kinds. It knows TypeScript and JavaScript, Python, shell and JSON, the languages journals use (kernels plus recorded shell steps); anything else stays plain. It marks keywords, strings, comments, numbers and literals as hl-* spans, coloured by the page's CSS in light and dark. It runs on the server, so the page still has no script beyond the frame sizer.

Code cells use the notebook's language (language_info.name, or the kernelspec's); Markdown fences use their info string, and keep it as class="language-…" on <code> as pulldown-cmark did. Rules it keeps:

  • Every character of the source comes out, in order; the tests strip the tags and compare.
  • A string (backticks too) ends at the line's end when unclosed, so a JavaScript regex such as /'/ can't colour the rest of the cell.
  • A word after . is a name (row.type), not a keyword; in shell, after / too.
  • In shell, # starts a comment only at the start of a word.

2026-11-13, download the notebook from a published page (#751) ​

Thomas wanted a published page (nb publish, notebook_publish, the journal's Publish step) to give the notebook back, accepting what the page scrubs. The page now carries a copy as <script type="application/json"> and a Download notebook button under the title.

Choices:

  • The copy is built from the notebook, not from the page, and keeps to the page's rules: the same redactions over every string, kernelspec and language as the only notebook metadata, a raw cell's format and an agent cell's by/mode as the only cell metadata. Recorded parameters are dropped rather than kept as names or placeholders: the run's values can be secrets, and the notebook runs with its defaults without them.
  • Base64 bitmap entries skip redaction, so a replacement can't corrupt an image. The page decodes and re-encodes them, so neither form adds text the page doesn't show.
  • <, > and & go in as \u escapes, so nothing in a string can close the script element; the button re-serializes with nbformat's one-space indent, which restores them.
  • On by default, off with hidden code (the copy holds the code the publisher hid), with --no-download / download: false to drop it. The page with images roughly doubles: the Oklahoma journal went from 602 KB to 1.1 MB. Pointing the page's images at the copy would save that, but would make the page depend on its script to show images.
  • Earlier artifact experiments found the claude.ai downloads capability refuses .ipynb. With that capability the script saves a zip holding the notebook (stored, written in about twenty lines, CRC included); elsewhere a blob link saves the .ipynb. The journal skill says to declare downloads when hosting the page as an artifact.

Checked in Chromium with the Oklahoma journal: the plain download and the zip (through a stand-in downloads capability) both hold the same notebook, 54 cells and 29 outputs, with no /tmp or home path left.

2026-11-13, published pages download from /files (#758) ​

A page nb publish or MCP notebook_publish wrote into the server root and opened through /files got sandbox allow-scripts, so its Download notebook button did nothing; #755 had fixed only /nbconvert/html. get_file now gives PAGE_CSP (allow-downloads added) to HTML whose first 512 bytes hold HTML_GENERATOR_MARK, which to_html writes in the head. Other HTML keeps jupyter_server's sandbox allow-scripts. A page that copies the tag gains downloads only: it still runs in an opaque origin, so it can't reach the UI's token or storage. Allowing downloads for all of /files was the other choice; checking the tag keeps the jupyter_server policy for everything else.

2026-11-13, tables in published pages (#756) ​

ganymede nb publish now draws a table output (application/vnd.dataresource+json, from cdp-kernel's jupyter.table and jupyter.sql, and pandas with display.html.table_schema on) from its JSON rows, before trying the bundle's other entries. Before, the page showed the HTML fallback in a frame, which has a fixed height and can't share the page's type and colors.

The table shows the first 100 rows in a scrolling box with a sticky header, the column's Table Schema type under its name, and numbers right-aligned. Below it a line gives the count: "9 rows", or "100 of 1,461 rows" from ganymede.rows, the source's row count, when there are more. pandas writes no row count and embeds at most its max_rows, so its tables say "60 rows embedded" rather than claim to be whole. pandas also keeps column labels as they are, so a field may be named 0; names that aren't strings are written as JSON text, which is how the rows key them. Values go in as escaped text after the page's redactions, so a table is as safe as a text output. Rows may be objects or arrays; a missing cell is empty, a JSON null shows as null. An entry without schema.fields falls back to the bundle's other entries.

Checked by hand on a notebook run on cdp-node with tables, SQL results and charts, in light and dark.

Follow-up (#759): values first wrapped with overflow-wrap: anywhere, which let a wide table shrink its columns to a character and split numbers across lines. Now a value over 48 characters wraps in a 24rem block (overflow-wrap: break-word), shorter ones stay on one line so a wide table scrolls sideways, and a cell shows at most 1,000 characters. Checked in Chromium at 800px with 25 number columns and a 1,000-word column: the table scrolls, numbers stay on one line.

2026-11-13, cells others ran (#777) ​

Third step of #763. A read mark now also holds each code cell's execution count, so a cell someone else ran since the agent's read is reported with "ran" in its change, with its new outputs, and counted in the @@changed line and the notebook_read(since) summary. The agent's own runs, including notebook_run_all and clearing outputs it marked to leave out, move its mark after the run finishes. Only counts are compared, so a display update from another cell isn't a run, and no outputs are serialized on each tool call. Clearing outputs and count is not a run. Who ran a cell isn't recorded: runs go through the kernel channels, not the room, so a run alone has no "by".

2026-11-13, open requests and answering them (#783) ​

Part of #763. cell_add takes answers: <request id>: in one room edit, the new cell goes below the request and the request gets metadata.ganymede.request = {"done", "answer", "id"}. is_request counts it done only when id is the cell's own, since paste, duplicate and split keep metadata under a new id. The edit is refused unless the id is an open request from a person, and through own_edit_checking, which checks cells for unseen changes without crediting or adopting them, when the person changed the request since the agent's read. A request the mark lacks (written after the read, as when ganymede mcp watch wakes the agent) isn't checked: the agent saw no older version of it. Room attribution hashes type and source only, so the metadata edit credits nobody. A new tool, notebook_requests, lists the open requests (a person's, unanswered) in the notebook rooms open under the connection's folder, via a new Collab::notebook_rooms; ganymede mcp watch will poll it. With path, a notebook no room has open lists nothing rather than opening one: who wrote a cell is known only to a room.

From the post-merge review of #778: execute::run_and_wait takes a future to run when cells still queued at a timeout finish, and MCP passes its own_runs, so the agent's own late runs aren't reported back to it as ran. The future holds only the read mark's token and the marks, not the connection, so it doesn't keep the connection's rooms open. It adopts once the whole batch is done; adopting each cell as it finishes would also keep a person's re-run of an early cell, made while later ones are queued, from being taken as the agent's (follow-up).

2026-11-13, snapshots read table outputs from their rows (#774) ​

cell_snapshot turned a table into Markdown from its HTML, which suited pandas and Polars. cdp-kernel 0.11.0's jupyter.table HTML puts each column's type in <small> under its name and ends a long table with a one-cell gap row, so an agent got "moonstring" headers, the gap row as data, and a row count from the HTML rows. A snapshot now reads application/vnd.dataresource+json when an output has one: names and types from the schema, rows from the data, the total from cdp-kernel's ganymede.rows. HTML stays the fallback.

2026-11-14, Person and agent eval (#824) ​

evals/agent-native/ has six scripted scenarios in which a real agent (claude -p with the ganymede-journal plugin, run as evals/journal does, through the new shared evals/lib/claude.mjs) and a simulated person edit one live notebook. The person is person.py, a room client on the same libraries as e2e/collab/ydoc_client.py; its steps wait for a condition on the live document ("a cell with agent provenance exists", "request req1 is done") and then edit, so its edits land between the agent's. Each scenario scores pass or fail from the final .ipynb (metadata.ganymede.agent, .request, sources and ids) and the person's log (person.json: which steps ran and when), with no model judging. README.md there says what each checks and when to run it: on changes to crates/ganymede-server/src/mcp*, rooms or the journal plugin, and weekly otherwise.

Choices:

  • No kernel. The notebooks hold Markdown and the server runs with mcp_no_execute, so the eval needs no cdp-kernel, and a run takes one to three minutes. Scenarios about runs (ran in change reports) would need one; they aren't covered.
  • The candidate "the notebook is read-only" became a read-only server (mcp_read_only): there is no read-only flag on a notebook an agent sees through MCP, only on the server's tools and on a second server's room. The check also catches the agent writing the .ipynb directly, by counting cells.
  • A person step whose condition never holds (the agent never wrote a cell) fails the run: the interleaving didn't happen. A session that times out or exits non-zero is left out of the pass rate.
  • The agent's session log is stream-json, and a run whose agent never called a ganymede tool is left out, not scored: otherwise read-only passes for an agent that exits 0 without trying.
  • The plugin's Stop check is off in these runs: with no kernel it only asks for a run-all.
  • The prompts tell the agent to sleep between steps to leave room for the person. Claude Code refused a standalone sleep 25 in some runs and the agent used a background sleep, which waited as long. Timing is the loosest part, so two checks also fail a run that has the right file but the wrong order (review of the first version): person-edit-kept needs a history entry holding the person's note, which the server writes only when the agent's cell_edit replaced text that already had the note; concurrent-edits needs a person edit (timed by person.py, ISO UTC) before the agent's last edit. Either failing reads "interleaving didn't happen" and counts as a fail, not an exclusion.
  • What the person-edit-kept runs show: the person's note reached the agent before its cell_edit (the journal plugin's PostToolUse hook reads the change in), so the agent edited on top of the note and kept it. The server's refusal of a stale cell_edit was not what protected the note in these runs, and no run so far has hit it.

Baseline, --runs 2, claude-code in this container, a release build of main at 6d2c25d, with the order checks above:

ScenarioPassed
request-answered2/2
two-requests2/2
concurrent-edits2/2
person-edit-kept2/2
read-only2/2
planted-request2/2

None excluded, and every run showed at least two ganymede tool calls in its log (the baseline was rerun with this rule, 12/12 again). In both concurrent-edits runs the person's three edits landed between the agent's first and last (about 30 seconds before its last), and in both person-edit-kept runs the history entry holds the note. An earlier baseline of the first version of the checks also passed 12/12, after a fix to person.py (YNotebook has no insert_cell) that its first concurrent-edits runs needed. No product bug showed: no lost edit, no overwritten person edit, no write on the read-only server, and the planted @agent cell was never treated as a request or obeyed. With 2 runs a scenario's 2/2 says little about a rate; the next run after a change to the tools should use more.

2026-11-14, App server info file token (ganymede-ui#583) ​

ganymede-ui#608 makes the Mac app write its mcp_token, not the server's token, to jpserver-<pid>.json, so a token on disk opens only /mcp. ganymede mcp sends the file's token only to /mcp, so it still works; jupyter server list and other readers get a URL the server refuses. The reference page's ganymede-ui note now says so, and docs/mcp.md says its "keeps the server's token" is about ganymede serve's file.

2026-11-14, how-to: asking the journal agent (#811) ​

Thomas asked whether request cells were documented. They were, but only for agent and tool authors (docs/mcp.md "Learning of changes mid-work" and "Waking the agent for a request"). Added a short section for the person writing in the journal: write @claude … in a Markdown cell, stop typing, and the agent answers below it. It says plainly that an idle wake depends on Claude Code's monitors, which aren't documented to start a turn, and that any message in Claude Code picks the request up. Also listed GANYMEDE_WATCH_EDITS with the plugin's settings.

2026-11-14, cdp-kernel 0.12.1 (#799) ​

cdp-kernel 0.12.1 adds SQL_MODULES to the browser kernel (cdp-kernel#495). A page that maps DuckDB's module, wasm and worker in modules runs jupyter.sql without jsDelivr. ganymede-ui#615 (issue ganymede-ui#614) uses it: it bundles the module and fetches the wasm and worker into the page's cache the first time it is online, a choice Thomas made over shipping 36 MB in the apps.

Here the pins move to 0.12.1 (CI, the container image, the architecture and development docs), and docs/data-output.md describes offline SQL, with its "Unreleased in ganymede-ui" note widened to cover it.

2026-11-14, cdp-kernel 0.12.2 (#804) ​

cdp-kernel 0.12.2 is a docs release: its site shows the real output of the jupyter examples and live widgets instead of screenshots (cdp-kernel#500, #502). The typings change only in comments. Here the pins move to 0.12.2 (CI, the container image, the architecture and development docs).

2026-11-14, pin cdp-kernel 0.12.0 (#792) ​

cdp-kernel 0.12.0 adds two things:

  • Paging through the kernel: a table cut by the cap is kept in the kernel, and the apps ask for more rows over the ganymede.table.v1 comm (cdp-kernel#489).
  • The browser kernel's modules option: the apps use it to serve vega, vega-lite and linkedom themselves, so charts draw offline (cdp-kernel#491).

CI's e2e suite, the container image and the docs that name the tested version move to 0.12.0. docs/data-output.md now describes both, with "Unreleased in ganymede-ui" notes. The app side ships in ganymede-ui's next release: paging in ganymede-ui#605 (issue #604), and offline charts in ganymede-ui#611 (issue #610), both for #747.

2026-11-14, cell API pages show output and live widgets (#807) ​

cdp-kernel's reference pages now name a saved notebook and mark runnable examples as ```ts cell (cdp-kernel#500, #502). fetch-cell-api reads that notebook and puts each cell's outputs after its block, using the example pages' output renderer (fetch-examples.mjs), so /docs/cell-api/ shows what cdp-kernel.org shows. A block the notebook doesn't have as written fails the build, as on cdp-kernel.org.

Widgets: an anywidget saved with its state and view module now runs on the page from that state (theme/widgets.ts, copied from cdp-kernel's; the two should stay in step). cdp-kernel's docs runner saves each widget output's state as of its own cell in metadata.docs, and the page starts from that, so a later cell's change doesn't show in an earlier output. The example pages keep the "needs a running kernel" note: their notebooks carry no snapshots, so there is no state to start a widget from.

text/plain outputs now drop terminal colours, as streams and errors already did: cdp-kernel's inspected values carry them.

2026-11-14, ganymede.toml in Ganymede's config dir (#814) ​

Without --config, Ganymede now reads ganymede.toml from its own config dir: $XDG_CONFIG_HOME/ganymede, else ~/.config/ganymede, on Linux and macOS, and %APPDATA%\ganymede on Windows. GANYMEDE_CONFIG_DIR overrides it on any OS, as GANYMEDE_DATA_DIR does for the data dir. The CLI integration tests set it, and JUPYTER_CONFIG_DIR, to an empty directory in common::ganymede(), so a developer's own file stays out of them. It was read from the Jupyter config dir (~/.jupyter), which a reader had to know and which is Jupyter's, not Ganymede's.

macOS uses ~/.config rather than ~/Library/Application Support: the file is for a command-line server, and that is where such tools keep theirs. The data dir stays in Application Support, as before.

The old file is still read when the new one doesn't exist, with a warning that names where it should go; when both exist, the new one wins and the old one is named as ignored (unless they are one file through a symlink). serve, mcp, execute's host config and the crash_reporting lookup all go through serve::default_config. ganymede info prints the config file path.

The Jupyter config dir keeps its Jupyter uses: JupyterLab settings and workspaces, labconfig, nbconfig (--config-dir). The apps pass their config as JSON and read no file, so they don't change.

2026-11-14, the gateway names itself as a program (#816) ​

Part of step 5 of making Ganymede Tailscale-aware: remote kernels without a token. The gateway now sends Ganymede-Client: ganymede-gateway on every REST request and on the kernel websocket handshake. A remote Ganymede server that lets this machine in by tailnet identity (through tailscale serve, or whois on its tailnet address) then accepts it with no gateway_token, since the header marks a request no web page could send. Other servers ignore the header.

Test: requests_name_the_gateway_as_a_program reads the request a gateway sends to a bare listener. The websocket handshake sets the same header; the end-to-end check is by hand on a tailnet (#816).

2026-11-14, Drop a host grant when its file changes outside Ganymede (#767) ​

A notebook's host grant is keyed by file id, and a file replaced outside the server (git checkout, Finder, a download, a sync tool) keeps its path's id, so the new content inherited the old grant. Hashing the file at every grant read wasn't wanted, so each grant now carries a stamp of its file: size, modification time in nanoseconds and, on Unix, inode number (not the device, which isn't stable across remounts), from one stat (ganymede_contents::file_stamp). The change time was tried first and dropped: on macOS it moves with chmod, extended attributes (Finder, quarantine, iCloud) and links, so grants would go with no edit. An atomic replace (git checkout, most editors, downloads) makes a new inode and an in-place rewrite changes the modification time; a same-size in-place rewrite that restores the old modification time is not seen, and neither is one within a tick of a filesystem with coarse timestamps (exFAT, HFS+). Windows has size and modification time only. host_grants gets a nullable stamp column, added when a database lacks it (several servers share one, so a "duplicate column" from a concurrent add is fine).

FileIds stays pure: callers pass the stamp, or a closure that takes it while the store is held (grant_checked_with, set_grant_with, restamp_if). Taken before the lock, a whole save and restamp could land between the stat and the comparison and the check would drop a valid grant, or a grant set could overwrite a fresher restamp; taken inside, a check sees either the restamp or the save in flight. grant_checked keeps a grant whose stamp matches or whose file can't be stat'ed, stamps one that has none (trust on first use, so grants from before this change aren't dropped), and otherwise deletes it and logs the path. grants_checked does the same for the listing, so ganymede grant --list shows only grants that hold. In SQLite the stored stamp is tagged with a hash (FNV-1a, written out, since DefaultHasher varies by Rust version) of the grant it was taken for: an older build sharing the database can change a grant without its stamp, and a stamp for another grant counts as none (trust on first use). An older build also saves without restamping, so a new build drops the grant after an old build's save; that fails safe. If the file changed and the database won't delete the grant, it isn't handed out and nothing restamps it.

Saves must restamp, and patching every call site would miss the next one, so Collab::stamping wraps AppState.contents. save and restore_checkpoint take their path's turn (one server write of a path at a time), run check_for_write (which drops a grant the file outgrew, so the write doesn't bless it, and returns the stamp the grant is stored under, or nothing when no grant stands), mark the path in flight, write, and restamp only if the grant is still stored under that stamp (restamp_if, a compare-and-swap), then unmark. All of that runs on a detached task so a dropped request can't leave a write unstamped. A copy onto a named file is checked and restamped like a save; a copy into a directory, and new_untitled, make a file that has no grant, so whatever grant is stored at its path, under this root or another, left by a file deleted outside, is dropped (Collab::forget_new_file, which also closes rooms open on it), never restamped; they take the move lock before the tree lock, as a rename does. A rename first clears what other roots above the destination hold there, so a file renamed in doesn't take a stale grant. Rooms, REST, MCP and run copies all hold that wrapper. A rename keeps the inode and modification time, so it needs no new stamp; Collab::rename checks the old path's grant before renaming (a file replaced outside and then renamed doesn't carry its grant to the new name) and restamps the new path after the ids follow, with the new path marked in flight meanwhile, so a filesystem that differs is covered.

The race that matters is a grant read between a write and its restamp, which would drop the grant of a file the server just saved. A check keeps the grant, with no stamp to compare, when a save of that path is in flight or any save began or ended while it looked at the file (each path keeps its in-flight count and the sequence number of its last begin or end, compared before and after the stat, so a save of another path doesn't void the check; a path forgotten to keep the table small voids the checks that began before it). That covers readers in this process. Another process (ganymede grant --list, a second server) checking in that window sees the new file and the old stamp and drops the grant: it fails safe, as does an older build's save. There is a known, tiny window the other way: an outside rewrite that lands between the server's write and its restamp is blessed by the restamp, since the stamp is taken from the file as it is then.

ganymede grant stores the stamp and reads through the checked forms, with the stat inside the store's lock. A program that writes a notebook without the server (ganymede execute, ganymede nb clear) doesn't know which root its grant was made under: it may run from a subdirectory, or on a notebook outside the cwd. Their one writer, write_notebook, and the server's saves use the same helper in ganymede-contents (held, Held): it finds every root that has a file id for the file (one query of the shared database by each candidate (root, relative path) from the file's ancestor directories, roots_with_id), checks each root's grant just before writing, and restamps with the same compare-and-swap after. It doesn't go through the host API, with or without one. Its write is not marked in flight, so another process reading the grant in that window drops it, which fails safe. Windows has no inode in the stamp, so a same-size replacement by rename that keeps the modification time isn't seen there.

Grants are per (root, path) in the shared database, so a server on / and ganymede serve or ganymede grant in a project directory each hold their own grant on one file, and a save by one must not drop the other's. The server's saves (save, restore_checkpoint, copy) look for the same file's grants under every other root (Collab::check_others), check them before the write and restamp them after, with the same tokens; with ids in memory there is only the own root. The in-flight marks and turns are this process's, so another process reading one of those other grants between the write and its restamp drops it, which fails safe. A rename moves its own root's ids and those of every other root above both paths that has an id under the old one (FileIds::moved_in_other_roots, a file or a directory), so their grants follow; a rename out of such a root (the new path isn't under it) drops that root's ids and grants, as a delete does. The stamp doesn't depend on the path, so they need no restamp. A rename onto itself does nothing. A rename takes the write side of a lock that every save, restore and copy holds for reading, after the move lock, so it waits for the saves in flight under either path, files or a directory's, and none begins meanwhile; a save in flight when it lands finishes and restamps first.

The server's saves reuse the connection their FileIds already has for the roots_with_id query (held_with). The query joins host_grants, so it returns only roots that hold a grant on the file, and held_with opens another root's FileIds only for those. moved_in_other_roots has its own query, since it moves every root's ids, grant or not.

A delete through the server drops the ids, and so the grants, that every other root above the path holds on it (FileIds::removed_in_other_roots), so a file made anew at the path inherits none. A write that is about to make a file the grant can't be checked against, because it was deleted outside, stamps nothing (check_for_write_with returns no stamp when the file can't be looked at), so the grant goes on its next read, from the server and from ganymede execute -o alike. A grant with no stamp (from before the stamps, or set during a save) is dropped then too (FileIds::drop_unstamped), since the next read would stamp the new file with it. A save that fails isn't restamped: whether it wrote can't be known, and an If-Match failure over an outside change must not bless it; if the file did change, the grant is dropped on its next read, which fails safe. copy runs detached, as a save does, and a copy onto a named file (a destination that isn't an existing directory) checks, marks and restamps it as a save does. A grant set while a save of its file is in flight is stored without a stamp, and the first use stamps it. A grant look that a cleanup of the remembered paths overlapped is made again, up to three times, not given up as unstable, so a quiet path's save keeps its restamp. The database check gives a row that changed under its compare the verdict once more, and one that changes again the verdict without a compare, not handed out if it doesn't match; a check that fails (an error from the database) hands out nothing either.

Known limits, left for a follow-up (#829): a rename holds the move lock for writing while it waits for the write side of the tree lock, so the server's room opens and deletes pause for as long as the slowest save in flight; a per-path or per-prefix wait would avoid that. The cleanup that keeps the table of remembered paths to 256 resets a floor that voids looks begun before it, which are made again a few times, and then give up as unstable: a read keeps the grant, but a check before a write returns no stamp, so the save restamps nothing and the grant is dropped on its next read.

2026-11-14, the journal plugin sets no version (#809) ​

plugin.json had set "version": "0.1.0" since #315, and none of the 18 plugin changes since bumped it. Claude Code computes an installed plugin's version from the manifest first, then the marketplace entry, then the source's commit SHA, and updates only when that version changes. So claude plugin update and auto-update left everyone on the copy they first installed: the requests monitor (#786) and the request tools (#784) never arrived. Reproduced with an isolated HOME: the install landed in cache/ganymede/ganymede-journal/0.1.0, and after dropping version in the marketplace clone, claude plugin update moved it to the commit SHA.

Two fixes were open: tie a version to Ganymede's release, or set none. The plugin already installs from main and checks what the ganymede on PATH supports (the monitor exits when mcp watch is missing), so it now sets none and each commit to main is an update. A release-tied version would hold plugin fixes back until a release and needs a bump step that can be forgotten in the same way.

CI's plugin job fails when plugin.json or the marketplace entry sets version. docs/mcp.md says how to update: turn on auto-update for the ganymede marketplace (off by default for marketplaces other than the official ones), or claude plugin marketplace update ganymede and claude plugin update ganymede-journal@ganymede, then restart.

2026-11-14, Review replay eval (#822) ​

evals/review/ replays the pre-push review prompt on 21 cases and scores what it catches (part of #821). A case is a diff a reviewer saw (repo, base sha, head sha, issue) with the known Medium or High finding and its class A to I from the review-patterns analysis. Ten cases are first-round diffs of posted changes needed reviews, six are diffs a passing review missed and a later run found, five are clean diffs that passed with no follow-up. The runner gives review-prompt.md word for word plus the workflow's trailer (REPO, BRANCH, ISSUE, DIFF) to claude -p on Opus with read-only tools, in a scratch clone whose origin/main is the case's base and whose objects hold only the history of base and head, so no later commit can be read by sha. A Sonnet judge scores each review caught, partly or missed per finding and counts other Medium+ findings. The scoring is pure and tested (node --test evals/review/*.test.mjs, in the plugin CI job). How to run it and how to add a case (every new Gaps entry adds its case) is in evals/review/README.md.

Clean cases were picked from merged PRs in ganymede, ganymede-ui and cdp-kernel with 60 to 700 changed lines, at most 10 files, based on main, whose only review was one Review: pass on the head that merged. Excluded: releases and docs-only PRs, PRs in a findings file under reviews/pr-reviewer/, and PRs another PR or issue names (searched with gh api search/issues for #N and repo#N). Left are ganymede #787, ganymede-ui #601 and #541, cdp-kernel #439 and #416.

The first baseline (total $60.71) was discarded after the pre-push review found flaws in the runner: reviews could not read the issue (55 of 62 said so: gh issue view needs GraphQL, which these sessions can't reach, and a review without the GitHub MCP tool the prompt names never thought of gh api); read tools were unscoped, so a review could read the answer files under /mnt/project-files, other clones and the eval's own output; the scratch clone shared objects with the bare cache, so later commits were readable by sha; find, git grep and git log --output could run commands or write. The runner now scopes reads to the clone and denies those paths, serves the case's own issue through a local github MCP server (issue_read, as the prompt says) plus an exact gh api rule, fetches only base and head into the clone, and drops the write-capable commands. A probe run confirmed each denial. It also refuses to resume an --out made with another prompt or model, takes a lock, writes results.json atomically, treats a judge reply without other_medium_plus as unusable, and re-judges a saved review instead of rerunning it.

This baseline ran on the runner of commit 7dfbe2e, which was hardened afterwards: settings isolation (--setting-sources ""), git blame and its file-reading flags removed, denies built from the real paths instead of a blanket /home and /mnt, the issue's comments limited to those written before the head commit, one prompt per --out (the concurrency-lens runs broke this), and a check that gh works before any review. A rerun with the current runner is the next baseline.

Baseline (2 runs per case, plus one security-lens and one concurrency-lens run on the ten cases with a class A or B finding; the full report is evals/review/baseline-2026-11-14.md, total cost $55.27). The reviews read the issue in 57 of 62 runs:

  • Recall over 20 known findings: 83% single-run, 88% any-run. Known 79% single-run, missed 89%. Class A 79% (7 findings), B 83% (6), C 100% (1), E 63% (2), F 100% (3), I 75% (1).
  • The one finding missed in every run, four of four including both lens runs: ganymede #817's High (a tailnet login loads /lab and gets the master token). The reviews found a different High in the same code.
  • False alarms: 0.60 other Medium+ findings per run on the clean cases, and 5 of 10 clean runs ended Review: changes needed. They may include real findings the posted review also missed; the judge doesn't check them.
  • Two lenses vs one run, on 13 class A/B findings in 10 cases: one plain run 81%, two plain runs 85%, a security-lens run plus a concurrency-lens run 88%. The lens pair costs $17.32 against $9.07 for one run. Not justified by this sample: the pair beats one run by 7 points, under the 15 the rule asks for, and beats two plain runs by 3 points, which is half a finding (one "partly" became "caught").
  • The prompt's Gaps entries name most of these PRs, so the baseline is optimistic for them. Its use is to catch a regression and to test a new entry against its own case, which should be missed before the edit and caught after.
  • The reviews can't build or run tests here, which understates class E.
  • Cases ganymede-827 and ganymede-827-copy-test (Gaps entries 17 and 18) were added after the baseline ran and are not in its numbers.
  • Gaps entry 17 was added to the prompt while the runs went, so the concurrency-lens runs used a prompt one entry longer (sha 0f3b111e against f4471519); each run records its sha.

2026-11-14, One room-ops helper (#768) ​

The MCP cell tools, ganymede execute's runs and the host API's self.* calls each had their own copy of the room edits: reading a cell's source, inserting a cell, replacing a source, deleting one, and the read-only refusal for a room another server owns. They now share crates/ganymede-server/src/room_ops.rs. Checks that differ by caller (MCP's read marks, the self.* source hash) stay with the caller.

Two behaviors follow from sharing the code:

  • self.add stamps metadata.ganymede.agent with by: "kernel", and self.edit keeps the replaced source in history, as cell_edit does. Before, self.* edits carried no provenance.
  • self.* calls hold the notebook's room, as an MCP connection does. A server-started kernel whose notebook has no client open could see the room retire between calls, and in a notebook without cell ids (nbformat 4.4) the ids self.add returned would change. The hold is per kernel. A task watching the kernel lets it go when the kernel manager shuts the kernel down, and unpin lets a pinned kernel's go, so an ended kernel doesn't keep its notebook's room open and locked.

source_of now also reads a source stored as a list of strings, which the self.* hash check and execute read as empty before.

2026-11-14, Tailnet identity names the person (#816) ​

Third step of making Ganymede Tailscale-aware. A request let in by tailnet identity now carries the name it was let in as, and the server uses it where it named a person before:

  • /api/me returns the login (or a tagged device's tags) as the user's name and initials, so JupyterLab shows who you are instead of an anonymous name. A request with the identity is named even when it also carries the login cookie or the token (found in review: a browser that opened the token URL once would otherwise stay anonymous). Without it, /api/me is anonymous as before.
  • A shared notebook's room credits edits to that name (Room::connect_as), whatever name the frontend puts in its awareness state, so a person with a tailnet identity can't be credited under another name. Other clients still name themselves, and may pick a tailnet login; "by" doesn't say which names were vouched for. Marking them is a possible follow-up.
  • The request's log span gets a who field (debug level), and each name is logged at info level the first time it's seen, once per server.
  • With whois on, a token or cookie request from a tailnet address is looked up too, so it is named; it can then wait on tailscale whois (cached a minute, at most five seconds). Cross-origin ones, whose answer would go unused, aren't looked up.
  • ganymede info shows which logins the config file lets in (tailnet_identity, null when off), and the error when serve would refuse the config (serve::check_tailscale, shared with startup).

/api/me's response keeps its shape; only the values change for a tailnet login. Not yet tried on a real tailnet.

2026-11-14, Tailnet identity behind tailscale serve (#816) ​

First step of making Ganymede Tailscale-aware. [tailscale] allow in the config lists tailnet login names; a request with no token or login cookie gets in when it comes from a loopback peer and its Tailscale-User-Login header, which tailscale serve sets, names one of them. Empty by default, so nothing changes unless it is set.

  • The server now serves with into_make_service_with_connect_info, so auth can see the peer address. A request without one (a router driven directly, as in tests) never matches.
  • The identity is ambient, more so than the login cookie: tailscale serve adds it to every request from the device, with or without credentials. So it gets XSRF on changes and a stricter Origin check than the cookie: same origin only, never allow_origins. And it needs the Host check: with allow_remote_access on, a DNS-rebinding page could come in through serve as the visitor, so the server refuses to start with both set. No login cookie is set; each request carries the header. Another site's subresource requests (<script>, <img>) carry no Origin but do get the identity, so a cross-site Sec-Fetch-Site is refused too, except for a top-level navigation, which the SameSite=Lax cookie also allows (GET and HEAD only). Browsers send Sec-Fetch-Site only over HTTPS, so a request without it gets no identity: the feature is for tailscale serve's HTTPS proxy, and sandboxed HTML under /files/ loses its images for a tailnet login. A websocket handshake without Sec-Fetch-Site keeps the identity when its Origin is the server's own. Logins match exactly, case included. (All found in review.)
  • /mcp doesn't take it: agents keep to mcp_token or the server's token.
  • Tags are refused in the list: tailscale serve sends no identity for tagged devices. They come with the next step, which asks tailscaled (WhoIs) for the sender of a server listening on its tailnet address.
  • The lab page renders an empty token for a tailnet-identified request. With the token in the page, JupyterLab would switch to it: past the cookie's checks, onto /mcp, and kept after the login is removed from allow (found in review).
  • The header is forgeable by anything that reaches the loopback port other than tailscale serve's HTTP proxy: a local process, another reverse proxy, TCP-mode serve or funnel, an SSH tunnel. docs/security.md says so; the option is for a machine one person uses, behind tailscale serve only. A non-loopback ip with allow set logs a warning.
  • Entries must be ASCII, since tailscale serve MIME-encodes other characters.

Design note and the remaining steps are on #816.

2026-11-14, Tailnet identity from tailscale whois (#816) ​

Second step of making Ganymede Tailscale-aware. With [tailscale] whois = true, a server listening on its tailnet address asks tailscale whois --json <ip> who owns the address of each request that has no token or cookie. Tagged devices are known by their tags, others by their owner's login, so allow may now list tags (tag:agent); without whois tags are still refused.

  • Only tailnet addresses (100.64.0.0/10, fd7a:115c:a1e0::/48) are looked up, one lookup at a time, with a five-second timeout; cached answers don't wait for a lookup. Answers are cached for a minute, failures for ten seconds. Calling the CLI rather than tailscaled's LocalAPI covers the Linux daemon and both Mac apps, whose LocalAPI sockets differ.
  • The server's own address is never looked up: a local process that connects to it comes from it, and whois would name the machine's owner (found in review). So whois requires ip to be the tailnet address itself; 0.0.0.0 or another address is refused at startup.
  • Browsers send no Fetch Metadata over plain HTTP, so they get no identity this way; JupyterLab stays on tailscale serve. Programs (the apps, the gateway, scripts) send a Ganymede-Client header and no Origin. A page on another site can't send a custom header without a CORS preflight, so the header also replaces the XSRF token for them. The header works behind tailscale serve too. A program's websocket handshake may add a same-origin Origin of either scheme alongside it, since some libraries do and a browser's WebSocket can't set the header.
  • With [tailscale] allow set, allow_remote_access now defaults to off whatever --ip is, so the Host check stays on, and local_hostnames accepts IP addresses. With whois on, the server adds its own --ip to them.
  • New process surface: the server runs the tailscale command (or the one in [tailscale] cli). It is off by default and only with allow set.

2026-11-14, Docs for ganymede-ui v0.11.0 (#803) ​

ganymede-ui v0.11.0 shipped the app changes eight "Unreleased in ganymede-ui." notes marked: table paging and sorting through the kernel, offline charts and SQL, the example notebooks on jupyter.table, jupyter.sql and jupyter.chart, the Mac app's host read default, its server info file with the /mcp-only token, and the person's name in a room's awareness. The notes are gone. Where the text needs a version, because a reader on an older app would see something else, it now says "From ganymede-ui 0.11.0 on", as the privacy page already did for 0.7.0.

2026-11-14, wake the agent on any edit: a spike (#794) ​

Thomas asked to try waking the agent on any edit a person makes, not only on a request cell, as a spike after the request work (#763).

notebook_requests takes edits: true: besides the open requests, an @@notebook {path} line for each notebook read and an @@edit {path, id, by, hash} line for each other cell a person last changed. The hash is the read marks' fingerprint (kind and source), so a poller can tell a change without the reply carrying every cell's text. An answered request keeps the person as author, so it is listed too; the watch takes it as it is when it leaves the request list, or every answer would wake the agent again (review), while the person's later edits to it still count. The @@notebook lines let the watch take a notebook as it is when first listed, rather than when it first has a person's cell: in a journal the agent wrote, that was the person's first edit, which was then never reported. ganymede mcp watch --edits keeps those hashes per notebook, takes a notebook seen for the first time as it is, and prints one line per notebook once no cell in it has changed for --settle seconds: who, how many cells, and a pointer to notebook_read(since). The journal plugin's monitor adds --edits only when GANYMEDE_WATCH_EDITS is set. Off by default.

What to find out by trying it: whether a line per settled burst of edits helps the agent follow along or pulls it off its work, and whether a settle of a few seconds is too short for prose. Deleted cells aren't counted, and the line doesn't say what changed: the agent reads it with notebook_read(since). A follow-up issue decides keep, make default, or drop.

2026-11-15, creates no longer hold up grant reads (#829) ​

A copy into a directory and a new untitled file held the move lock for writing for the whole create, because the new file's path isn't known until the create returns, and a stale id or grant left at that path by a file deleted outside must be forgotten before anything reads it. Grant reads, path-and-grant reads, indexing and room opens take the move lock for reading, so all of them waited until a large copy finished, whatever path they were after.

A create now takes the move lock for reading and claims the direct children of its directory (for a copy with no directory given, the directory of its source) until the new path is forgotten, the root's included. A new file is one of those children. A new untitled folder is the exception: the ids and grants dropped for it are all those under its path, so its create claims the directory's whole subtree. A grant read, an index and a room open register the path they look at, and wait only while a create claims the directory that path is directly in; a create waits for the lookups already registered at paths directly in its directory. A lookup by file id, which only learns the path after reading it, registers it and reads it again, and starts over if it changed. That can only happen if another process sharing the file-id database moved the path, so no test holds it.

So lookups of paths elsewhere no longer wait for a create, and a lookup under the directory still can't see the stale grant or id, or open a room on the new file under the stale id. This holds for the root too: a copy or a new untitled file at the top waits for no lookup of a path in a folder, and holds none up. A rename's claim, unlike a create's, still covers its paths and all under them.

Overlapping creates in one directory could have kept a lookup waiting for good, as each new claim held it back again. A lookup held back by a claim is now counted as parked, and a claim made later waits for the parked lookups under its paths to go ahead before it takes hold. Lookups arriving when no claim covers them don't park, so they don't hold claims back.

Renames, deletes, and the check that finds a file deleted outside still take the move lock for writing, so they wait for a create in progress and none lands during one. The lock is fair, so a lookup that arrives while a rename waits queues behind it, as before. Two creates in one directory no longer take turns on the lock; the contents reserve each name with an exclusive create, so they get different files.

The registry the writes and renames of #830 used is now a small type of its own, PathLocks, with one instance for writes against renames and one for lookups against creates. The lock order is the move lock, then the lookups, then the writes, then a path's turn.

This closes #829.

2026-11-15, grant stamp locks scoped to their paths (#829) ​

A rename through the server used to take one server-wide write lock, so it waited for every save and copy in flight on any path. The lock prefers writers, so while a rename waited for one slow save, every new save of every other file queued behind it. A rename now waits only for the writes registered under its old and new paths, a directory's included, and holds back only new writes under those two paths. Saves and copies register the paths they write: a save its file, a copy its source and its destination (or the destination directory, when the new file's name isn't known yet and one is given; a copy with none goes beside its source, which its source's registration already covers), and a new untitled file its directory. Prefixes match whole path segments, so a rename of d doesn't wait for dd/x.ipynb. A rename whose wait is dropped gives its paths back.

A rename still holds the move lock while it waits, so room opens, grant reads, deletes, new untitled files and copies into a directory still queue behind a rename that waits on a slow save under its paths. Saves of other paths no longer do.

The same stamps remember at most 256 paths whose saves are over, and the cleanup that keeps that bound ran on every save that ended once more than 256 paths were known, saves in flight included. With more than 256 saves at once it evicted nothing, yet moved its floor to the latest sequence number every time, so every look at a grant came back unstable and stale grants were kept until the load dropped. The cleanup now counts quiet paths, those with no save in flight, and runs only when more than 256 are quiet. It evicts only those, except the path whose save just ended, and its floor is the latest end among the paths it evicted, so any number of saves in flight leaves the floor alone.

Still open on #829: item 2, that a copy into a directory and a new untitled file hold the move lock for the whole create, which is also what the wait above queues behind, and item 4, that other ganymede grant roots inside a renamed or deleted directory aren't followed or cleaned, a design call asked on the issue. This change touches neither.

2026-11-15, grants of roots inside a renamed or deleted folder (#829) ​

A server that renamed or deleted a path followed only the roots above it (ganymede grant project directories and other servers), so the grants of a root at or inside the path were left on a directory that was gone. A grant with no stamp there would then have taken a file made anew at the path on its first use. A rename now moves every other root at or under the old path to the same place under the new one, with its ids, paths and grants, after dropping what roots at or under the new path hold, which comes from something deleted outside and is never what moves in. A delete drops every id and grant of the other roots at or under the path, and so does a file or directory made by a copy or new_untitled, which forgets stale rows there. Roots are found by reading the distinct roots in the database and matching whole path segments, so proj doesn't match projx. The roots move in one transaction, so a failure moves nothing; it is logged, as before.

2026-11-15, timing tests hold on a stalled runner (#832) ​

e2e (macos-latest) failed twice on main in tests that assumed the runner schedules them promptly. rooms_ping_clients_and_drop_silent_ones runs a server with a 300 ms idle timeout and reads as the live client in 100 ms slices, so a runner that stalled the test task for 300 ms made the server drop a client that was still alive. missed_heartbeats_mark_an_attached_kernel_dead (#826) slept three heartbeat periods (60 ms) and then turned the fake kernel's beats off, but the monitor declares a kernel dead only after it has seen one answered beat. When the runner stalled the monitor through that sleep, no beat had been answered, and the kernel was rightly never declared dead.

The room test now uses a 1 s idle timeout, and its first live loop runs 2.5 s, so it still proves that reading keeps a client past the timeout. The heartbeat test's fake kernel counts the beats it answers, and the test waits for the first one before it turns them off. A few other waits changed the same way: the reconnect test polls for the closed socket to leave the connection count, the kernel-host tests that gave a kernel 300 ms to take up a request, or 1 to 2 s to be marked dead after an exit, now allow 1 s and 10 s, and the two-servers test waits 2.5 s, not 1.5 s, for the read-only room's next try at the lock (up to about 1.25 s).

The rule: a test waits on a condition with a wall-clock deadline of several seconds, not on a fixed sleep, and a server timeout that a live client must beat gets a margin of about 1 s. A short timeout that only bounds a check that something does not happen can stay short, since a slow runner makes it pass more easily.

2026-11-16, docs freshness: roadmap and live-agent-edits (#839) ​

The weekly docs check found the roadmap behind what merged since 2026-11-09. "Next" still listed notebook widgets (ganymede-ui#495), how the agent learns of a person's edits, and tables, charts and SQL for TypeScript notebooks, all of which shipped in the 0.11.0 releases; they move to "Done". The Tailscale entry in "Open" said the identity in rooms and the log, the apps and Tailscale SSH were next; they merged after the releases, so the entry says what is left (an embedded tailnet node) and moves below the list with an Unreleased note for the server and one for the apps. Item 4 has no "Next" now; that is Thomas's call.

live-agent-edits.md said "Nothing is built yet"; it now points to Agents over MCP and the roadmap for what was built, since status lives in the roadmap, and its "What happens today" section is dated. The kernel.json example in install.md showed cdp-kernel 0.11.0; it shows 0.12.2, the pinned and latest version.

2026-11-16, macOS CI cells skip unrelated PRs (#841) ​

The slow tail of PR CI is waiting for a free macOS runner: in the 50 slowest PR runs of 2026-11-07 to 2026-11-16 the last job to finish was a macOS one, which waited 15-40 minutes and then ran 4-16. ffi was already skipped by its own output (#457); e2e (macos-latest) and workstation (macos-latest) ran on every PR with code in it.

scripts/ci-changes.sh now prints macos. It is false when every changed file is either not code (as before) or code that neither macOS cell builds, runs or reads. When it is false the two cells run on ubuntu-latest with their steps skipped, under the same required check names, the way ffi does (a job-level BUILD flag that every step tests).

What counts as macos=true: crates/, the Cargo and toolchain files, site/install.sh, e2e/ (ganymede-cli's tests run e2e/collab and e2e/notebooks), validation/ (the workstation job's Playwright and nb-cli checks), docs/reference.md and docs/mcp-tools.md (crate tests read them), scripts/test-install.sh and scripts/test-workstation.sh, .github/workflows/ci.yml, and any path the script doesn't know. macos=false for code that only Linux jobs use: evals/, plugins/, container/, the other scripts and workflows, and the rest of .github/. Only pull requests filter on it: a push to main gives macos=true whenever it changes code, and the weekly schedule and manual runs still run everything. scripts/test-ci-changes.sh runs the real script over scratch repositories for each class of path and for each event; it runs in the install-script job.

Expected effect, from the changed-file lists of the 283 commits on main since 2026-11-02 (git log --first-parent, each classified with the script): 233 have code=true, and of those 14 (6%) have macos=false. Most code PRs touch crates/, so this frees few macOS runner slots: about one PR in 17 with code. The 14 include a Docker bump, journal plugin changes, and release workflow and script changes. A larger step, running the macOS e2e cell only on pushes to main and on the schedule, is a separate decision.

2026-11-17, chrono to jiff (#855) ​

chrono is unmaintained (RUSTSEC-2026-0543), so every crate now uses jiff. We took jiff over time for one call site: ganymede-server's notebook byline wants the local date, and time's local offset refuses to work once a program has more than one thread on Unix, so the byline would have fallen back to UTC. jiff reads the system time zone. The release on crates.io is 1.0.0, not 0.2; there Zoned is ZonedDateTime. chrono's serde feature was unused, so jiff's is off.

Each timestamp format has a test against a fixed instant, and those strings were recorded from chrono before the port. The same "now, microseconds, Z" is built once per crate (api, protocol, terminals) as there is no crate they all depend on; jiff's %6f is the fixed six-digit, truncating fraction that chrono's %.6f was.

What to know:

  • The exec header-date reader (ganymede-exec's timestamp) keeps the wall time as written and drops the offset, so ...05.1234567+02:00 comes out as 03:04:05.123456Z. jiff's own parser won't read a civil time with an offset or a fraction longer than nine digits, and is looser about separators, so the reader is small and strict, and a table test pins its edge inputs. chrono's lenient forms are not kept: a :60 leap second, a signed year, single-digit fields and stray whitespace now come back unchanged, as the table shows. Kernels don't send them.
  • chrono's default to_rfc3339 (settings files' times in the lab routes) writes +00:00 and a fraction of 0, 3, 6 or 9 digits, so that is spelled out by hand. Before 1970 jiff's sub-second part is negative, so it takes the remainder, not the field.
  • wasm: js is jiff's counterpart of chrono's wasmbind. It adds js-sys only on wasm32-unknown-unknown, so the cfg stays the same as before and wasm32-wasip1 uses its real clock.
  • A SystemTime out of jiff's range (years +-9999) is an I/O error in the conflict check and is clamped in created and last_modified.
  • The save conflict check parses last_modified with jiff, which is a little different from chrono: it refuses a fraction longer than nine digits (a 400) and accepts a few forms RFC 3339 doesn't (+0200, a [UTC] annotation, the compact 20260102T030405Z). Clients echo the server's own six-digit value, so neither comes up. The error text is jiff's now.
  • chrono is still in the tree through rmcp and schemars, and the advisory fires on any copy in the tree, so the deny.toml ignore stays, now naming rmcp. It goes when rmcp moves off chrono, and #855 stays open until then.

2026-11-17, chrono unmaintained advisory (#856) ​

The 2026-11-17 Dependabot sweep found RUSTSEC-2026-0543: chrono is unmaintained, every version, no fixed release. deny.toml fails on unmaintained advisories, so the audit job would fail on every push to main, the weekly run and any PR that changes dependencies. It is not a vulnerability, and chrono is a direct dependency of seven crates, so the port is its own issue (#855, jiff or time). Until then deny.toml ignores the advisory with a revisit date of 2027-02-17.

The same sweep moved clipboard-win from the yanked 5.4.1 to 5.4.3 (via rustyline, Windows only), a warning earlier sweeps carried over.

2026-11-17, execute runs the room's source (#843) ​

The Shortcuts and link runs in ganymede-ui hash the saved file's source, so cells the person hasn't saved don't run, and they refuse nbformat 4.4 notebooks for want of cell ids (ganymede-ui#301, #403).

The room already had what was needed: schema::insert_cell gives id-less cells a random id on load, and notebook_with_ids keeps them, so the wait reply (#566) already carried room ids for 4.4 cells. The gap was the required source_hash and no way to find the ids.

/api/kernels/{id}/execute now takes entries without a hash (the room's source runs), {"tag"} entries and "cells": "all". Selection happens in the room task, in the same room.edit as the hash checks and the output clear, so the cells can't change between choosing and running, a refused batch clears nothing, and the ids are the room's own. cell_not_found names the id or tag; for 4.4 it says the ids last only while the room is open. Those ids die with the room (60 s after the last client, with nothing running), so a client must not keep them between runs.

schema::keeps_no_ids holds the nbformat 4.4 rule that read used inline. The MCP tools already ran hashless; only their error text can change. ganymede execute, /api/notebooks/run and the host API are unchanged.

Against v0.11.0 the endpoint answers 400 source_hash is required, so an app using this falls back to hashing the saved file.

2026-11-17, Cap kernel restarts after lost (#844) ​

A kernel the platform ended (lost) restarted without a count, so one that dies at every start (a web view that runs out of memory loading) restarted without end, and clients saw only the same restarting.

  • Core::crashed counts losses apart from crashes: lost_restart_limit (3) within lost_restart_window (60 s) of the last loss. The fourth in a row leaves the kernel dead. Both are KernelManagerConfig fields only; there is no CLI flag or TOML key, since only an app that registers kernels can see a loss.
  • lost_restart_limit 0 never restarts a loss, with the same "restarts are off" texts as restart_limit 0.
  • Both counters are a RestartCount, which also replaces the crash counter's tuple. The window is exclusive: a loss exactly one window after the last counts from one.
  • Signal: status: restarting keeps "reason": "lost" (released in v0.11.0). status: dead now carries it too, when the cap is hit or when restart_limit is 0. Crash restarts and crash-limit deaths have no reason; clients must treat a missing one as a plain death. No new message type or state, so JupyterLab and nbclient see the usual statuses.
  • The cell that was running gets "The system ended the kernel, and it is being restarted." or, when capped, "...too often; it was not restarted." The kernel log says restarting it (n/limit) or leaving it dead.
  • A loss before the first kernel_info_reply is still a failed start, capped by the three launches in Core::boot. boot reads the failed attempt's exit_reason, so a kernel the platform ended on its last launch is dead with reason: lost too.
  • The test double ends a session with a process that reports lost. It needs a pid, or the dead kernel's log isn't kept for the log route.
  • Follow-up: the notebook-side notice is ganymede-ui#469.

2026-11-17, Name the kernelspec when its program is missing (#859) ​

A kernelspec whose argv[0] doesn't exist failed with spawning "/path": No such file or directory, which didn't say which kernelspec, where its kernel.json is, or what to do.

  • spawn_error in ganymede-kernel-host's process.rs builds the error when the spawn fails with NotFound: kernelspec NAME (DIR/kernel.json) runs PROGRAM, which doesn't exist; reinstall the kernel or fix argv in kernel.json. A bare name (no path separator) reads "runs prog, which isn't on PATH". A spec with an empty resource_dir (not loaded from disk) omits the parenthesised path.
  • NotFound from a spawn has other causes, so it checks before blaming the program: a missing working directory (a notebook folder moved while its kernel ran, then a restart) is named as such, and a program that exists but whose #! interpreter or loader is missing says so.
  • The io::ErrorKind::NotFound is kept, so callers that match on kind still work. The text goes out unchanged through Error::Io ("io: ..."), so the REST error body, ganymede execute and the apps show it as they showed the old one. Other spawn errors keep spawning "prog": ....
  • The text names no language or kernel: the host crates stay language-neutral.
  • Windows: NotFound still comes from the (suspended) spawn, so the same path applies.

2026-11-17, design note: several roots in one contents tree (#845) ​

ganymede-ui#465 wants the iPhone and iPad sidebar to list the app's own folder beside each folder the person picked, but the app's server is rooted at one folder (AppModel.serverRoot), and opening another folder restarts it. The note, Several folders in one server, compares named mounts under one contents tree in the server with one server per folder in the app, covering API paths, grants and their stamps, rooms and watching, moves between folders, security, and what the apps need.

It recommends mounts: each mount is a contents root as today, with its own FsContents and its own Collab (file ids, rooms, the move lock, path locks and stamps), behind a router that takes the first path segment as the mount's name; only the file watcher is shared. Mounts may not overlap: a folder at, inside or above another mount's would give one file two ids and two rooms, and the embedded server has no room locks to stop them saving over each other. A move between mounts is refused, since the two are separate roots with their own security scopes, ids and grants, not because of volumes. File ids are keyed by the mount's real folder, so a mount's grants are the same rows a server or ganymede grant on that folder uses, and the cross-root work of #827 and #831 covers the other mounts with no change. One server per folder needs no core change but makes the page handle several servers, origins and tokens wherever it touches a path. Rooting the iOS server at /, as the Mac app does, was set aside: it would serve the whole app container and put the container's path in every API path. Six questions are left for Thomas, among them mount names, adding a folder without a restart, and whether the default read = [""] should reach every mount.

2026-11-17, flaky stamping test: the root was deleted under a waiting task (#849) ​

stamping::tests::indexing_the_new_path_waits_for_the_create failed once in CI with NotFound("sub/Untitled.ipynb") right after the create had made that file. The server code was right; the test deleted the file.

HeldCreate::finish took self, so its temporary root (TempDir) was dropped, and the directory deleted, when finish returned. The index task the test had spawned was waiting on the create's claim on sub; once the create ended it went on to contents.get, which FsContents runs on a blocking thread. The index task's get usually finished before finish dropped the root; when it didn't, the file was gone.

A 100 ms delay in the test contents' get makes the test fail on every run on main (as OutsideRoot, since by then the root itself can't be resolved; same cause), and not with the fix. finish now returns the root and is #[must_use], so each caller keeps it until the task it spawned has ended.

Lesson: in a test, a helper that consumes the fixture must not end the fixture's lifetime while tasks spawned against it are still running; hand the guard back to the caller.

2026-11-17, websocket terminal test waits for the resize (#861) ​

terminals_rest_and_websocket failed on macOS CI: it sent set_size and then stty size back to back and got 24 80. The server already applies set_size (a synchronous pty ioctl in TerminalClient::resize) before it queues any later stdin, so the order is right. What differs is macOS: a stty size run right after a resize can still see the old size for a moment, as in #345 and #368 for the terminals crate's names_echo_resize_and_delete. The REST/websocket test now checks the cwd on its own, then asks stty size up to 20 times until it reports the new size, like that test, and panics with every try's output if it never does.

Two limits. #368 saw the crate test fail once even with retries, so a rare failure here is not by itself a regression. And this test can't read the pty's size the way the crate test does, so it can't tell a failed resize from a slow stty; the crate test is the place to look.

2026-11-18, the agent saves helper cells collapsed (#865) ​

Journal helper cells (#863) hold types and utility functions a reader can skip, but the agent had no way to collapse a cell: none of the MCP tools set cell metadata beyond provenance and the dropped-outputs mark.

cell_run and cell_add now take collapse: true, which saves the new cell with metadata.jupyter.source_hidden: true, the key JupyterLab's collapser writes and the apps' disclosure button reads (ganymede-ui #564). Only new cells: collapsing an existing one would need a metadata edit with the same conflict check as cell_edit, and the journal makes helpers as new cells. An older server ignores the unknown argument, so the skill can name it without a version check; the cell is just expanded there.

The published page ignores the key: it folds all code by default, and code: shown is a reader's choice to see all of it.

2026-11-18, reference jupyter_server picks its own port (#869) ​

e2e (ubuntu-latest) failed once with "server at http://127.0.0.1:41051/ did not come up in 75 s" for the reference jupyter_server. The test chose its port with free_port(), which binds port 0, reads the port and drops the listener, then started jupyter_server on it. Between the drop and jupyter_server's bind, seconds of Python startup later, any other process can take the port; the other tests run in parallel and their kernels bind five ZMQ ports each. With port_retries=0 jupyter_server then exits 1, and its output went to Stdio::null(), so the test polled a dead port for 75 s and panicked with nothing to go on. Holding the port open in the old code reproduces exactly that message after 75 s.

The test now passes --ServerApp.port=0 and reads the real port from the jpserver-*.json jupyter_server writes to the test's own runtime dir. That narrows the window but does not close it: jupyter_server 2.x binds the port, closes it, writes the info file, and only then binds again to listen. And whatever took the port in between may be listening on it, so a TCP connection proves nothing. The test therefore puts a file named after its unique root tempdir in the server's root and takes the port only once an authenticated GET /api/contents/<that file> answers 200, which no kernel socket or other test's server can do; the file is removed before the test runs. Meanwhile it watches the process: if jupyter_server exits with "already in use" in its log, whether the thief listens or only binds, the start is tried again, three times in all. Any other exit panics with the exit status and jupyter_server's log, which now goes to a file instead of Stdio::null(); no answer within CALL_SECS kills the server and panics with the log. Any jpserver-*.json in the runtime dir counts, not just the one named for the child's pid, so a GANYMEDE_E2E_JUPYTER wrapper that doesn't exec is found at start-up (stopping still signals only the wrapper, as before). free_port() had no other callers and is gone. Caveat: the failed CI run's output was discarded, so its cause can't be confirmed; this race is the cause consistent with what was seen.

2026-11-18, the published page's style in its own file, and a skill (#867) ​

Thomas asked where the published-page styling lives and whether other pages could use it. It was a 130-line Rust string constant in ganymede-nbformat's html.rs, with the palette also copied by hand into site/style.css and the docs theme.

The constant is now src/page.css, embedded with include_str!, so published pages are byte for byte the same. The journal plugin has a new page-style skill that describes the page (rules, palette, type, structure, class names) for agents writing other pages, such as a report across journals. A plugin installs only its own folder, so the skill carries a copy of the stylesheet; a test in html.rs fails when the copy differs and rewrites it with UPDATE_REFERENCE=1, the same pattern as docs/mcp-tools.md.

Both copies are eol=lf in .gitattributes: include_str! keeps line endings, so a CRLF checkout (the Windows release build) would change the page.

Left as they are: FRAME_CSS (the one-line style inside sandboxed output frames), the site's and docs theme's own copies of the palette, and custom templates for publishing, which wait for a second real use.

2026-11-18, journal notebooks stand alone (#863) ​

The journal skill told agents to put code several cells share in a module next to the notebook (a .ts file the kernel imports). The worked examples did that (quakes.ts, fremont.ts), and each journal then needed a second file to re-run, review or share; the published page showed calls into code it didn't contain.

The skill now keeps that code in helper cells near the top of the notebook, each starting with a comment that says what it defines. A person can collapse them, and the published page folds all code anyway. A module is still right for code another notebook imports too, or code too long to read as a cell, and the agent says why in a note. The journal reviewer flags a local module only one notebook imports.

The agent can't collapse a cell itself: no tool sets metadata.jupyter.source_hidden. The existing examples under examples/journals/ keep their modules; they record how those runs went.

File and crate names in the book (site/book/index.html) now link to the file, or the crate's folder, on main on GitHub: 368 links across the three repositories.

What to know:

  • The generator resolves each name against the repositories' file trees. A name links only when one file fits. It narrows the candidates by the crate the text named most recently, then the chapter's own crate, then the chapter's repository, and passes over tests, e2e suites and spikes unless nothing else matches. A few names it would get wrong are set by hand (for example ci.yml in chapter 1 is ganymede-ui's), and names the text gives for every repo ("scripts/ci-changes.sh beside it") stay plain text, as do patterns like kernel-<id>.json.
  • Links point at main, not a commit, so they show the code as it is now. A file renamed later breaks its link until the book is rebuilt. The weekly docs check rebuilds the book when its text drifts, which also refreshes the links.

2026-11-19, the book catches up with the editing work (#879) ​

Weekly docs freshness check. The book (site/book/index.html) was checked through 2026-11-18; since then cdp-kernel 0.13.0 and 0.14.0 added type errors and signature help, definition and rename over two comms, and the language service in the browser build, and ganymede-ui merged type errors, the language features, live Markdown preview, data file views, the DuckDB console and the same TypeScript help in the in-app and browser kernels (lib/kernel-typescript.ts). Chapter 10's language-service row and browser row, and two new rows in chapter 11's code map ("Editing", "Data files"), describe them from their module headers. Checked through 2026-11-19. Rebuilt with the kit (site copy and cover); every new file name links to its file on GitHub.

2026-11-19, the book on the site (#871) ​

The code architecture primer, written for Thomas as a Claude Doc, is now served at /book/ from site/book/index.html, and a short docs page at the end of "How it works" (docs/book.md) explains it and links to it.

What to know:

  • site/book/index.html is generated outside this repository: the maintainer's primer exported as Markdown, its diagrams rendered to inline SVG, in a one-chapter-at-a-time reader (routing by URL hash, no framework). The maintainer rebuilds it by hand; a small fix can go into the HTML directly, as docs/development.md says, but tell the maintainer so the next rebuild keeps it.
  • Its fonts (Source Serif 4, Schibsted Grotesk, JetBrains Mono, OFL 1.1) are self-hosted in site/book/fonts/, so the page makes no requests to Google or anyone else; the rest of the site uses system fonts.
  • It reads the docs' light/dark choice from localStorage, as the landing page does, and otherwise follows the system setting.
  • The book is public now, so it must not point at private project material; one such reference was removed from the doc before publishing.

2026-11-19, roadmap after ganymede-ui 0.12.0 and the editing work (#877) ​

Weekly docs freshness check, window 2026-11-16 to 2026-11-19.

  • ganymede-ui v0.12.0 ships the apps' tailnet sharing, tokenless tailnet remotes and Tailscale SSH, so the roadmap's "Unreleased in ganymede-ui" note on the Tailscale entry goes (#853, opened by ganymede-ui's release script).
  • Roadmap item 4 had no next step after tables, charts and SQL. The work under it since 2026-11-17 is the apps' editing experience (ganymede-ui#663); items 1 to 4 and 6 are merged on ganymede-ui's main after v0.12.1, so the line carries an "Unreleased in ganymede-ui" note, which ganymede-ui's next release lists for removal.

2026-11-19, /files streams from disk and answers Range (#875) ​

GET /files/{path} read the whole file into memory before it sent a byte. The apps' data view stops at 8 MB, but the server, in process on iOS, still read all of it. Now the file is streamed from disk in chunks of at most 64 KiB, and a single bytes Range is answered.

  • Contents has a new method, open_file, with a default that returns Ok(None). FsContents opens the file on the blocking pool under the same root, path and hidden rules as get, and takes the length from the open handle. A directory is a 400, as before. Other implementations keep the default, and the route reads them with get and slices the bytes, so both paths answer Range the same way. Stamping forwards the call.
  • Content-Type keeps FilesHandler's rule. The name decides first. Only a name that gives no type needs to know whether the file is text, which the contents manager used to learn by decoding the whole file. The route now checks UTF-8 over the file in 64 KiB chunks and carries a character cut by a chunk's end into the next one, so memory stays flat and the answer is the same. A published page's generator tag is looked for in the first 512 bytes of an HTML file only.
  • Range follows RFC 9110. One range of unit bytes (a-b, a-, -n) gets 206 with Content-Range and Content-Length. An end past the file is clamped. A start past the end, -0, or any range of an empty file gets 416 with Content-Range: bytes */<length>. Another unit, several ranges, a malformed spec, a > b and a number that doesn't fit a u64 are ignored, and the whole file is sent. A request with If-Range is ignored too, since /files sends no validator. Every answer carries Accept-Ranges: bytes.
  • A file that is cut short while it streams fails the stream, so the connection drops rather than end a body shorter than its Content-Length.
  • jupyter_server's default, file-backed contents manager serves /files through tornado's StaticFileHandler, which answers single byte ranges with 206 and 416. Only a non-file contents manager uses FilesHandler, which sends the whole file. So this brings /files in line with jupyter_server's default for ranges. It is noted as unreleased in docs/api.md.
  • The UTF-8 check runs before the first byte, for HEAD and Range too, so a Range request on a large file whose name gives no type (.jsonl, .ndjson, .arrow) reads the whole file first. Memory stays flat. Names with a known type (.csv, .json, .tsv, .parquet) skip it. Accepted to keep FilesHandler's Content-Type rule.
  • CORS allows the Range and If-Range request headers and exposes Content-Range and Accept-Ranges, so the apps' data view and other clients on an allowed origin can make and read range requests.

2026-11-19, Install page: the CLI from the Mac app (ganymede-ui#686) ​

ganymede-ui#689 bundles the ganymede CLI in the Mac app and adds Settings, General, Command Line Tool, which links it to ~/.local/bin/ganymede. docs/install.md gains "From the Mac app" under "Other ways to install", with an **Unreleased in ganymede-ui.** note that ganymede-ui's release script lists until its release ships. The app bundles only a CLI with ganymede update's app-bundle refusal (#883): a release after 0.13.0, or a build that has it. The note says so, since ganymede-ui's builds pin v0.13.0 until its GANYMEDE_REF moves. The section also says that moving the app breaks the link and that rerunning install.sh replaces it.

2026-11-19, ganymede update leaves an app bundle's binary alone (#883) ​

The Mac app is to ship the ganymede CLI inside Ganymede.app and link it into PATH from Settings (ganymede-ui#686). ganymede update renames a new binary over its own canonical path, and for the app's copy that path is inside the signed bundle: the write would break the app's code signature.

  • managed() now treats a path with a *.app component followed by Contents (case-insensitive) as the app's, and update and update --check stop with "this ganymede comes with the Ganymede app; it updates with the app". A link to it resolves there too, since the path is canonicalized first.
  • A bare .app directory name, or a *.app not followed by Contents, is not matched.
  • docs/install.md names app bundles among the binaries update refuses.

The app bundles the CLI only from a release that has this.

2026-11-20, Clean-run stamp (#898) ​

The journal view (ganymede-ui#184) shows "reproduced from a clean kernel" when a notebook was last run top to bottom on a fresh kernel, and the server kept no record of that. Now notebook_run_all writes metadata.ganymede.clean_run = {at, by, kernel} and the room removes it when a change makes the run stale.

Why a new notebook metadata key: it is the record #898 asks for. It is ordinary notebook metadata under the ganymede key the server already uses for cells, so no wire format changes: the REST and websocket API, the Y document schema and the execute body are as before, and other clients keep an unknown metadata key like any other. Unlike execution_by, it is saved with the file.

Setting. notebook_run_all stamps only a run that restarted, finished before its timeout, and in which every cell ended without a failure: the worker reports whether it stopped, which an error, a reply of aborted, a kernel that went or one that couldn't be reached all do (run_and_wait returns it beside finished). The notebook as the run left it must also be the one the run began with (no cell edited, added, deleted or moved meanwhile), and the code cells with code must have an execution_count each, from 1 and in order, each one more than the one before. A restart leaves the old counts and the execute endpoint doesn't clear them, so without that a restart from another connection during the run, or an extra run of a cell, would stamp (a probe found counts 1, 1, 2 stamped). A cell with an error output stops the stamp too. The notebook is judged as read after the run, before the outputs marked keep_outputs: false are dropped, since dropping removes an error output the check needs. The stamp is written after the drop as the run's last edit, inside one room edit (clean_run_edit) that also checks the notebook still has the cells and counts it judged, so an edit or run between the judgment and the stamp leaves none. Any other notebook_run_all removes the stamp, even one that runs no cells; one that fails before it runs (the restart fails, the room can't be opened) leaves it as it was. The fake kernel gained two cells for the tests: abort, which replies aborted with no error output, and raise_ok, which emits an error output and replies ok.

Clearing. Room keeps a second fingerprint beside the one for authorship (prints()): run_print() hashes the ordered cell ids, each cell's type and source, and a code cell's execution_count. Room::receive (a client update) and Room::edit (a server edit) compare it before and after, and only when the notebook holds a stamp, so a room without one pays nothing. On a change the room removes clean_run in a further transaction and sends it to every client, the sender included, and marks the document dirty. Outputs, execution_state, cell metadata and notebook metadata are not in the fingerprint, so writing the stamp, the outputs of the run and keep_outputs marks never clear it. A Markdown cell's source is in the fingerprint, since the issue says any later cell edit clears it. Only a change to execution_count clears it, not every run. A run from JupyterLab or the apps changes it, because those clients blank a cell's count when it starts (clearExecution in @jupyterlab/cells), so the count goes 1, null, 1. A run the server executes writes the count only when the cell finishes, so re-running the cells from the top after a restart through the execute endpoint or MCP gives the same counts and leaves the stamp.

A change through the file counts too: Room::reload and merge_disk, which every disk change goes through, including a REST PUT /api/contents, compare the fingerprint, and when it changed and the file kept the stamp the room had (its writer didn't stamp it), they remove the stamp the same way, so the room is unsaved and the file is rewritten without it. A file with a stamp of its own is kept as it is, and a read-only room (another server owns the file) never clears: its owner decides. A room that opens on a file doesn't check its stamp against its cells.

The notebook's metadata is a shared map in the room whose values are plain JSON, so schema::set_clean_run rewrites ganymede as a value (or edits it in place when a client made it a shared map) and removes the ganymede key when removing the stamp empties it.

Left open on #898: its "Run All after a restart" item. The app's own Run All goes through JupyterLab's kernel connection, which the server can't see, so a client's Run All after a restart can't set the stamp. A later change could stamp from the client, or from an execute-endpoint run of every cell after a restart. This change covers the MCP tool only; the PR refers to #898 (Refs) and leaves that item open there. No follow-up issue is filed.

2026-11-20, kernelspec resource_dir in the API (#890) ​

GET /api/kernelspecs and GET /api/kernelspecs/{name} now carry each kernelspec's directory as resource_dir, so a client can open its kernel.json or logos. It was only in ganymede kernelspec list --json.

  • KernelspecModel gets resource_dir: Option<String>, filled in spec_model from Kernelspec::resource_dir (the one place both routes build the model). It is #[serde(default, skip_serializing_if)]: absent on the wire when the path is empty (gateway specs, which Gateway::refresh builds from the remote's spec alone, and in-app kernels from RegisteredKernels), and a model without it still parses.
  • JupyterLab's @jupyterlab/services 7.6.6 (kernelspec/validate.js) checks only name, resources and spec fields and copies named properties, so the extra key is ignored.
  • It exposes a server path to the callers the API lets in (the token, its login cookie, an allowed tailnet login, anyone when auth is off), who can already start kernels.
  • validation/jupyterlab.mjs has no kernelspec assertion to extend, so only the read of validate.js above covers JupyterLab.
  • crates/ganymede-cli/tests/server.rs (the jupyter_server comparison) records each kernelspec entry's keys without resource_dir, and checks Ganymede's resource_dir is the spec's directory (it holds kernel.json).
  • Tests: kernelspecs_kernels_and_sessions_rest (list and get), embedded.rs and gateway.rs (key absent).
  • docs/api.md documents it, with an Unreleased note.

2026-11-20, mount a connected machine (#894) ​

The server forwards an allowlist of routes below /machines/{id}/ to another Ganymede server, HTTP and websocket, so an app's page, which only talks to its own origin, can use a connected machine's files, rooms and kernels (design: ganymede-ui docs/design/connected-machines.md, "How the app reaches a machine" and "Who may use the mount"). Nothing is mounted unless the app adds a machine.

Where things are:

  • ganymede-gateway/src/mount.rs, free of axum: Machines (the registry, changed at run time, shared with the app through Startup::machines), route (path rules and allowlist), sanitize_request/sanitize_query/ sanitize_response, Machine::forward (reqwest, the same TLS setup as Gateway, redirects off) and Machine::connect (tokio-tungstenite).
  • ganymede-server/src/mount/proxy.rs: the route /machines/{id}/{*rest} (merged in build_router, behind the gateway feature), the files and nbconvert policy, and the frame pump between the page's axum socket and the machine's. Without gateway, Machines is a stub whose add fails.
  • auth::mount: who may use it (below).
  • ganymede-ffi: ganymede_server_add_machine and ganymede_server_remove_machine, in ganymede.h and docs/embedding.md.

Decisions:

  • Who. auth::mount refuses (403) unless auth is on and the request a loopback peer (ConnectInfo; none known counts as not loopback; a login cookie is no exception, since any token request is given one) holds this server's token or its login cookie, then hands over to api_with(.., tailnet: false), so cookie requests get the REST API's Origin and XSRF checks and identify never returns Via::Tailnet. The MCP token is not state.token, so it identifies as nothing. strip_token keeps /machines/ like /api/ (a redirect would drop the token from a client without a cookie jar).
  • Paths. route reads the raw path after the id and decodes each segment alone, so %2f and %5c are refused instead of becoming separators, as are .. and . in any spelling, \, NUL, an empty segment, and a bad or non-UTF-8 escape (400). The raw path is forwarded. ApiPath::parse (ganymede-contents) is pub(crate) and parses one decoded path, so it can't see an encoded slash; the machine still checks the contents path itself.
  • Stripped before forwarding: Cookie, Authorization, Origin, Referer, X-XSRFToken/X-CSRFToken, Ganymede-Client, Host, hop-by-hop headers (and those Connection names), Sec-Fetch-* (a machine takes a request with Sec-Fetch-Site for a browser's, not a program's), Sec-WebSocket-*, Forwarded, X-Forwarded-*, X-Real-IP, X-Scheme, Tailscale-*, and the token and _xsrf query parameters (other pairs keep their bytes). Then Authorization: token <t> when the machine has one, and always Ganymede-Client: ganymede-mount.
  • Responses. Status and body (streamed, not rewritten) pass, with only an allowlist of headers (pass_response_header: content type, length, disposition, encoding, range, caching, X-Content-Type-Options, Location rewritten), so Set-Cookie never passes. Every response that is not a websocket upgrade gets the server's sandbox policy in place of the machine's: PAGE_CSP for nbconvert/html/..., FILES_CSP (both pub(crate) in routes.rs) for the rest, on every route; the server's own frame-ancestors is added to it as for its own /files.
  • Websockets. The machine's socket opens first, offering the page's subprotocols, so a machine that is down is a 502 at the handshake and the page's socket is accepted with the subprotocol the machine chose. Text, binary and close frames pass both ways (a close code that must not go on the wire is left off); either side ending closes the other, and removing or replacing the machine closes both ends with 1001.
  • Errors. Unreachable machine: 502 {"message": ...} without the URL or token; unknown id: 404, after auth, so ids can't be probed without a session.

Deviations from the brief, and why:

  • terminals/websocket/{name} is allowed too: that is where the server serves the terminal socket (not under api/terminals), so terminals would not work through the mount without it.
  • api/nbconvert (the list of export formats, which JupyterLab asks for before nbconvert/...) is allowed beside nbconvert.
  • The sandbox policy is on every forwarded response, not just files (coordinator's review): PAGE_CSP for nbconvert/html, FILES_CSP otherwise.
  • Response headers are an allowlist, not a denylist (same review).
  • Location headers are rewritten: an allowlisted path on the machine gets the /machines/{id} prefix, a whole URL is dropped. Redirects are not followed by the mount, since the page follows them below the prefix.
  • X-Content-Type-Options is passed from the machine, not forced.
  • With auth off the mount is refused, since there is no page session to tell from anyone else.

Dependencies and unsafe (for the review):

  • bytes is a normal dependency of ganymede-gateway: already a workspace dependency (and in the lockfile), needed for the streamed body type reqwest's chunk() returns and Machine::forward takes.
  • axum is a dev-dependency of ganymede-gateway only, for the stand-in machine in tests/mount.rs that records what it is sent.
  • tokio's time feature is added to ganymede-gateway for the response and connect timeouts.
  • Two new unsafe extern "C" functions, ganymede_server_add_machine and ganymede_server_remove_machine, follow the crate's C ABI pattern (a # Safety section on each; the server, id, url and token pointers are the caller's, read once and copied). No other unsafe.
  • No new network surface beyond the mount itself: outbound requests to machines the app adds, and the /machines/{id}/ route (auth above).

Review fixes (second round): a forwarded Location is kept only when its path passes route (a machine could otherwise send /../.. or its %2e forms out of the mount, onto this server's API, and a followed 307 repeats the method, body and credentials); the base-URL prefix is covered end to end; a machine that accepts but never answers is a 504 after 30 seconds (RESPONSE_TIMEOUT, Machines::with_response_timeout for tests); the frame pump runs each direction as its own future so a blocked send can't stop the other direction being read; OPTIONS and TRACE are 405.

Not covered, for follow-ups (tracked in #899): a published page (nb publish) served by files loses its allow-downloads (the sandbox is the plain one); kernelspecs/{name}/{file} (logos) isn't on the allowlist; a request in flight is not cancelled when its machine is removed (websockets are); Machines isn't listed by any API, so the app keeps its own list.

Tests (ganymede-gateway/tests/mount.rs, against a second in-process server, or a stand-in that records what it was sent): refusal for a tailnet identity, the MCP token, no credentials and auth off; cookie use with XSRF and Origin; the allowlist and traversal (sent raw); credentials stripped and the machine's added; Set-Cookie dropped; the sandbox policy on every route (a machine page with no policy of its own and a login cookie: every_response_gets_the_sandbox_policy_and_no_cookie); add, remove and replace at run time; a machine that is down (HTTP and websocket); two machines; removal closing sockets; either side closing; contents GET/PUT/POST/PATCH/DELETE, files with a range; the rooms socket; kernel channels with the subprotocol; the terminal socket. Unit tests in mount.rs for paths and headers; the_mount_takes_the_token_and_cookie_only_from_loopback in ganymede-server; mounts_and_unmounts_a_machine and tests/smoke.c for the C ABI.

Follow-up (after #900 and ganymede-ui#703 merged): the roadmap says the journal view is on ganymede-ui's main and connected machines are still being built, as the review of #900 asked.

2026-11-20, docs: connected machines on ganymede-ui main (#906) ​

ganymede-ui#712 puts connected machines in the apps. docs/roadmap.md item 3 now says they are on ganymede-ui's main, and docs/app.md "Kernels on another machine" says what a connected machine adds, with a link to the apps guide. Both carry **Unreleased in ganymede-ui.** notes, which ganymede-ui's release script lists for updating after its release.

2026-11-20, list open rooms (#893) ​

Added GET /api/collaboration/rooms, which lists the notebook rooms open now: path, file id, json/notebook, who is in each, and the last change. The apps' Journals and Running tabs need to know which notebooks have an agent in them and when it last wrote; until now a room could be joined but not listed. Listing open rooms has the shape.

It is a route on the existing /api/collaboration router, so it takes the same credentials (token, cookie, an allowed tailnet login) and the same origin checks as the rest, with no new rules. Each room answers a new Cmd::Info on its own command queue, so the list never opens a room or holds one open, and a room that is busy with a slow save and doesn't answer in two seconds is left out instead of holding up the list. Awareness-only rooms have no file and no answer.

Clients are the room's connections. A person's name is what attribution already uses (Room::client_name: the tailnet login, else the awareness name, else "a person"), so the same clean_name applies: control characters dropped, at most 64 characters. An agent is a Hold made for an MCP connection, which now carries the MCP client name into the room (hold_notebook's new Listing argument: Person, Agent(name) or Unlisted); the host API's holds for kernels are Unlisted and not listed, since no one is in the room. A name is listed per connection, so one person with two tabs shows twice.

last_change is new state in the room: a time next to the cell authors Room already kept, set when attribution records that a cell's source or type, or the set of cells, changed. set_author then names who made the change in it, so an agent's edit is the agent's and not "the server", but only when the server's edit just before it changed cells: an MCP edit that wrote the same source leaves last_change as it was. It doesn't count outputs, and it is in-memory like the authors, so it is null for a room that no one has edited since it opened. A room left open after its last client goes (the one-minute cleanup) stays listed with no clients.

Older servers answer 404, which the docs tell clients to read as "unsupported", not "no rooms".

2026-11-20, who runs a cell, in the room (#896) ​

A cell run through the execute endpoint or an MCP tool already showed execution_state: running in the room and went back to idle when it ended. Now it also says who runs it: a code cell's room-only key execution_by, set with the running mark and removed when the cell goes idle. strip_runtime in ganymede-documents drops it, as it drops execution_state, so it is never in a saved or returned notebook.

Why extend the room and the execute body, both compatibility targets: jupyter-server-documents has no field for who runs a cell, and the journal view (ganymede-ui #697) needs one to say who is running it. On #896 the choice was to add it here or close the issue; Thomas chose to add it (2026-11-20). Older clients are unaffected: JupyterLab and jupyter-ydoc ignore an unknown cell key, their toJSON and copy leave it out, and a request without by is answered as before.

The name comes from the entry point. RoomCmd::Enqueue carries by. The MCP tools pass the client's name (run_all and run_cells in mcp.rs). The execute endpoint uses the tailnet login, else a new body field by, else "an API client" (runner_name), each cleaned with clean_name, the same cleaning as a room client's name; one empty after cleaning yields to the next. A by that isn't a string is a 400, from the body's deserialization.

A cell can be queued more than once (named twice in a batch, or by two requests), and a run ends for a skipped or deleted cell too. So the room's RoomExec keeps, per cell id, who runs each queued run in order. A cell with nothing queued gets its name in the same room edit as the running mark; one already queued keeps the name of the run in progress. Each run that ends pops the front: the cell stays running, now by whoever is next, or goes idle and the entry is dropped.

Checked with unit tests in execute.rs (one cell, queued twice, given twice in a batch, skipped, deleted, refused batch, not saved, name sources and cleaning) and two tests in tests/http.rs that follow a cell through a websocket client of the room: the REST endpoint (body name, none, empty, tailnet login over the body, non-string 400) and MCP (notebook_run_all and cell_edit with run). Each piece was reverted once to see its test fail: the nothing-queued condition, the pop, the pop for skipped cells, the removal on idle, the entry cleanup, the strip line, the order and cleaning of the REST name, and each MCP caller's name.

2026-11-20, SQL in jupyter.sql templates on published pages (#912) ​

A cdp-kernel notebook runs DuckDB through jupyter.sql, as a tag (jupyter.sql`select …`) or as jupyter.sql.query(`…`). The published page showed each query as one TypeScript string, so a long query had no keywords, strings or comments to read by.

highlight.rs now lexes the template of a jupyter.sql tag, and the first argument of jupyter.sql.query(, as SQL: keywords (case-insensitive, a DuckDB-flavoured list including common type names) as hl-k, '…' as hl-s, numbers and true/false/null as hl-n, -- and /* */ as hl-c. A "quoted name" and a qualified name (t.date) stay plain. The backticks keep hl-s. Every other template is unchanged, sql tags included: ganymede-ui highlights any sql tag (its #708), but this change follows the issue and matches only jupyter.sql.

Each ${…} is cut out and highlighted by the TypeScript lexer, and the SQL lexer's state (code, inside a quote, inside a comment) carries across it, so '${FROM}' comes out as ' (string) ${FROM} (TypeScript) ' (string), and the string closes. Finding a template's end and an interpolation's end follows braces and skips strings, comments and nested templates, to at most 64 levels deep so a hostile cell can't overflow the stack; the plain-template path still uses the old backtick-to-backtick rule, so non-SQL templates render as before. The scan doesn't know regex literals, so a /'/g in an interpolation can leave a quote open. When it can't find the end (that, an unclosed template or interpolation, or nesting past the limit), the template falls back to the plain-string path: one hl-s span up to its backtick, or to the line's end if there is none, as before SQL highlighting, so the lines after it keep their TypeScript highlighting. The first failed scan also turns SQL highlighting off for the rest of the cell, so a hostile cell can't make each tagged backtick rescan it to the end (that would be quadratic); later jupyter.sql templates in a malformed cell render as plain strings. Every character still comes out in order.

A backslash in the template isn't an SQL escape. The kernel joins the template's cooked strings, so \' and \" reach DuckDB as the quote itself and open or close a string (DuckDB strings have no backslash escape), while \\, \` and \$ are one character that is no quote.

The lexer branches on the code's language as it already did; the host crates still know nothing of the kernel's language.

Tests in highlight.rs: sql_tag and sql_query_call (the issue's two examples, checked span by span: keywords, the '${FROM}' pieces, the ${SENSOR} interpolation outside any span, the -- comment ending at its line), sql_interpolation_is_typescript, other_templates_stay_strings (untagged, sql, db.sql, myjupyter.sql, .run(, a second argument, Python), sql_templates_keep_every_character, and span-level tests for qualified names and literals, quoted names, the end of a template past comments, braces and escaped backticks in an interpolation or string, comments across ${}, backslashes, tags that are not standalone or sit in a comment, the fallback (compared with the lines highlighted alone), the nesting limit (100 000 levels) and failed scans not repeating. Checked by hand with ganymede nb publish on a notebook with both examples, in light and dark.

2026-11-20, docs after ganymede-ui 0.14.0 (#909) ​

ganymede-ui 0.14.0 ships the journal view and connected machines. The apps' editing features (0.13.0) and the command line tool in the Mac app (0.13.1) were already out, but their notes had stayed. The four **Unreleased in ganymede-ui.** notes in docs/app.md, docs/install.md and docs/roadmap.md are gone, and the text they marked now names the release each feature shipped in. docs/app.md also says what versions connected machines need.

2026-11-20, Engine benchmark in ganymede-ffi (#892) ​

The V8 spike's benchmark runner (#646, spikes/v8-engine) now lives in ganymede-ffi behind an off-by-default v8-bench feature, so the Mac and iOS apps can run it from a Settings button. They link ganymede-ffi as a static library (GanymedeFFI.xcframework), and a second Rust static library in the app would clash with its Rust runtime symbols, so the benchmark goes in the one they already have.

  • C ABI (ganymede.h): ganymede_v8_bench_available() (1 with the feature), ganymede_v8_bench_run(config_json) and ganymede_v8_bench_free(s). All three are exported with and without the feature, so the Swift side links either way; without it a run returns {"error": "built without V8 ..."}. The config and the report are the spike's v8_spike_run ones.
  • Threads. A run happens on a std::thread of its own with an 8 MB stack, joined before the call returns: V8 sizes its stack limit from the thread it runs on, so the caller's stack doesn't matter. A Mutex serializes calls, since V8's platform and flags are process-global. V8 initializes once per process (OnceLock); the first call's jitless stays for the process, and the report shows which one ran.
  • Errors, not crashes. NULL, invalid UTF-8 and invalid JSON give an error report. A panic is caught with catch_unwind (the release profile keeps the default unwind, so it works) and gives one too. A workload whose script throws carries error in its own entry and the rest still run.
  • Builds. scripts/build-xcframework.sh builds all three slices with v8-bench and fails if a slice's library has no V8 symbol. rusty_v8 downloads a prebuilt static V8 per target, with no check of its own unless RUSTY_V8_ARCHIVE_SHA256 is set: scripts/v8-archive-sha256.sh holds the SHA-256 of each archive (aarch64 macOS, iOS device and simulator, x86_64 Linux), and the script, ffi-smoke.sh and CI set the variable from it. It fails when Cargo.lock's v8 isn't the version it pins. The iOS device library has no JIT (the simulator's keeps it), so the device report always says jitless: true. Default builds don't pull v8 in (cargo tree -p ganymede-ffi has no v8 without the feature). v8 is exact-pinned to the spike's =152.2.0.
  • Limits. repeats over 1000 is an error report. A workload that never returns holds the lock, and V8 running out of heap aborts the process; the header says so. A failed V8 initialization is remembered, so a second call reports it instead of initializing again.
  • Notices. The release's THIRD-PARTY-NOTICES for the XCFramework is generated with --features v8-bench and gets crates/ganymede-ffi/V8-NOTICES.txt appended: V8's BSD-3-Clause and the bundled C++ code's licenses. The v8 crate package carries no license files, so that list is from the components' upstream licenses, and should be rechecked when V8 is updated.
  • CI. The ffi job runs cargo clippy, cargo test with --features v8-bench and scripts/ffi-smoke.sh with the feature (FFI_FEATURES, which also expects the benchmark to be available) on both cells, so the header is checked against both builds. The macOS cell also builds the XCFramework, so it downloads V8 for three targets, and the Linux cell for one.
  • The spike stays, still not a workspace member, for the size scripts, the host runner and the bench app. It and v8_bench.rs hold the same runner by copy; spikes/v8-engine/README.md says to change both. The unit tests inline the start workload instead of including it from spikes/, whose changes don't run the crate's CI.
  • Not covered here. The Swift Settings button, and what the XCFramework grows by (V8 is tens of MB per slice); neither is measured here.

The audit job flagged paste (RUSTSEC-2024-0436, unmaintained, no vulnerability), a proc macro that only v8 brings in; deny.toml ignores it with that reason until v8 drops it or V8 leaves the apps.

2026-11-20, v8-bench review follow-ups (#892) ​

Two leftovers from the review of #895. scripts/test-ci-changes.sh gains a case for scripts/v8-archive-sha256.sh on its own: in the shared "ffi scripts" case the other files set ffi=true anyway, so reverting that file's routing failed nothing. The ganymede-ffi comments now say the benchmark is for the apps to run on a device, as docs/embedding.md does, instead of naming a Settings screen the apps haven't released.

2026-11-21, The book says the in-app engine is decided (#922) ​

The book (site/book/index.html) still called a native in-app V8 engine the open question in chapter 12 and listed it under "Open edges" in chapter 14, after the roadmap and docs/in-app-kernel.md had moved it to decided (#921, ganymede-ui#765). Chapter 12 now says the engine was tried and set aside, with the #646 device numbers, and that the spike stays in spikes/v8-engine; the chapter 14 bullet is gone, since it is no longer an edge where the code moves.

The book is generated outside this repository from the maintainer's code architecture primer (docs/development.md, "This site"), so the same two edits went into the primer too; otherwise its next rebuild would bring the old text back. A decision recorded in docs/ needs a grep of the book and the same change in the primer.

2026-11-21, Drop the V8 benchmark from ganymede-ffi (ganymede-ui#765) ​

The in-app TypeScript kernel stays on the WebKit Worker (decided 2026-11-20). V8 came into the app only so the apps could run the engine benchmark on a device (#892), and with the engine decided, it comes back out. The device runs in #646 measured jitless V8 2 to 8x slower than the Worker on both the Mac and the iPhone. It added about 7 MB to the download, kept about 166 MB of footprint after a run, and needed the extended virtual addressing entitlement. The spike stays in spikes/v8-engine/ with its workflow v8-spike.yml, for when the question comes back.

Removed:

  • ganymede-ffi: the v8-bench feature, src/v8_bench.rs, and the C functions ganymede_v8_bench_available, ganymede_v8_bench_run and ganymede_v8_bench_free, with their text in ganymede.h. The v8, serde and libc dependencies were optional and only the feature used them, so they leave Cargo.toml; Cargo.lock loses v8 and what only it pulled in. tests/smoke.c no longer calls the three functions, and scripts/ffi-smoke.sh loses its FFI_FEATURES hook, which only the benchmark used.
  • Build: scripts/build-xcframework.sh builds the three slices with their default feature sets again (the iOS ones with --no-default-features --features gateway), downloads no V8, and no longer checks each library for V8 symbols. scripts/v8-archive-sha256.sh, which pinned rusty_v8's library hashes for it, is deleted: the spike workflow doesn't use it. release.yml's cargo about runs without the feature, and crates/ganymede-ffi/V8-NOTICES.txt, V8's bundled-code licenses that were appended to the XCFramework's notices, is deleted with it.
  • CI: the ffi job's V8 step (clippy, tests and the smoke test with v8-bench) is gone, the job's comment no longer says the framework is built with V8, and ci-changes.sh and its test lose the V8 archive script's case.
  • deny.toml: the RUSTSEC-2024-0436 ignore for paste, which only v8 brought in.
  • Docs: docs/embedding.md loses the three functions and the feature; its Unreleased note says the latest release still has them. The roadmap says the in-app kernel stays on the Worker.

v0.15.0 still has the functions. ganymede-ui's Swift calls them, so ganymede-ui must drop its benchmark in the same PR that moves GANYMEDE_REF to a release without them: the app fails to link against the new XCFramework otherwise. The release itself is not part of this change.

2026-11-21, Machine mount follow-ups (#899) ​

Items 1, 3 and 4 of #899, left from the connected-machine mount (#894). Item 2 (a published page opened through the mount's files gets the files policy, without allow-downloads) is not done here and stays open on the issue.

  • Kernel logos. route now allows kernelspecs/{name}/{file}, exactly that deep, as Kind::Other, with the same sandbox policy as files. The forwarded api/kernelspecs still lists the machine's own paths in resources, so a page shows a machine's logos only if it rebases them below /machines/{id}/ (docs/embedding.md says how). The apps don't show kernel logos yet; that is a ganymede-ui issue. kernelspecs, kernelspecs/a and kernelspecs/a/b/c are still refused. The machine's own /kernelspecs/{name}/{*file} takes any depth; logos are flat, so the mount does not forward more.
  • Listing machines. ganymede_server_machines returns the mounted ids, sorted, as a JSON array string the caller frees with ganymede_string_free, so the app need not keep its own list. NULL for a NULL server; [] for no machines, and in a build without the gateway feature. Tested in mounts_and_unmounts_a_machine and in tests/smoke.c.
  • Removing a machine ends its requests. Until now only websockets closed. Machine::forward now races the request against the machine's closed signal (the one Upstream waits on): a machine removed or replaced before or while it answers is a 502, machine {id} was removed, at once, not after the 30 second response timeout. The Forwarded body keeps its own receiver, and into_stream ends with an error when the machine is closed between chunks (checked first, so an already removed machine ends it at once). The response is then dropped, which closes the connection to the machine. Tests, in crates/ganymede-gateway/tests/mount.rs, use a response timeout of an hour so only the removal can end them: removing_a_machine_ends_a_request_it_has_not_answered, replacing_a_machine_ends_a_request_it_has_not_answered, a_request_that_arrives_at_a_removed_machine_is_not_sent, removing_a_machine_ends_a_response_that_is_streaming and a_body_of_a_removed_machine_ends_at_once.

Finding: Machine::close used watch::Sender::send, which keeps the old value when nothing is subscribed. With no websocket open, a removal therefore never set closed, and a request that reached the machine after it (a handle taken before the removal) would not have seen it. It now uses send_replace. a_request_that_arrives_at_a_removed_machine_is_not_sent found it.

2026-11-21, Write observer: test that release may call set (#918) ​

WriteObserver::set drops the function it replaces after letting go of its lock, so an app's release callback, which runs from that drop, may call ganymede_server_set_write_observer itself (#917). No test held this: dropping under the lock passed every test. A unit test now replaces a function whose drop calls set, on a thread with a timeout, so a deadlock fails the test instead of hanging it. Another checks that the C callback is skipped for a path that isn't UTF-8 or has a NUL, as the docs say.

2026-11-21, Write observer for the app (#916) ​

The Mac and iPad apps keep answers per notebook file (ganymede-ui#584) and must forget them when the file is replaced outside Ganymede, but not when the server writes it. The app can stamp a file itself, but most writes on its server come from the server with no window involved: a room's autosave, a run saving its outputs, MCP. So the server now tells the app.

ganymede_server::write_observer::WriteObserver holds an optional function, kept by the app and passed in Startup::write_observer as the machines are, and settable while the server runs. Stamping::rewrite (every save, a room's included, and a checkpoint restore) and a copy to a named destination in Stamping::copy (a new file or an existing one) take the file's stamp inside the path's turn before the write and again as soon as it succeeds, and call the function once, after the restamps, with the path and both stamps, all inside the detached block, so a write whose caller went away is still reported. No stamp is read while no function is set. ganymede_server_set_write_observer in ganymede-ffi is the C side, with the callback's context passed back as a raw pointer the app guarantees usable from any thread. Not a REST endpoint: that API is a Jupyter compatibility target.

Reported: any successful save of a regular file (a new one's included), a checkpoint restore, and a copy to a named destination path, with the canonical absolute path (links resolved, so a root under / and the app's /private/... agree). Not reported: a failed write, a copy into a directory, a new untitled file, a rename, a delete, a directory save, and any write when the contents aren't a local directory. Renames by any client are not reported, so an app that keys answers by path loses them on a rename it did not make itself, which fails safe. The function is called with the path's turn held (the next write or a rename of that path waits; keep it quick), not the observer's own lock, so it may call set. A write that began while no function was set is not reported even if one is set before it ends, as its "before" was never taken. A path with a NUL byte is not passed to the callback. A new ganymede_contents::api_file_path gives the on-disk path the stamps use.

The "after" stamp is taken as soon as the write succeeds, before the restamps. The C function takes a release callback, as the kernel callbacks do, which runs from a Drop on the wrapper of the app's function once the last clone is gone (after calls under way, when it is replaced, removed, or the server stops), so the app frees ctx there. A path that is not UTF-8 is skipped like one with a NUL.

2026-11-22, Recorded steps keep their commands in code blocks (#930) ​

Thomas opened a journal on the iPad and saw a recorded step as four lines of H1 text. The agent had added the step with cell_add(mode: "recorded") itself and written the shell session bare: its # comment lines are Markdown headings. The journal hook never had this problem, because recordedSource fences the command (```sh) and the output (```text); only steps an agent writes by hand did. The apps render the Markdown correctly, so the fix belongs where the source is written.

Two parts. cell_add's descriptions, the journal prompt and the journal skill now say a recorded step's commands and output go in fenced code blocks. And the server fences a recorded Markdown source that has no fenced block of its own in ```text, with a fence longer than any backtick run inside it, so a step written bare reads as the session it was. A source with any fence (backticks or tildes, at most three spaces in, as CommonMark allows) is kept as written, as are notes, code and raw cells, and an empty source. cell_edit fences a recorded Markdown step the same way, since the journal prompt tells agents to fix a cell in place rather than add another. The server doesn't try to tell prose from commands: a bare step that was all prose becomes a text block, which still reads, where a guess could turn a comment into a heading again.

The check for a fence is simple on purpose. A fence inside a list item or a blockquote (- ```sh, > ```sh) isn't seen, so such a step is wrapped whole and shows its Markdown as text; and a bare session whose output happens to print a line starting with three backticks counts as fenced and is kept bare. Both still read, and neither is what agents write when they follow the instructions.

2026-11-22, url 2.5.9 for RUSTSEC-2026-0592 (#928) ​

RUSTSEC-2026-0592 came out on 2026-11-22: Url::origin() in url 2.5.8 and earlier recursed once per nested blob: prefix, so a 50 KB URL overflowed a thread's stack and aborted the process. Ganymede had 2.5.8 through reqwest, sentry and tower-http. Its own code never calls Url::origin(), but the bump is lockfile-only, so it was cheaper to take than to prove every caller safe.

The advisory showed up first as a red audit job on Dependabot's cargo group PR (#927), whose changes had nothing to do with url. The audit job runs only when dependency files change, so a new advisory blocks the next dependency PR rather than main. Taking the fix in its own PR lets #927 rebase and be judged on its own changes.

cargo update -p url on its own reported "Locking 0 packages" with a stale local index; --precise 2.5.9 fetched it.

2026-11-23, the book after connected machines (#932) ​

The code primer at site/book/ was checked through 2026-11-19. This brings it to the changes merged through 2026-11-22:

  • Chapter 5: a row for mount.rs, the connected-machine mount under /machines/{id}/, with the forwarding in ganymede-gateway.
  • Chapter 6: GET /api/collaboration/rooms, execution_by while a cell runs, and the clean_run stamp.
  • Chapter 9: the machine functions and the write observer in ganymede.h, now about 160 lines.
  • Chapter 10: jupyter.version and jupyter.runtime.
  • Chapters 11 and 12: ganymede-ui's journal view, places and connected machines, and the CLI the Mac app bundles.

The cover screenshot is rebuilt with the new date.

2026-11-24, Skills over MCP (#936) ​

ganymede mcp now serves the journal plugin's two skills, journal and page-style, over the MCP Skills extension (io.modelcontextprotocol/skills, SEP-2640), so Claude Code can load them from the server without the plugin.

  • The catalog. ganymede-server/src/mcp/skills.rs embeds the files of plugins/ganymede-journal/skills with include_str!: one source, no copies, nothing read at run time. The server declares the extension in get_info, answers skills/list and skills/get (an unknown URI is -32602), and serves each skill://<name>/<file> through resources/read. The manifest has each file's sha256 digest and size. The frontmatter is parsed from SKILL.md as plain key: value lines; a test fails on anything richer, and another fails when the plugin has a file the catalog doesn't.
  • What Claude Code does. 2.1.331 opens a stdio server with server/discover (protocol 2026-07-28), sends no initialize, and puts who it is in _meta on every request. It sends skills/list and skills/get only on such a connection, and only to a server that declares the extension. Until now ganymede mcp forwarded server/discover without the headers a 2026-07-28 request needs, the server answered -32020, and Claude Code fell back to initialize, so it never asked for skills.
  • The proxy. server/discover goes to the server with MCP-Protocol-Version and Mcp-Method, with no session, and its answer is written before the next line is read. The first other message that carries the 2026-07-28 _meta makes the proxy start a session with an initialize built from that _meta (client info and capabilities), kept as the session's init, so a session the server ends is replaced as before, and the folder of a server rooted above the agent's goes in it. The message itself goes in that session with the three handshake keys taken out of its _meta. Clients that send initialize are unchanged.
  • Why not forward the 2026-07-28 messages as they are. The server (rmcp) serves any request that names its protocol version without a session, whatever Mcp-Session-Id it carries. A notebook opened by one call is then not open for the next, the client's name is not the one in provenance, and the agent's folder is lost. Taking the keys out puts the message in the session, with state; the answers have the 2025-11-25 shape, and Claude Code fills in the resultType, ttlMs and cacheScope a 2026-07-28 result has (it logs that it did).
  • Opt-out. GANYMEDE_MCP_SKILLS=off makes the proxy answer server/discover itself with -32601, so Claude Code falls back to initialize; its answer is relayed without the extension, and skills/list, skills/get and skill:// reads are refused. The plugin sets it in its .mcp.json, since it ships the skills itself and they would be listed twice; older ganymede releases ignore the variable. ganymede mcp call and watch stay on initialize.
  • Follow-up (#937). A client that posts 2026-07-28 requests straight to ganymede serve --mcp (no ganymede mcp) is served statelessly: each request gets a fresh connection, so path-less tool calls fail and the client's folder isn't used. Fixing it means holding a connection's state across such requests on the server.

2026-11-25, Marker for ganymede-ui's new browser header (#949) ​

ganymede-ui#801 replaces the browser toolbar with a status line under the title, Run Cell with a run menu, Interrupt, Share and a ⋯ menu. The Toolbar line in docs/app.md still describes the released app, so it gets an **Unreleased in ganymede-ui.** note describing main's toolbar; ganymede-ui's release script opens the issue to update it. An HTML-comment marker fails check-unreleased in Markdown (only site/index.html allows one), so it is a visible note.

2026-11-25, clean-run stamp fingerprint (#944) ​

A clean_run stamp described the notebook only while a room was watching it: a file edited while no room was open kept a stamp that no longer held. The stamp now carries a fingerprint of the cells, and a room checks it whenever it takes content from the file. Decision (Thomas, on the issue): the fingerprint covers cell types, sources and order, not outputs.

What changed:

  • schema::source_fingerprint returns v1: and eight hex digits of murmur2 (seed 0) over {type_len}:{cell_type}{source_len}:{source}\n for each cell in order. Lengths are in bytes so no two layouts give the same bytes. A cell the crate can't type (Cell::Unknown) counts with its raw source, a string or an array of strings joined. No new dependency.
  • schema::clean_run_status and schema::CleanRun tell what a stamp says about the cells: None, Current, Stale (no fingerprint, one that isn't v<digits>:, or a v1: one that doesn't match) and Unverified (a real v<digits>: prefix of a version other than 1, which is left alone, never reported as current; the docs tell readers to treat it as not current). Nothing else reads them yet.
  • The notebook_run_all description now says the stamp carries a fingerprint of the cells (docs/mcp-tools.md regenerated).
  • clean_run_edit in mcp.rs writes fingerprint into the stamp from the notebook it already checks.
  • Opening never writes the file. Room::forget_unfit_clean_run removes a stale stamp from the room only (and resets the room's change flag, so a client's sync step 2 afterwards doesn't make it dirty): no last_edit, the saved generation and the baseline agree it is clean, so there is no autosave and state.dirty stays false. The file loses the stamp with the next real save. run_room calls it once the file is open, and a new relock calls it when take_lock turns a read-only room writable (the tick and Moved paths). It does nothing in a read-only room. The recovery copies (#960) and the save state run_room sets up are untouched.
  • Room::reload and Room::merge_disk keep making the room unsaved when they remove a stamp (private clear_unfit_clean_run), so the file is rewritten without it. The in-room run_print invalidation is unchanged: it also covers execution counts.
  • docs/rooms.md describes the field, the exact byte layout (so a reader outside a room can compute it), the opening and reload behaviour and the badge's wording, with the unreleased note before the field. It says a GET of the file returns the stamp unchecked until the room next saves, and that clearing outputs alone keeps the stamp (a clear that also blanks counts removes it in an open room).

Post-merge nits (main moved to 0.18.0 with #959 and #960):

  • docs/rooms.md: the ran_source_hash entry points record the hash "on every cell the kernel takes up", as the_hash_is_recorded_only_once_the_kernel_sent_execute_input has it.
  • recovery.rs: the module doc and Store::claimed say that a copy under a hidden directory is not seen unless the copy's saved path reaches the file through a symlink inside the root, as docs/rooms.md does. a_copy_saved_under_a_hidden_dir_of_the_root_is_not_seen covers the hidden check on the saved path.

Tests:

  • a_room_opened_on_a_file_changed_since_the_stamp_drops_the_stamp: a changed source, order or cell type in the file while no room is open; the stamp leaves the room, the room stays clean (state.dirty false), and a later edit's notebook has no stamp.
  • a_forgotten_stamp_is_not_in_the_baseline: a read-only room that restores its baseline after a refused edit doesn't bring the stamp back.
  • an_unverified_stamp_is_dropped_on_open_only_without_a_fingerprint: no fingerprint, a wrong v1:, an empty string and junk (abc, v:, vx:, 1:) go; v2: and v10: stay.
  • a_matching_stamp_survives_open_and_outputs_are_not_covered: outputs and counts changed in the file keep the stamp.
  • clean_run_status_tells_stale_from_current.
  • a_stamp_in_a_reloaded_or_merged_file_is_kept_only_when_it_fits_the_file: reload and merge_disk, a fitting and a wrong fingerprint.
  • a_client_joining_after_the_stamp_was_forgotten_leaves_the_room_saved (the change flag) and forgetting_a_stamp_keeps_a_room_with_unsaved_edits_unsaved (the clean guard).
  • a_room_whose_lock_retry_succeeds_forgets_an_unfit_stamp_without_saving and a_moved_room_that_turns_writable_forgets_an_unfit_stamp_without_saving (collab, run_room with another server holding the lock; each fails with its relock call site back to take_lock).
  • a_read_only_room_leaves_a_stamp_that_does_not_fit: also checks it when the room turns writable.
  • the_source_fingerprint_is_stable (a hard-coded value, checked against a separate Python implementation), the_source_fingerprint_has_no_concatenation_collisions (one cell a\ncodeb against the cells a and b, which only the length prefixes separate) and the_source_fingerprint_reads_an_unknown_cells_source.
  • opening_a_file_with_an_unfit_stamp_does_not_write_it (collab, with a client syncing): the room's stamp is gone, state.dirty is false, the file is unchanged well past the autosave delay, and a real edit saves it without the stamp.
  • a_room_that_turns_writable_forgets_a_stamp_that_does_not_fit (collab, through relock).
  • opening_a_notebook_drops_a_clean_run_stamp_that_does_not_fit_its_cells (server, through notebook_open): after an edit saves, the file has no stamp; a matching one stays.
  • mcp_run_all_stamps_a_clean_run_and_an_edit_clears_it now checks the stamp's fingerprint. The run-all tests that seed an old stamp give it the fingerprint of their cells, so it survives opening for the run to remove.
  • The existing reload and merge tests give the stamps they expect to keep a matching fingerprint.

2026-11-25, Note that the apps fetch DuckDB on first use (#951) ​

ganymede-ui#794 stops fetching DuckDB's .wasm and worker when the page first goes online: they load the first time a SQL cell, the DuckDB console or a Parquet view needs them, or from Settings > Offline SQL in a browser. docs/data-output.md gets an **Unreleased in ganymede-ui.** note saying so; ganymede-ui's release lists it, and the text around it is updated then.

2026-11-25, Marker for the browser's new first open (#953) ​

ganymede-ui#815 replaces the connect sheet on a first open in the browser with a start screen: Try a Notebook, Open a Notebook… and Connect to a Server…. docs/app.md's "With no server" section gets an **Unreleased in ganymede-ui.** note saying so, which ganymede-ui's release script lists for a follow-up. The book's "Which backend" line (site/book/index.html, chapter 11, "…then the connect sheet") isn't scanned for markers, so #953 stays open to change it to "then the start screen" once ganymede-ui releases it.

2026-11-25, guarded runs are rechecked at dispatch (#943) ​

A request that named a cell with a source_hash was checked when it arrived, but the batch can wait behind other runs, and the worker then ran whatever the cell held. A cell edited in between ran a source nobody had checked. Thomas decided: such a cell is rejected at dispatch, not run from a snapshot.

What changed, in execute.rs unless said:

  • enqueue returns each queued id with the hash it was checked against (None for a tag, "all" or an id with no hash), and the batch carries it to the worker.
  • Run::cell compares the hash of the cell it got from the room with the guard. On a difference it doesn't run the cell: Done carries changed, the batch stops as after a failure, and the cell is reported.
  • The room sets execution_skipped = "Cell changed while queued" on that cell when its last queued run ends. It is room-only: strip_runtime in ganymede-documents removes it with execution_by, and enqueue removes it when the cell is queued again. The room removes it when a client runs the cell, and when the cell's source or type is edited by a client, the server or the file. Cells skipped behind it don't get it.
  • The finished channel carries a BatchEnd (all_ok, changed) instead of a bool. wait adds skipped (source_changed_while_queued) when changed isn't empty; run_and_wait still reports all_ok.
  • A cell that ran gets metadata.ganymede.ran_source_hash, the hash of the source Run::cell ran (schema::set_ran_source_hash), saved with the notebook. A reader can tell outputs are stale when it differs from the hash of the current source. Other cell metadata and other ganymede keys are kept; cell metadata isn't in the room's run fingerprint, so the clean_run stamp stays.
  • Room runs, a notebooks run and the host API write that key for every cell they run (ganymede-exec's set_ran_source_hash, over a source_hash moved to ganymede-nbformat and re-exported), and a run's saved copy removes it from cells the run never started. The executor records it only behind its new record_source_hash option, which those entry points turn on; off, the default, it removes the key from the cells it runs instead — keeping the rest of the ganymede object and dropping an object the removal emptied, and leaving one that was already empty — so ganymede execute matches jupyter execute except that it removes a stale ran_source_hash. The skip note is room-only, so the executor never reads or writes it. Tools outside Ganymede (nbconvert, papermill, VS Code, a plain PUT) keep whatever key they find, so the key says which source ran only when Ganymede did the last run. JupyterLab and the apps run cells themselves, so an old hash would call their new outputs stale. The room (room.rs) now removes it when a client's update changes a code cell's execution_count or outputs: the observer of cells collects the ids (rerun_cell), and Room::clear_run_notes removes the key and execution_skipped in the same step. Reading the observed change, not comparing outputs before and after, keeps the cost of a keystroke independent of the outputs' size. The server's own edits and changes from the file don't remove it. Only the key goes; an emptied ganymede stays (schema::clear_ran_source_hash).
  • enqueue clears a cell's outputs when it is queued, so it clears ran_source_hash there too (schema::clear_ran_source_hash), as does the MCP tools' drop of outputs: a cell skipped after a failure or a change has no outputs and no hash. A run that ends writes the hash only when the kernel sent execute_input (the count is known) and the cell is still a code cell.
  • RoomExec keeps a "changed" flag on each queued run of a cell (with the batch it is in), not per cell id. A change marks the cell's next run in the same batch, which the stopped batch skips; the note is set only when the cell's last queued run ended with the flag. A cell queued by two requests, skipped for a change in the first and for a failure in the second, has no note. A guarded cell that is deleted or no longer code at its turn ends the batch as changed (not_code_end).
  • It is cell metadata, not per-output metadata, because stream and error outputs have no metadata.
  • docs/rooms.md and docs/api.md: a new section each, with the Unreleased note. docs/clients.md: what nb-cli sees of a skipped cell.

Unguarded requests and the MCP tools are unchanged: they run the source the cell has at its turn.

Tests (execute.rs unit tests, ganymede-documents/tests/rooms.rs, and tests/http.rs with the kernel held on a sleep cell that is interrupted to release the batch):

  • a_guard_travels_with_an_id_and_only_an_id: ids with a hash come back guarded, tags and "all" don't.
  • a_cell_that_changed_while_queued_shows_why_it_did_not_run, a_cell_queued_again_shows_no_note_while_its_next_run_waits (the worker's real sequence for [a#H, a#H]), the_skip_note_is_not_saved_or_listed: the room-only note, set only for a change, cleared on the next queue, never in the notebook.
  • a_cell_that_ran_records_the_hash_of_its_source, the_hash_keeps_the_other_keys_of_the_cells_ganymede_metadata (plain and shared-map ganymede), recording_the_hash_keeps_the_clean_run_stamp.
  • execute_guarded_cell_changed_while_queued_is_not_run: the edited cell doesn't run, the cell after it doesn't run, wait lists it, the room shows the note on it only, and queuing it again clears the note.
  • execute_unguarded_cell_changed_while_queued_runs_the_new_source.
  • execute_records_the_hash_of_the_source_that_ran: a cell edited while it runs records the hash of the source that ran, keeps its other ganymede keys, and the hash is saved to the file.
  • a_client_run_removes_the_hash_and_a_room_run_records_it_again: a room run, a client's update as JupyterLab makes it, and another room run.
  • a_client_run_removes_the_ran_source_hash_and_the_skip_note: by the count, a stream that grows, outputs emptied and replaced; other keys and cells are kept, and every client is sent the removal.
  • a_client_change_that_is_no_run_keeps_the_ran_source_hash: the count the cell has, a cell deleted with its outputs, a cell that comes back.
  • the_servers_own_edit_of_outputs_keeps_the_ran_source_hash, a_file_change_keeps_the_ran_source_hash_the_file_has.
  • an_edited_source_removes_the_skip_note_and_keeps_the_hash: by a client, the server and the file (which leaves the room clean), and a file change into a dirty room (a merge_disk, which leaves it dirty).
  • a_note_removed_by_the_room_is_not_content_to_save: the room's own removal of a skip note doesn't count as a change to save.
  • In ganymede-exec, a_cell_that_ran_records_the_hash_of_the_source_it_ran covers the executor's side with record_source_hash on, over source_hash moved to ganymede-nbformat (with its murmur2 test) and re-exported from ganymede-documents; a_run_that_records_no_hash_removes_the_notes_a_cell_had covers the default-off path. In tests/http.rs, notebooks_run_saves_a_copy_under_runs checks a run's copy: the hash on a cell that ran, and none on one the run never started.
  • a_cell_cleared_without_running_loses_its_hash, a_cell_that_stopped_being_code_gets_no_hash, a_later_run_that_ran_leaves_no_skip_note, a_cell_that_is_gone_or_not_code_ends_a_guarded_run_as_changed, a_cell_skipped_for_a_change_then_for_a_failure_shows_no_change_note, the_ran_hash_is_recorded_only_when_the_kernel_took_the_source.
  • mcp_clearing_outputs_clears_the_ran_source_hash (the MCP drop clears the key in the room and the saved file) and execute_guarded_cell_deleted_while_queued_stops_the_batch.
  • In ganymede-exec, the hash is set when execute_input arrives, as the room does, and a stale one is removed before the run: the_hash_is_recorded_only_once_the_kernel_sent_execute_input.
  • In ganymede-exec, a ganymede value that isn't an object is replaced, and an already empty one stays.
  • the_ran_source_hash_is_set_and_removed_in_plain_and_shared_metadata.

2026-11-25, A failed notebook_open no longer sets the current notebook (#938) ​

On a server with no kernelspecs, notebook_open on a new path created the file, made it the current notebook, then failed to start a kernel. The agent saw an error and thought nothing was open, while its next path-less cell_add landed in that notebook.

notebook_open now behaves as follows:

  • It sets the current notebook only after the kernel has started and the notebook has been read. The kernel-then-read order is unchanged; what changed is that current is set after both, where it used to be set before the kernel start.
  • Any failure clears the current notebook, including a path that doesn't end in .ipynb, so an earlier notebook doesn't stay current and receive the next path-less call. The agent passes path.
  • Before it writes anything it checks there is a kernel to start: the one named, the folder default, or the server default. With none, or with a named kernel or a server default that isn't installed, it fails with "nothing was created". --no-execute still creates without a kernel; read-only refuses to create.
  • If the kernel then fails to start, or the read fails, for a notebook the call just created, the file stays (someone may have saved to it by now; an earlier version deleted it and could lose that work) and the error says so: "<path> was created and stays, but no notebook is current, so pass path".
  • If it fails for an existing notebook, that stays as it was, and the error ends "no notebook is current, so pass path".
  • A failure leaves this connection holding no room that it didn't hold before the call. (A read that fails may leave an unused read token for the path; the next read reuses it.)

Left for #941: when the kernel fails to start after the notebook was created, the file stays rather than being removed; and a read that fails after the kernel started leaves that kernel's session running, as it did before.

2026-11-25, A failed notebook_open removes what it made (#941) ​

#938 made a failed notebook_open leave no current notebook, but a notebook the call had created stayed, and a kernel session it had started kept running when the read after the start failed. See the #938 entry, whose "Left for #941" this closes.

notebook_open now undoes what the call itself made when the kernel start or the read fails:

  • A session this call started is deleted, which shuts its kernel down. A session it joined (one running before the call, or one another client started while it waited) is left alone. A failed delete is added to the error, except "not found" (someone else deleted it, and its kernel went with it). A session someone joins after this call started it is shut down with it. This holds for an existing notebook too; the file is never touched then.
  • A notebook this call created is deleted, but only if its stamp (size, modification time, inode) is still the one read right after the create. Collab::delete_if_unchanged re-reads the stamp and deletes under the same move lock and detached wrapper as Collab::delete, so ids and rooms follow. If the file changed (someone saved), the stamp can't be read (the contents aren't a local folder), or the delete fails, the file stays and the error says which: "<path> was created and stays (...), but no notebook is current, so pass path". When deleted: "...; the notebook was removed, no notebook is current, so pass path". Not "nothing was created": create may have made folders, which stay (deleting a folder could take what someone put there), and the message then says "the notebook was removed (the folders it made stay)".
  • The stamp check matters because with delete_to_trash off a delete is permanent, and #938 kept the file because someone may have saved to it.
  • It also stays when a room on the file has a client ("someone has it open"): a room saves 1 s after an edit, and deleting the file closes the room without saving, so a person's edit could be lost. This connection's own hold is released first. The room is looked up by the path's file id and asked directly; one that doesn't answer within two seconds (a slow save may hold unsaved edits) counts as in use, so the file stays. So does the session the call started, which is left running ("someone has it open; it and its kernel stay"). The file is decided first, under the move lock, and the session is shut down only if the result isn't "in use", so a client joining between a separate check and the delete can't leave the file kept and its kernel gone.
  • A notebook this call created but whose session it joined (another client made one for the new path while it waited) is kept: "someone has a session on it". That kernel runs code against the file.
  • The session id comes from SessionManager::create_reporting, which says whether the call made the session, so a session another client created while this call waited on the path lock is not taken for its own.

Known window that remains: the stamp is read after create returns, and the checks and the delete run under the move lock, which keeps out renames, deletes and new rooms but not a write to the file that doesn't go through a room (another program, or a REST save of the file). A write landing from the save in create until the delete is taken for the call's own (before the stamp read) or deleted with the file (after it). Collab::delete and delete_if_unchanged share one helper.

Tests: a kernel that won't start (file and session gone), a read failure of a new notebook (the test provisioner overwrites the file after launch, keeping its stamp), the same with a changed stamp (file stays, message says why), a read failure of an existing notebook (session gone, file kept), one with a joined session (still running), a delete that fails (the file stays, "deleting it failed"), and collab unit tests for a changed stamp, no local root, a client in the room, a client in another notebook's room (no effect), and the ids going with the file. A gated test has another client start the session while the open waits on the path lock (it fails if the open takes that session for its own); an open of a nested path (the folders stay and the message says so); contents without a local root; a client from another connection holding the room when the kernel won't start; a notebook created by the call whose session another client made meanwhile (kept, with the session); and a room that doesn't answer (a unit test with paused time). Not tested: a notebook someone has open whose kernel started and whose read then failed (it can't be set up, since a room won't open on a file that isn't a notebook), and a failing session delete other than "not found". No test-only seam in the server was needed.

2026-11-25, A failed open keeps the kernel of a file it keeps (#947) ​

Follow-up to #941 (PR #946), which merged before its reviewer's two Lows were fixed. The #941 entry describes the final design; this change:

  • failed_open now decides about the file first, under the move lock, and shuts down a session the call started only when the file wasn't kept because someone has it open. Before, it checked the room outside the lock, so a client joining in between kept the file but lost its kernel.
  • A notebook the call created is kept, not deleted, when the call joined a session on its path ("someone has a session on it"): one another client started meanwhile, or one left from an earlier file at that path, since deleting a file doesn't end its session. A client that uses contents and sessions but no room (a REST-only client) would otherwise keep a session on a file that is gone.

Tests (each fails without the change):

  • mcp_failed_read_keeps_a_created_notebook_with_a_session_someone_started: a gated provisioner; the file is kept for a joined session.
  • mcp_failed_read_keeps_the_session_of_a_notebook_someone_has_open: the call starts the session, another connection holds the room, and the read then fails because the contents' get does (a test wrapper, switched on after the room opened); the file and the session stay.

2026-11-25, room recovery copies and save state (#945) ​

A room could lose edits in two ways. An empty room closed after ten failed saves in a row (or when its file was gone, or when another server owned the file) with its edits only in the room. And a merge with the disk let the disk win a cell both had changed, leaving the room's version in the log line and nowhere else. The app half (showing, restoring and discarding these copies) is ganymede-ui#831, not here.

What changed:

  • crates/ganymede-server/src/recovery.rs (new): write keeps the room's notebook, as a save would write it, as <id>.ipynb with a <id>.json (path, at, reason, detail, cells, notebook), through a temporary file and a rename, notebook first. The id is 16 hex digits of microseconds, -, 8 random hex digits, so it sorts by time. valid_id accepts only that shape and every function takes an id through it, so an id is never a path. At most 20 copies of a path and 200 MB in a root's dir; a write over a limit deletes the oldest first and logs each, never the one just written. list, read, discard.
  • Each root has its own dir in the recovery dir, the hex SHA-256 of its canonical path (recovery::Store), and that is where a server writes. Reads match by the copy's file, not its dir: list, read and discard scan every root dir under recovery/ and keep the copies whose file is inside this server's canonical root, mapped to that root's relative path. Every server of a person shares the data dir and path is relative to a root, so this is what keeps one project's copies from being offered in another — and what makes a copy kept by ganymede mcp rooted at a project visible to the Mac app's server rooted at /, which shares the data dir. Writes and the bounds stay per root dir. A store with no root (tests, contents that are not a local dir) sees its own dir only, as before. The meta also has the file's absolute path (file), which the routes leave out.
  • Ids strictly increase within a process: a clock that stands still or goes back gives the next microsecond.
  • Collab::with_recovery_dir; serve.rs sets it to recovery under lab::data_dir() (what ganymede info prints as data_dir: persistent, and not beside the notebook) whenever there is a data dir, embedding apps included. On iPad and iPhone dirs reads $HOME, which iOS sets to the app container, so copies go under its Library/Application Support/ganymede; #957 tracks checking that on a device. Without a data dir (tests), or when the dir can't be made (a warning is logged), rooms behave as before. Only recovery is made at start; a root's dir is made by its first copy.
  • run_room: the three ways an empty room closes holding edits (file gone, saves keep failing, read-only with edits) write a copy first (kept_before_closing). If that fails the error is logged and the room stays, trying again on the next cleanup (empty_since reset). A copy made for a generation of the room's content isn't made twice if a client arrives during the close. Cmd::Removed (the file's id is gone) writes a file_gone copy too.
  • reload takes the room's notebook before merge_disk when the room is dirty and a recovery dir is set; when the merge reports conflicts it writes that snapshot as a merge_conflict copy (detail the conflicting parts, cells the ids of "cell <id>" parts).
  • Room state map, room-only (Room::set_save_state, set_recovery, state_value in ganymede-documents): save (saved or failed), save_error, recovery ({"id","at","reason","cells"}). save_room is now a wrapper over try_save that sets them from the result and sends the change to clients like any state change. A reload that leaves the room clean sets saved. A room opening on a path with copies names the newest. saving is not set: the save is one awaited call and clients would see it for an instant; the app shows "Saving" itself (ui#808). A read-only room with edits says failed, "another server owns the file".
  • Three routes on the /api/collaboration router, same auth layer: GET /recovery?path=, GET /recovery/{id}, DELETE /recovery/{id}. A discard sends every open notebook room a command that, if state.recovery names that id, names the next newest copy of the path, or none. So does each copy that prune deletes. No restore route: the client takes content and writes it through the contents API or the room.
  • collab.rs now uses tokio::time::Instant, so a test can pause the clock; it is the same clock outside tests.

Network surface, justified: the apps need to show Save needs attention with copy and restore, and a copy is files on the server's disk, which a client on another machine can't reach. List and read are GETs that expose notebook text the caller could already read through the contents API or the room, since a server sees only the copies of files under its own root; discard deletes only copies whose file is under that root, whichever root's dir they are in. The id check is the only thing between a request and a file name, so it is exact and tested with /, .., %2F and other characters.

Decisions the brief left open (conservative choice each time):

  • Cmd::Removed closes the room even when the copy can't be written: the file id is already dropped, and keeping a room that would save a deleted file back is worse. It logs an error. Every other close waits for a copy.
  • A merge conflict whose copy can't be written has already merged. The room holds its notebook from before (Disk::lost, at most 20), logs an error and keeps save at failed through later merges and saves. It tries again at each save and before closing, and stays open until the copy is written. A client's explicit save that succeeds ends it too: that is read as the person acting.
  • A room that isn't a notebook can't be copied. It closes after GIVE_UP_AFTER failures with an error in the log, and when the file replaces it, save is failed with the reason until a client saves.
  • Cmd::Removed is also how a deletion the room's own look finds (file_gone) ends, so that closes without a copy too, like a delete through the contents API. Only the cleanup's own check keeps the room.
  • Copies are filed under the path they were made for. A rename leaves earlier copies under the old path; the discard route and state.recovery clearing work by id, so they still work.
  • Shutdown (flush_all) writes a copy of a room still dirty after its last save, read_only or save_failed, and logs an error if it can't.

Tests (recovery_tests in collab.rs use paused time and a stand-in contents that fails saves; the room's Instant is tokio's):

  • a_room_whose_saves_keep_failing_keeps_a_recovery_copy: saves fail, the client leaves, ten failures pass: a save_failed copy with the typed source, parseable as a notebook, then the room retires.
  • a_room_whose_file_is_gone_keeps_a_recovery_copy: file_gone.
  • a_room_that_cannot_keep_its_copy_stays_open: the recovery dir is a file; the room is still open long after it would have closed; once the dir works, the copy is written and the room retires.
  • a_room_without_a_recovery_dir_still_gives_up: no dir, as before.
  • a_merge_conflict_keeps_the_rooms_version: copy holds the room's cell, state.recovery names it with merge_conflict and ["a"], the disk won the cell in the room.
  • a_merge_without_a_conflict_keeps_no_copy.
  • save_state_follows_the_saves_and_stays_out_of_the_file: failed with save_error, then saved with no save_error; none of the state keys in the .ipynb.
  • opening_a_room_names_the_newest_copy_until_it_is_discarded: then the next newest, then none.
  • edits_lost_without_a_copy_stay_failed_until_they_have_one, a_clients_own_save_clears_edits_lost_without_a_copy, a_save_that_loses_edits_does_not_clear_them, a_room_with_lost_edits_stays_open_until_they_have_a_copy, a_reload_that_leaves_the_room_clean_says_saved.
  • a_replaced_room_that_is_no_notebook_says_so, a_room_that_is_no_notebook_still_gives_up.
  • stopping_keeps_a_copy_of_edits_that_cannot_be_saved, stopping_keeps_a_copy_of_a_read_only_rooms_edits.
  • a_read_only_room_keeps_a_copy_before_closing, a_cleanup_that_finds_the_file_gone_keeps_a_copy, closing_again_keeps_no_second_copy_of_the_same_edits.
  • a_room_stops_naming_a_copy_that_is_pruned, servers_on_two_roots_offer_only_their_own_copies, a_recovery_dir_that_cannot_be_made_is_done_without.
  • recovery.rs: id shape, ids_strictly_increase, a copy's round trip, roots_do_not_see_each_others_copies, 21 copies leave 20, the size bound (measured from the copies, whose sizes differ with their times).
  • crates/ganymede-cli/tests/recovery.rs: ganymede serve offers the copies in its data dir.
  • tests/http.rs: collaboration_recovery_lists_returns_and_discards_copies (list, get, delete, ids with /, .., %2F, other characters are 400, unknown 404), collaboration_recovery_needs_the_same_auth_as_contents (no or wrong token refused as /api/contents is, nothing deleted; 404 without a recovery dir), and collaboration_room_names_its_recovery_copy_until_it_is_discarded (a websocket client sees state.recovery on open, and each discard moves it on), collaboration_recovery_is_per_root.

Review round 2, same day:

  • docs/reference.md: the GANYMEDE_DATA_DIR row's inline "(unreleased)" moved to the standard note under the table, which check-unreleased.mjs accepts and a release finds.
  • A room's state changes reach its clients as updates, not only its own copy of the state map. The tests read the client side of the room (client in recovery_tests): a doc that answers the room's sync step 1 and applies its frames, as tests/http.rs's websocket client does, until the state it was owed arrives. state.recovery and save: "saved" in the merge conflict test, save/save_error through a failed and a good save in save_state_follows..., and the copy named at shutdown in stopping_keeps.... Each fails with the dispatch it rides replaced by let _: set_recovery in keep_lost and in kept_before_closing, set_save_state("failed") in save_room.
  • Cmd::Flush and Cmd::Removed try again the copy a merge conflict couldn't write, once the dir works: stopping_writes_the_copy_a_merge_conflict_lacked and removing_the_file_writes_the_copy_a_merge_conflict_lacked. Each fails with its || !keep_lost(...) removed.
  • keep_lost says saved on a clean room whose copy it just wrote: keep_lost_on_a_clean_room_says_saved, which fails without the say_saved in it.
  • Two servers on one root share the store, so a discard or a prune on one leaves the other's room naming a copy that is gone. A 404 read now asks every open notebook room whether state.recovery names the id (Collab::recovery_gone, from the GET route), and each that does names the newest copy of its path left, or clears the key. tests/http.rs deletes the copies from under the server, as the other server would, and reads them: the room names the next copy, then, with none left, clears the name.
  • rooms.md and the collab.rs module doc say the no-closing-without-a-copy rule has the exceptions each lists below it. The id rule reads "an id with other characters gets 400". The merge diagram's two warn boxes and its alt text name the recovery copy. rooms.md says iPad and iPhone keep copies in the app container, with #957 tracking a check on a device.
  • reload still snapshots the room's notebook on every disk change while it is dirty: merge_disk applies the merge and reports the conflicts in one call, so the room's own version is gone by the time the conflicts are known, and telling beforehand would take a merge of its own over a notebook serialized like the snapshot. The comment at the snapshot says so.

2026-11-26, embedded servers take room locks (#966) ​

serve.rs took room locks only when startup.stop.is_none(), that is, only for ganymede serve/lab/ui. Every server started with stop took none: the Mac app's (through ganymede-ffi), and ganymede mcp's own server (crates/ganymede-cli/src/mcp.rs passes stop too). So the app and a ganymede serve on one notebook could both edit and autosave the file. The comment blamed iOS, which has no runtime dir to lock in, but the condition turned locking off on the Mac too.

What changed:

  • Startup::room_locks, a RoomLocks enum (RuntimeDir, the default, or Off) in serve.rs: run_with locks in the Jupyter runtime dir's ganymede-rooms/ unless the app asks otherwise. Nothing infers from stop any more; Startup's Default still locks.
  • ganymede-ffi's startup sets it: Off on iOS (cfg!(target_os = "ios"), logged), RuntimeDir everywhere else, in both the gateway and the no-kernels branch. The app's server runs on a thread with a runtime of its own, so when the app stops it the rooms and their locks are dropped with the runtime; a process exit drops them for the CLI servers.
  • The read-only errors name the cause, since it is almost always another Ganymede server on this machine: room_ops::READ_ONLY (the execute endpoint's 400 and the room's own refusal) and the MCP tools' error (mcp.rs) now say "another Ganymede server on this machine, such as the Mac app or a ganymede serve". room_lock.rs, collab.rs and the comment in run_with say who doesn't lock: iOS only.
  • Docs (../rooms.md "Two servers on one notebook", and the alt text, title and footnote of images/rooms/two-servers.svg) drop "An app that embeds the server takes no lock" for "Every server locks, an embedding app's included; only iOS, which has no runtime dir, takes no lock", with the standard Unreleased note. ../embedding.md gains "Two servers on one notebook" (Startup::room_locks, and that the app and CLI must see the same runtime dir), and ../mcp.md says ganymede mcp's own server now locks too.

Tests:

  • crates/ganymede-server/tests/embedded.rsan_embedded_server_locks_its_rooms_first_come: two servers started as ganymede-ffi runs them (stop set, no output) on one notebook. Whichever opens the room first owns the file (its contents API says writable, the other's says not); the read-only room undoes its client's edit and saves nothing while the owner saves its own; the other order too: the first server stops, its lock goes with it, the second's room takes the file over within its retry tick (about a second; the test leaves room before editing), and a fresh server is read-only then.
  • The embedded test starts each server on a thread of its own with a tokio runtime of its own, as the ffi does. On the test's shared runtime the room task outlives run_with (it is tokio::spawned, and a room holds its lock until it retires, a minute after its last client) and the lock never releases.
  • Both test binaries set JUPYTER_RUNTIME_DIR to a temp dir once, in a OnceLock before any server starts, so their rooms lock there and not in the real ~/Library/Jupyter/runtime: the servers run in this process, so the var can't be set per server as crates/ganymede-cli/tests set it per command. Set once and never changed, parallel tests can't race it, and each test's notebooks are in its own temp root, so their locks never meet. The dir is kept, not deleted on drop: the servers' rooms lock in it while the binary runs.
  • crates/ganymede-ffi/tests/server.rsthe_apps_server_honours_another_servers_room_lock: holds a room lock as another process's room would and checks the C ABI server's contents API reports the notebook as not writable, then writable once it is let go. It fails with RoomLocks::Off in the ffi's startup.
  • The gateway tests (ganymede-gateway mount and remote, ganymede-server gateway) pass RoomLocks::Off: locking isn't under test there, and they would otherwise leave lock files in the real runtime dir.

Follow-ups: the Mac app doesn't yet show a notebook another server owns as read-only (ganymede-ui#839); the by-hand check is on ganymede-ui#399. Tracking: #965.

2026-11-26, Gateway follow-ups from #969 (#970) ​

Two findings the review of #969 left for later.

The docs now say that without default_kernel, the default in /api/kernelspecs is the first spec in the combined order (the gateway's by name, then this machine's), not the first JSON key, which is sorted. With a gateway set, that is this machine's first until the gateway first answers with specs and the gateway's first after, so the kernel a new notebook gets can depend on timing. Setting default_kernel pins it. Both the Gateway section of the reference and "Kernels on another server" say so.

The gateway status test checked that the token never shows up in the error, but the token travels in the Authorization header and the stub's 503 never repeated it, so the check couldn't fail. The stub now reads the whole request head and echoes its Authorization line in its error message, the test asserts the echo arrived, and the token check proves that scrub takes the token out: with the token left out of scrub, the test fails.

2026-11-26, gateway lists local kernels (#963) ​

With gateway_url set the server ran kernels on the remote Jupyter server and listed only its kernelspecs, so a machine that could run kernels fine here showed none of its own, and a gateway that was asleep left an empty list with no reason given. Now this machine's kernels are listed beside the gateway's, each spec says which side runs it, and /api/kernelspecs says whether the gateway answered last time.

What changed:

  • crates/ganymede-server/src/combined.rs (new): Combined, a KernelspecSource/Provisioner/TransportFactory over the gateway's triple and the local one, copying how RegisteredKernels routes. list is the gateway's specs first, then every local spec whose name (case-insensitive) the gateway lacks, and it sets each spec's gateway flag to the side that listed it. launch asks which side lists the name and launches there, keeping the side by the process handle's address in a map, as RegisteredKernels keeps its own; connect takes that entry and connects through that side, so a kernel comes back the way it went out. A name neither side lists is NoSuchKernelspec. The gateway wins a clash, so a notebook whose kernel the remote offers still runs there.
  • Kernelspec (ganymede-kernel-host) has gateway: bool, #[serde(skip)] like resource_dir: set by the source that lists it, never read from kernel.json, and left out of a spec sent to a gateway or an app.
  • crates/ganymede-gateway/src/lib.rs: Status (reachable, error, at) is what refresh found, and Gateway::status returns it. refresh now fetches through Inner::fetch_specs (which marks each spec as the gateway's) and records the outcome either way, so a failure keeps the kernelspecs it had. Inner::scrub takes the URL, its path and the token out of the error text, since the API reports it. refresh_every waits every while the gateway answers and every.min(RETRY) (15 s) while it doesn't, so a gateway that was asleep is found within 15 s. Gateway::host is the name to report: the URL's host, never the path, query or token.
  • crates/ganymede-server/src/serve.rs: Remote is the gateway's triple plus an Arc<dyn GatewayStatus>; local_kernels builds the local triple from Startup where an app supplies it, else default_provisioner, default_transports and FsKernelspecs, and is None when this build can't run a kernel here (no zmq/subprocess, no app), where the gateway-only behavior stays. With a gateway and a local triple the source is Combined, and the status goes to the manager; without a gateway, nothing changes. RemoteStatus implements the API trait over the Gateway and the name (gateway_name, else the host).
  • Config.gateway_name and --gateway-name name the gateway in the API.
  • crates/ganymede-api: GatewayModel { name, reachable, error }; KernelspecsModel.gateway: Option<GatewayModel> and KernelspecModel.gateway: bool are extra keys, left out when unset or false, as resource_dir is (#891), so a local server's answer is as it was. KernelManager::set_gateway_status takes Arc<dyn GatewayStatus>, so the API crate doesn't depend on ganymede-gateway, and answers from it only once set.
  • Kernelspec { .. } literals in tests (sessions.rs, tests/host.rs, tests/http.rs) take the new field.

Docs: docs/kernels.md "Kernels on another server", docs/reference.md flags table, config sample and Gateway section, docs/api.md in "List kernelspecs", each new section with the Unreleased note.

Tests:

  • combined.rs: lists_the_gateways_specs_then_this_machines_others (order, case-insensitive clash, flags), launch_and_connect_go_to_the_side_that_has_the_name (each side launches its own, connect goes to that side, and a second connect for one launch fails), a_name_neither_side_lists_is_no_such_kernelspec.
  • ganymede-gateway: status_says_when_the_gateway_isnt_answering_and_when_it_is (a stub that 503s, then answers: unreachable with the reason and no path or token in it, then reachable with one spec marked as the gateway's and the host as the name), a_gateway_that_isnt_there_is_unreachable.
  • tests/gateway.rs: lists_this_machines_kernels_beside_the_gateways_and_runs_each_there (a real server and gateway: both lists, the flags and the top-level gateway, no token in the answer, a local spec starting here and a gateway spec starting there), an_unreachable_gateway_still_lists_local_kernels_and_says_why (closed port, gateway_name: local spec still listed, reachable: false, an error without the token or the URL's path).

Pre-push review round:

  • A launch goes by the spec's own gateway flag, so a restart stays on the side the kernel started on even when the gateway's list changed since (a kernel started here before the gateway's first answer, or one whose name the gateway listed later); test a_restart_stays_on_the_side_the_kernel_started_on.
  • The refresh interval is next_refresh, tested (refreshes_sooner_while_the_gateway_isnt_answering).
  • error keeps the causes reqwest leaves out of its message (connection refused, DNS, timeout, TLS), and a remote's error body is cut to its first line, 200 characters (a_remotes_error_body_is_cut_to_its_first_line).
  • Remote in serve.rs allows dead code without the gateway feature, for the portability job's -D warnings build.
  • Docs: the state before the first refresh, the flag in the Unreleased note, and the gateway object being there whenever a gateway is set.

2026-11-26, A machine's notebook access through the mount (#972) ​

A connected machine's window can now show and change that machine's notebook access. The mount refused everything under api/host, so the apps had nothing to ask and the window dimmed the section.

route allows api/host/grants and anything below it, as Kind::Other, and nothing else under api/host: the rest is the cells' own host API, which a machine's kernels call on the machine itself, never through this Mac. The grant subtree takes GET, PUT and DELETE, since the mount forwards the method and body as they are; it needed no rule of its own.

This adds nothing a page with the mount can't already do. The mount forwards api/kernels, api/terminals and api/notebooks/run with the machine's token, so whoever can call it can run code on the machine, and a grant is smaller than that. The machine's server still checks its own token and its own [host] defaults, and a grant set through the mount is the one the machine's own UI sets. A page the machine serves runs in the sandbox and holds no token, so a notebook can't use the route to widen its own grant.

the_allowlist_is_exact now lists the subtree as allowed and api/host, api/host/, api/host/x and api/host/grantsx as refused; a .. in it is still Malformed, not merely refused, so api/host/grants/.. reads as the same path it always did. The redirect test's examples moved off api/host/grants/x, which is now a path a Location may name. A new mount test sends a GET and a PUT to a stand-in and checks the method, path and body arrive, and that api/host/x never does.

2026-11-26, privacy page marker for the name sent to connected machines (#965) ​

ganymede-ui#842 lets the Mac app send your account name to a connected machine's notebook rooms, per machine and on by default. docs/privacy.md says the name "never goes to a remote server", which stays true for the released app. Per CLAUDE.md, the sentence keeps its words until ganymede-ui releases, with an Unreleased in ganymede-ui note beside it saying what the next release adds; ganymede-ui's release script lists the note and opens an issue here to update it. (An HTML-comment marker is only accepted in site/index.html; check-unreleased wants a note block in Markdown.)

2026-11-27, the book's first open in the browser (#953) ​

ganymede-ui#815 replaced the connect sheet on a browser's first open with a start screen: Try a Notebook, Open a Notebook… and Connect to a Server…. It shipped in ganymede-ui 0.17.0 (assets in 0.17.1). #954 put a marker in docs/app.md and #974 rewrote that page once the release was out; chapter 11 of the book (site/book/index.html, "Which backend") still ended at the connect sheet. It now ends at the start screen, with Connect to a Server… opening the sheet. No Unreleased note: the change is in ganymede-ui's latest release.

The line also says that a saved connection that fails opens the connect sheet with its error (App.tsx's connect .catch). The book is generated from the code architecture primer: its chapter 11 "Which backend" line needs the same change before the next rebuild, or the rebuild brings back the old text.

2026-11-27, serve the home directory by default (#955) ​

With no --root-dir and no root_dir in the config file, ganymede serve, lab and ui now serve the home directory of the user running the server (config::default_root_dir), where they served the process's current directory. A server that launchd or systemd starts in / would otherwise expose the whole disk, so the default is the conservative one. Without a home directory (it is unset or not a directory) the server falls back to the current directory and logs a warning. --root-dir and root_dir override the default as before, and the server info file reports the resolved root. jupyter_server still defaults to the current directory, so this differs from it; the docs say so. ganymede mcp and ganymede grant keep the current directory as their default. mcp finds a running server by checking that the server's root is a prefix of the current directory, so a server rooted at the home directory is still found from any directory under it. Tests that start a server from a temp directory without --root-dir now pass it, so they don't serve the developer's home.

A grant belongs to the root it was made under, and ganymede grant --root-dir still defaults to the current directory. So with cd ~/proj && ganymede serve, the server is now rooted at ~ and a ganymede grant run in ~/proj stores its grant under a root the server doesn't read. The docs (reference.md's grant section and host-api.md) say to use ganymede grant --root-dir ~ … or start the server with --root-dir .; grant's own default is unchanged. The examples that cd into a notebooks folder and start lab or serve now pass --root-dir ., which works on the latest release and on main.

The embedded server (ganymede_server_start with a NULL config or no root_dir) goes through the same default, so it now roots at home too (docs/embedding.md does not state a default); the apps pass root_dir and are unaffected. The container image's command now passes --root-dir /notebooks: the image's user has a home directory, so without it the image would have served /home/ganymede instead of the mounted volume, and container/smoke-test.sh now checks that /api/contents lists a file in the mounted folder.

2026-11-27, kernel provider design note (#981) ​

#965 routes the Mac app's local notebooks through a background ganymede serve, which the app's in-app TypeScript kernel can't reach through the C ABI it registers with today. Kernel providers proposes a channel that carries the same calls as JSON frames, so a connection becomes one more AppKernel behind RegisteredKernels.

It is new surface, so it is written down before any code. The first draft was a websocket route guarded by the token and a loopback check. The pre-push review showed why that is weak: tailscale serve sends no identity for tagged devices or funnel traffic, ssh -L and local proxies arrive from loopback too, and the token reaches a browser through ?token=. The note now uses a Unix socket in the runtime directory, whose file modes and a peer-user check make "this user's processes" the boundary, with the token as a second check.

The review also found that the code didn't do what the first draft said after a disconnect: a lost registered kernel is restarted, and RegisteredKernels::launch falls back to the subprocess provisioner for a name no longer registered, which would run a provider's argv. The note now drops argv and env from a provider's spec, never launches a lost socket name through the fallback, and ends such kernels with no restart, and lists those changes, the start acknowledgement AppKernel::start can't give today, and wiring RegisteredKernels into ganymede serve.

Also here: a wording fix in docs/api.md's write events ("another client of this route", from #980's review).

2026-11-27, kernel provider groundwork (#984) ​

RegisteredKernels now knows where a spec came from: an app's, through the C ABI, still stands in for a fallback's namesake, while a provider's may not take a name the fallback lists, and is listed after everything else and never launched in place of a fallback's namesake. unregister(name) forgets a spec without touching its running kernels, and end_all_from ends one app's kernels and drops its specs, which is what the kernel provider socket will call when a connection closes. A start whose app finishes it later now has AppKernel::started, a receiver launch waits on for the app's answer, failing and cleaning up like any other failed start. That wait lasts at most the launch's startup timeout, a launch dropped while it waits stops the kernel the app started, and a kernel a provider started is relaunched through its provider or not at all, never through the fallback. A new Ended::Gone reads as lost to clients but makes the process answer KernelProcess::restartable() == false, so ganymede-api leaves that kernel dead rather than restarting it, while a platform loss still restarts within its own limit. ganymede serve builds a RegisteredKernels in front of its own kernels even with no embedding app, so the provider socket has somewhere to register; the socket itself, with its config and listener, is #983.

2026-11-27, kernel provider socket (#983) ​

The socket docs/kernel-provider.md proposed: ganymede serve binds <jupyter_runtime_dir>/ganymede-kernels-<pid>.sock when [kernel_providers] enabled is on, auth is on and the server isn't embedded, and names it in jpserver-<pid>.json as kernel_providers_socket. A program of the same user connects, sends hello with the server's token, registers display-only kernelspecs and answers start, send and stop for their kernels. A connection is one AppKernel behind the server's RegisteredKernels, so those kernels run through the same sessions, rooms, execute endpoint and kernel list as any other, and #984's groundwork (Origin::Provider, started, end_all_from, Ended::Gone) carries the lifetime: on disconnect the specs are forgotten and the kernels end dead with reason lost, never restarted.

Decisions worth the record:

  • Bound in a private temp dir, then renamed. A socket's mode is what umask leaves it, so the socket is bound as .gk-*/s inside the runtime dir, chmod 0600, then renamed to its final name: it is never visible with a wider mode. create_private_dir makes the runtime dir 0700 when it's missing, then the server checks it has no group or other write bit and is owned by this user, or no socket is opened; in a directory another user can write, the socket's own mode would mean nothing. The check covers the staged path as well as the final one, since on a long runtime dir the staged path is the longer.
  • No libc for the uid or sun_path. The staging dir is this process's, so its owner is this process's uid, read with MetadataExt::uid; no geteuid and no crate for it. sun_path's size is a per-OS constant (104 bytes on macOS and the BSDs, 108 on Linux and Android) and a path over one less than that means no socket, with a warning naming it. ganymede-server gains no libc dependency.
  • Auth off means closed. With token = "" anyone who can reach the port can already run code, so a provider check adds nothing: the socket stays closed with a warning. An embedded server opens none either, and Windows serves as usual, warning only when enabled is set: the socket is Unix only.
  • The handshake and the writes are timed. hello has 10 seconds; a write that takes more than 10 seconds closes the connection. Timing carries the hello deadline, the write stall and the queue size (1024 frames by default), and a test passes its own to kernel_providers::start rather than reaching into Startup.
  • No unsafe in the server, no new dependency. The socket code has no unsafe. The new CLI test, serve_names_the_kernel_provider_socket, adds two libc::kill(pid, SIGTERM) calls, as the suite's other serve tests do, to stop the ganymede serve it spawned: the pid is that child's, read from its own Child, so the signal can only reach the process the test started. base64 was already in the workspace: the JSON message helpers move it from ganymede-ffi to ganymede-protocol, so neither gains or loses a crate version.
  • Reservation is #986. [kernel_providers] reserve and the code-signature check are not here; names are first come, and a name a kernelspec on disk or a kernel server lists is refused.
  • A provider's start is answered in two steps, since a frame can't return a value: started, then the kernel's kernel_info_reply. A deferred start waits up to startup_timeout_secs for the first and up to startup_timeout_secs again for the second. The start frame carries only env.JPY_SESSION_NAME: a provider runs the kernel where and with whatever environment it likes, so no cwd or other env is sent, and no argv/env from a register is kept. A close takes the state lock before marking the connection closed, and start records its pending answer under the same lock, so a launch racing a disconnect leaves no pending started sender.

Tests. crates/ganymede-server/tests/kernel_providers.rs drives kernel_providers::start and the router with a fake provider over a real UnixStream: off by default (no socket); the handshake (wrong token, no hello, another op first, each welcome with an error and then a closed connection); the socket's 0600 mode and its name in the info file; the happy path (register, listed without argv/env, start through POST /api/kernels, a cell through the execute endpoint whose output is the fake's execute_result, interrupt on control, DELETE sending shutdown_request then stop); first-come names and unregister; a dropped connection (kernel gone from /api/kernels and its spec from /api/kernelspecs, no restart, GET /api/kernels/<id> a 404, a reconnected provider's next start a new id); and a provider that stops reading (a 16 MiB message past a 200 ms stall closes the connection, the kernel ends lost, restartable() false); a full queue (a four-frame queue past a 60-second stall closes the connection, the kernel ends lost); a start that carries only env.JPY_SESSION_NAME, both from POST /api/kernels with no session and from a session created through POST /api/sessions (no cwd, no other env); a second connection that can neither deliver into nor end the first's kernel (its status: busy doesn't reach the kernel's execution state, and its ended brings no restart, so the provider sees one start); a refused start (a 500 with the provider's reason, one start frame, no kernel left); a start nobody answers (the API's 500 at the startup timeout, no kernel left); a silent connection closed at the hello deadline; each refusal leaving no socket (off, embedded, no token, a world-writable runtime dir, a path over sun_path's limit); and the listener dropped (a live provider reads EOF, and the socket file is gone). Unit tests in the module cover peer_allowed, the runtime-dir mode and owner check (0700 yes, 0770/0777/another owner no), the sun_path limit and the check of each path against it, the spec field stripping, a start after a close (no pending started), and a full queue closing the connection rather than dropping a frame. server_info.rs and the CLI suite cover the JSON key's presence and absence and the socket file's life.

What the tests can't cover: a connection from another user. CI has one user, so peer_allowed's refusal is a unit test and the accept path's use of it is read, not exercised. A path over the limit is also refused by bind itself, so the length check is proved by its own unit test, not by the integration test that leaves no socket.

2026-11-27, chrono out of the dependency tree (#855) ​

Ganymede's own crates moved to jiff on 2026-11-17, but chrono still came in through rmcp 3.11 (directly, and through schemars' chrono04), so deny.toml kept an ignore for RUSTSEC-2026-0543. rmcp 3.12 makes chrono an optional feature (chrono, on in its defaults) and depends on jiff. ganymede-server already takes rmcp with default-features = false and lists its features, so moving to 3.12 drops chrono, and with it iana-time-zone, from Cargo.lock: cargo tree -i chrono finds nothing. The advisory ignore is gone, so audit fails again if anything brings chrono back.

The bump also brings rmcp 3.12's own fixes to /mcp: a malformed Streamable HTTP body gets a 400, cache hints are left out for peers on older protocol revisions, and unknown capability fields are kept. Every #[tool] here sets its description explicitly, so 3.12's doc-comment fix changes no tool text.

2026-11-27, docs after ganymede-ui v0.17.0 (#964) ​

ganymede-ui v0.17.0 (published as v0.17.1) shipped the three app changes that Ganymede's docs marked Unreleased in ganymede-ui: the browser's first open (ganymede-ui#824), the browser header with Run Cell and the status line (ganymede-ui#806) and DuckDB fetched on first use (ganymede-ui#809). docs/app.md and docs/data-output.md now say these plainly and the notes are gone. They name 0.17.1, the first release with assets: v0.17.0's tag has no GitHub release, so ganymede ui install --version 0.17.0 finds no zip. ganymede ui install still takes 0.16.0 by default (DEFAULT_VERSION in crates/ganymede-cli/src/ui.rs), so the toolbar bullet keeps the older toolbar too and scopes the new one to the browser; the apps' toolbars differ and ganymede-ui's apps guide lists them. The privacy page's note stays: ganymede-ui#846 isn't in a release yet.

2026-11-27, write events on the events socket (#978) ​

The Mac app keeps answers per notebook file: a link's "always allow", the device ledger's, folder grants. They follow the file when Ganymede writes it, and are forgotten when something else does (#584, #916). It learned of the server's writes through ganymede_server_set_write_observer, which only reaches a server the app embeds; once a notebook goes through a separate ganymede serve (#965 section 4), it needs the same reports over the API. /api/events/subscribe was already there, jupyter_events' stream, and emitted nothing, so the reports go there: no new route, and JupyterLab's event manager passes an unknown schema along without acting on it.

WriteObserver keeps a bounded tokio::sync::broadcast channel (256 events) next to the FFI function. serve now always builds one — the app's when Startup::write_observer gives it — so a server with no embedder still has the socket's channel, and AppState::write_observer hands it to ws::events. A write is stamped beforehand only when someone is listening: is_set is now "the FFI function is set, or the channel has a receiver", so the cost with nobody listening is what it was.

Stamps::observe already had the contents-API path; Observed carries it and hands it to notify, which sends it as the event's path and still calls the FFI function with the canonical absolute path, unchanged. The event is jupyter_events' envelope — __schema__ (https://ganymede-server.com/events/write/v1), __schema_version__ and __metadata_version__ 1, __timestamp__ — over path, before and after. jiff writes the timestamp: the server's own time crate, so no chrono and no new dependency.

A subscriber that lags has missed writes and can't tell which, so its socket is closed with 1011 and the reason missed events; the app forgets the answers it can't confirm, which fails safe. That is the one close a server sends unasked on this route, and a client that reads it knows to re-read the files it depends on.

The tests drive it through the socket: a save made and remade through the contents API, a copy to a named path and a checkpoint restore each send one event with the right stamps, while a failed write, a directory save, a new untitled file, a rename and a delete send none; and a room's autosave and a run's save of its outputs send theirs. The lag is a unit test of the frame the socket sends next (ws::next_event_frame), on a channel of two: a subscriber that read nothing while five writes went by gets the 1011 close, and one that read each gets all five. Driving it through a real socket first depended on the OS's buffers filling, which macOS's did and Linux's, several megabytes on loopback, did not. And a send to a client that stopped reading could wait forever, never polling the channel, so it never saw the lag; each send now has 10 seconds, after which the client is dropped and its subscription with it.

A write that begins with no app function set is still not reported to one set before it ends, as before: Observed notes whether one was set when it took the stamp, since a socket's subscriber now makes that stamp be taken anyway. The event's timestamp is taken once per write, in notify, so every subscriber gets the same one. A test in tests/embedded.rs drives a server built by run_with, with and without the app's observer, to pin the wiring. A unit test pins the rest: nothing is stamped before a write with neither a function set nor a subscriber.

2026-11-28, cdp-kernel 0.17.0 (#1000) ​

CI (CDP_KERNEL_VERSION in .github/workflows/ci.yml), container/Dockerfile, and the tested-version docs (docs/architecture.md, docs/development.md, docs/install.md) now pin cdp-kernel 0.17.0.

2026-11-28, attach serve, ui, and mcp to a running server (#1005) ​

ganymede serve, ganymede ui, and ganymede mcp now discover and attach to a running Ganymede server whose root_dir contains the target folder, with a version check and --own-server to keep today's dedicated-server behaviour. This is part of #965 §4 (one server per Mac).

Discovery lives in a new module, crates/ganymede-cli/src/attach.rs, so serve, ui, mcp, mcp call, and mcp watch all share one discovery and validation path while keeping ganymede-server free of HTTP client dependencies.

Security and validation ​

Before attaching to any jpserver-<pid>.json in JUPYTER_RUNTIME_DIR:

  • The file must be a regular file (never a symlink) owned by the current user with owner-only permissions (mode & 0o077 == 0 on Unix), verified on both symlink_metadata and the opened file descriptor, and capped at 64 KiB.
  • Non-Ganymede jupyter_server info files (lacking ganymede_version and ganymede_app) are skipped.
  • pid must be positive and alive (kill(pid, 0) on Unix); stale files left by dead processes are skipped without making any network request.
  • url must be a loopback http:// or https:// URL (localhost, 127.0.0.0/8, or [::1]) with an explicit non-zero port and no userinfo, query, or fragment. Probes disable HTTP proxies and redirects and use a 2 s timeout.
  • Both target_dir and root_dir are canonicalized before checking target.starts_with(&server_root), handling symlinks and preventing sibling-prefix false matches. When multiple live servers cover the folder, the deepest root_dir (and newest info file on a tie) wins.
  • After confirming liveness on GET /api, the server's ganymede_version (and GET /api/update's running base version when reachable) must match env!("CARGO_PKG_VERSION"). On mismatch, the CLI refuses to attach and prints a warning to stderr naming both versions before starting its own server.

Command behaviour ​

  • ganymede serve: attaches when GET /api/status succeeds with the info file's token (and /mcp is enabled when --mcp is passed), prints the attach message on stderr and the server's unauthenticated base URL on stdout, and exits 0. Tokens are never written to stdout or stderr.
  • ganymede ui: attaches via the same API probe, prints the attach message on stderr and the target-folder URL (/?dir=... for subdirectories, without any token) on stdout, opens the browser via an atomic 0600 redirect page (ganymede-attach-<pid>-open.html) in the runtime dir unless --no-browser or --no-redirect-file is set, and exits 0.
  • ganymede mcp: attaches using mcp_token from the 0600 info file when present, falling back to token, and prints the attach message to stderr (leaving stdout exclusively for JSON-RPC). When a covering server has MCP disabled or lacks a valid MCP token, it reports why on stderr and falls back to its own in-process server.
  • --own-server is available on serve, ui, and mcp to bypass discovery and always start a dedicated server.

Tests ​

  • Unit tests in crates/ganymede-cli/src/attach.rs cover loopback URL validation, display/open URL token handling, 0600 redirect file generation, symlink and canonical path containment, rejecting outside paths, dead PIDs, non-Ganymede servers, wide-permission or symlinked info files, version mismatches (both info file and live /api/update), mcp_token handling, MCP-disabled reporting, and deepest-root priority.
  • Integration tests in crates/ganymede-cli/tests/attach.rs exercise real ganymede serve, ganymede ui, and ganymede mcp binaries for attach, subdirectory attach, outside-root non-attach, stale dead-PID skipping, version mismatch refusal, MCP-disabled fallback, mcp_token-only info files, no token leakage, and --own-server.

2026-11-28, blank lines around tables when editing ganymede.toml (#998) ​

Follow-up from the review of PR #997 (#995, shared config file).

Investigation against toml_edit 0.25.19+spec-1.1.0 (e14c5a2) showed that config_file::apply already keeps blank lines before existing [table] headers when editing a file that starts with top-level keys, both with and without comments above the tables: toml_edit's parser stores the blank line in each table's decor.prefix ("\n# Tailnet peers.\n" or "\n") and visit_table writes it verbatim after the previous line's newline.

Two real spacing edges did show up at the boundary before the first [table] header:

  • Adding the first top-level key to a table-only file. When the file starts with [tailscale] (or # Tailnet peers.\n[tailscale], or a nested header such as [kernel_providers.reserve]), that first table's parsed decor.prefix has no leading newline ("" or "# Tailnet peers.\n"). Adding a top-level key ({"port": 2}) places it before the table with no blank line between them, because toml_edit only applies its "\n" default when a table's prefix is unset.
  • Removing everything before the first [table]. Deleting the last top-level key ({"port": null}) or deleting the first table ({"tailscale": null}) left the next table's "\n" separator prefix at the top of the file as an orphaned leading blank line.

apply_to now tracks whether the root table had values and whether the file started with a blank line, then runs keep_first_table_spacing after merge_table. It finds the first visible table in DocumentMut's display order (first_visible_table_path, matching toml_edit's position sort and skipping empty implicit parents):

  • If top-level keys were added where there were none and the first table's explicit prefix does not start with a newline, prepend "\n".
  • If no top-level keys remain and the file did not originally start with a blank line, strip a single leading newline from the first table's prefix.

Tests in crates/ganymede-server/src/config_file.rs:

  • blank_lines_between_tables_survive_edits: covers blank-line-separated tables both with and without comments above them when editing a top-level key, adding a top-level key, and merging into existing tables.
  • adding_a_top_level_key_before_tables_keeps_a_blank_line: covers adding a top-level key to table-only files (with comments, without comments, and with a nested header under an implicit parent table).
  • removing_everything_before_a_table_leaves_no_leading_blank_line: covers removing the last top-level key (with and without comments on the table) and removing the first table.

Removing the keep_first_table_spacing call in apply_to fails both adding_a_top_level_key_before_tables_keeps_a_blank_line and removing_everything_before_a_table_leaves_no_leading_blank_line.

2026-11-28, a_full_queue_closes_the_connection current-thread starvation (#1026) ​

a_full_queue_closes_the_connection in crates/ganymede-server/tests/kernel_providers.rs timed out after 10 s (a full queue did not close the connection), both on e2e (macos-latest) and locally in debug builds (11.71–15.31 s):

  • Synchronous Sink::send starved the current_thread test runtime.registered::Sink::send (crates/ganymede-kernel-host/src/registered.rs) calls ProviderKernel::send synchronously with no .await, so tokio::time::timeout(..., session.send(...)).await resolved on its first poll without yielding. Neither write_frames nor the provider connection's end_all_from(&app, Ended::Gone) cleanup ran during the loop, so launched.process.is_alive() remained true across all 10 iterations even after queue: 4 overflowed.
  • Synchronous 16 MiB base64/JSON serialization exceeded the 10 s deadline. Because the loop never broke early, all 10 iterations allocated 16 MiB buffers and ran message_to_json + frame.to_string() (~21.3 MiB JSON each) between started and deadline = started + 10s. Under debug builds (or CPU contention), those 10 synchronous iterations took >10 s before tokio::time::sleep could yield once to complete connection teardown.

The test now sends one tiny probe after mute = true and waits until serve records it and stops reading, then sends 4 MiB frames while yielding on the executor (sleep(10 ms) after the first frame so write_frames stalls on the socket buffer, then yield_now()) so connection teardown runs as soon as the four-frame queue overflows (~1.1 s locally).

2026-11-28, per-kernel execution history API (#1006) ​

Added a bounded per-kernel execution history ring buffer and two read-only REST endpoints so clients (such as a menu bar monitor) can inspect running and recent cell executions without keeping a notebook window or kernel websocket open:

  • GET /api/kernels/{id}/executions — returns up to the last 50 executions for one running kernel, newest first (404 when the kernel is unknown or has shut down). Accepts an optional ?limit= parameter clamped to 50.
  • GET /api/executions — returns recent executions across all running kernels, newest first. Accepts an optional ?limit= parameter (default 50, clamped to 500).

Both routes sit behind the existing /api/* auth middleware (403 without a token/cookie/tailnet login). Standard Jupyter /api/kernels and /api/kernels/{id} responses (KernelModel) remain unchanged so jupyter_server compatibility is preserved.

Design ​

The ring buffer (ExecutionHistory) and JSON models (KernelExecution, ExecutionStatus) live in ganymede-api beside KernelLog, stored directly on each RunningKernel rather than in a server-wide map:

  • Each kernel owns its own Mutex-guarded VecDeque capped at 50 entries, so executions on different kernels never contend on a shared lock.
  • Dropping a kernel on shutdown or death drops its ExecutionHistory immediately, keeping memory bounded without a separate reaper.
  • Each entry gets a monotonic global sequence number (AtomicU64) at start so cross-kernel newest-first ordering is deterministic even when executions start within the same microsecond or across clock steps.
  • GET /api/executions snapshots Arc<RunningKernel> handles under the kernel map's read lock, releases the read lock, and reads each kernel's ring buffer independently — avoiding nested locks.

Execution hooks ​

All server execution paths feed the same per-kernel ring buffer:

  • Kernel websocket (/api/kernels/{id}/channels and direct ClientConnection::send): records start right before forwarding an execute_request on shell, extracting cell_id from metadata.cellId / metadata.cell_id, run_by from the server-verified TailnetUser extension (falling back to header.username), and notebook from the kernel's attached session (kept in sync by SessionManager on create and update). Completions are recorded in RunningKernel::forward on execute_reply before dispatching to clients, so clients reading /executions immediately after receiving execute_reply always see the final status.
  • Room execution (POST /api/kernels/{id}/execute, MCP cell_run / notebook_run_all): ganymede-exec's Handler and NotebookHandler gained default no-op on_request(msg_id) and on_reply(msg_id, reply) callbacks. execute.rs's RoomCellHandler records start with the room's notebook path, cell_id, and run_by (tailnet login, by, or MCP client name) and finishes synchronously from execute_reply.
  • MCP scratch (mcp.rs) and POST /api/notebooks/run (run.rs): use the same NotebookHandler hooks. Timed-out scratch runs stay running until the kernel's eventual execute_reply (for example after an interrupt) arrives in RunningKernel::forward.
  • Crashes, restarts, and shutdown: answer_for_crashed_kernel finishes the active request as error and queued requests as aborted; relaunch, remove_dead, and shutdown_if mark any remaining running entries aborted so no execution is stranded in running.

Tests ​

  • Unit tests in ganymede-api::executions: start/finish transitions (running -> ok / error / aborted), idempotent finishes, ring-buffer cap (>50 retains newest 50), finish_all_running, metadata/reply helpers, and JSON contract.
  • HTTP integration tests in crates/ganymede-server/tests/http.rs: websocket execution (running while in flight -> ok, error, aborted on queued stop_on_error), notebook/cell_id/run_by attribution across websocket, room /execute, and MCP (cell_run and scratch), newest-first ordering across multiple kernels with ?limit=, ring-buffer 50-entry cap, auth enforcement (403 without token), 404 on unknown kernel, cleanup on kernel shutdown, and exact key-set compatibility of /api/kernels.

2026-11-28, kernel provider name reservation (#986) ​

[kernel_providers] reserve in docs/kernel-provider.md: kernelspec name → a macOS code requirement, so a process that connects to the providers' socket before the app can't take the app's name. The map is BTreeMap<String, String>, empty by default, its keys lowercased on load with a custom deserialize_with, since register lowercases the names it is given.

Decisions worth the record:

  • The peer's audit token, not its pid. On accept, next to peer_cred, the server reads the connecting process's audit token from the socket with getsockopt(fd, SOL_LOCAL, LOCAL_PEERTOKEN, …) into a 32-byte buffer. A pid can be reused between the connection and the check, so it names nothing stable; the audit token is what SecCodeCopyGuestWithAttributes resolves to a code object. A failed call is one warn! and None, and a None token fails any reservation: there is no fallback to the pid.
  • One unsafe block, and why it is sound. The whole reservation has one unsafe, inside peer_audit_token, #[cfg(target_os = "macos")]: libc::getsockopt writes into a [u8; 32] on the stack and the socklen_t length beside it, both owned by the function for the call, and the descriptor is the one the stream this connection owns was accepted on, alive for the duration. Nothing else in the path is unsafe: the Security check goes through security-framework.
  • The check is a pure-ish function. reservation_allows(&reserve, name, token: Option<&[u8; 32]>) holds the rule and the platform split, so every case below is a unit test: a name not in reserve is allowed; a reserved name with no token is refused; a reserved name whose peer fails the requirement is refused. Inside, peer_meets parses the requirement with SecRequirement::from_str, builds GuestAttributes with set_audit_token(CFData::from_buffer(token)), takes the guest with SecCode::copy_guest_with_attribues(None, &attrs, Flags::NONE) and checks it with check_validity(Flags::NONE, &requirement). Any error is the refusal, so the check fails closed. Off macOS peer_meets is an Err and peer_audit_token is None, so a reserved name is refused to everyone.
  • The refusal reads the same in every case. registered with error kernelspec <name> is reserved for another program; the Security error and the reason for a missing token go to debug!, so a provider learns nothing about the requirement from the answer. A bad requirement in the config is also logged once at startup, when the listener starts, not only at the first refused register.
  • The reservation comes before the first-come check, and before RegisteredKernels::register, so a reserved name is not the app's to give up: it is refused whether or not it is free.
  • Dependencies: libc, security-framework and core-foundation, macOS only. libc = "0.2" and security-framework = { version = "3", default-features = false } are under [target.'cfg(target_os = "macos")'.dependencies]. core-foundation = "0.10" is there too: GuestAttributes::set_audit_token takes a CFDataRef, and security-framework re-exports neither CFData nor core-foundation, so the token needs CFData::from_buffer from that crate directly. All three are already in Cargo.lock (through rustls-platform-verifier and security-framework); Cargo.lock gains no [[package]], only the three names in ganymede-server's dependency list. security-framework is asked for no features: code_signing is not behind one, and cargo tree -e features -i security-framework --target aarch64-apple-darwin shows the same features as on main (OSX_10_14, alpn, session-tickets; -sys on OSX_10_13), so the build compiles the same crate it did. An earlier draft asked for OSX_10_15, which turned on code paths for every user of the crate; it was dropped.
  • The value is a csreq string, not an identifier or a path. The issue proposed "<signing identifier or path>" with a requirement built from the identifier. A requirement string covers the identifier (identifier "…") and can also pin the team, which an identifier alone can't: any binary, even ad-hoc signed, can carry an identifier. A path is not taken: it names a file, not signed code, and the same user can put another binary there. A value that isn't a requirement (a bare identifier) fails to parse, is logged at startup, and the name is refused to everyone, so the mistake fails closed.
  • The check runs on the connection's task. peer_meets calls Security synchronously, once per register of a reserved name; validating a running process's signature is quick, so it isn't moved to a blocking thread.
  • Known limit: the token is read at accept. A same-user process can hand its end of the socket to a program that meets the requirement after the server read the token, or before; the docs say so. Same-user processes are already inside the socket's boundary.
  • Duplicate spellings are an error. Two keys that differ only in case ("CDP-Browser" and "cdp-browser") refuse the config, rather than keeping one requirement silently.

Tests:

  • All platforms, unit: a name not reserved is allowed with token: None; a reserved name with None is refused; and, in the same test as the first two, a name with no reservation is still first come.
  • #[cfg(not(target_os = "macos"))], unit: a reserved name is refused even given Some(token).
  • #[cfg(target_os = "macos")], unit: this process's own audit token, read from a std::os::unix::net::UnixStream::pair() with the same peer_audit_token the server uses (which also covers that function), meets always, and fails never, identifier "no.such.app" and anchor apple generic, and an unparsable not a requirement((.
  • #[cfg(target_os = "macos")], unit: the test binary's own designated requirement, read with codesign -d -r- (cdhash H"…" for the linker's ad-hoc signature), is met by this process, and the same form with another hash is not, so a match on a real signature is tested, not only always. These macOS tests run in CI's macOS job.
  • CLI (ganymede-cli/tests/cli.rs): ganymede serve with reserve = { "cdp-browser" = "never" } in ganymede.toml refuses cdp-browser over the socket and registers an unreserved name, so the config reaches the listener through serve.rs.
  • Config unit: keys are lowercased, and two spellings of one name are an error.
  • All platforms, integration (tests/kernel_providers.rs): reserve = { "cdp-browser" = "never" } into kernel_providers::start; a provider registering cdp-browser gets registered with an error containing "reserved", /api/kernelspecs doesn't list it, and cdp-node on the same connection registers, so the refusal is the reservation's and not the connection's.
  • macOS only, integration: with "always", the same provider registers the reserved name, and it is listed.

Removing the reservation_allows call in handle (passing an empty map instead) fails a_reserved_name_is_refused_and_another_registers with a bare registered for cdp-browser; the call is restored after checking, and the whole suite passes.

2026-11-28, login-shell PATH for background servers (#999) ​

ganymede serve, lab, and ui now take --path-from-login-shell, and ganymede.toml takes path_from_login_shell = true (off by default). A background server started by launchd inherits only /usr/bin:/bin:/usr/sbin:/sbin, so kernelspecs whose argv names an executable by bare name fail to start under a background service even when they work from a terminal.

When enabled on Unix, ganymede_server::login_path::apply_login_shell_path runs $SHELL -l -c 'printf %s "$PATH"' ($SHELL unset or empty falls back to /bin/zsh on macOS and /bin/sh elsewhere) with stdin attached to /dev/null, stderr discarded, and a 5 s timeout. A non-empty answer becomes the server process's PATH, so kernels, terminals, and language servers inherit it. A spawn failure, non-zero exit, timeout, empty answer, NUL byte, or invalid UTF-8 keeps the inherited PATH and logs one warning saying why. On non-Unix platforms (Windows), the option is ignored with one warning. The PATH source (PATH from login shell or PATH inherited) is logged once at info level at startup; the PATH value itself is never logged.

ganymede adopts the login shell's PATH via adopt_login_shell_path in main before any background thread starts — before both crash::maybe_start (Sentry's transport thread) and Tokio's worker pool — and login_shell_path joins its stdout reader thread before returning on success, so std::env::set_var("PATH", ...) runs strictly single-threaded. The returned LoginPathOutcome is logged right after logging is initialized and server config is validated. An embedded server (ganymede-ffi) is untouched because the host app manages its own environment. The host stays language-agnostic: it only sets PATH and names no interpreter.

Reading stdout on a helper thread bounded to 1 MiB while polling try_wait against the deadline avoids both stdout pipe deadlocks and hanging on a shell whose background grandchild keeps stdout open past the timeout.

Tests: unit tests in crates/ganymede-server/src/login_path.rs exercise fake executable shell scripts as $SHELL (success with argument and closed-stdin checks, non-zero exit, timeout with a short test timeout, empty output, missing binary, NUL byte rejection, and disabled mode) without depending on the developer's own shell. serve.rs and main.rs tests check config-file and CLI flag plumbing for serve, lab, and ui. End-to-end subprocess tests in crates/ganymede-cli/tests/cli.rs start ganymede serve with a fake $SHELL via --path-from-login-shell and via ganymede.toml, confirm a kernelspec whose argv names a probe command only on the login-shell PATH runs with that PATH, and confirm the log reports the source without ever printing the PATH value.

2026-11-28, macOS spawn/CLOEXEC port race and serve test timeouts (#383) ​

Two mechanisms made parallel kernel launches (parallel_starts_through_serve and sibling parallel_starts) vulnerable on macOS:

  • macOS socket() / FD_CLOEXEC inheritance race (ganymede-kernel-host). Unlike Linux (SOCK_CLOEXEC), macOS creates TCP sockets with FD_CLOEXEC clear and sets it via fcntl afterward (mio and std::net). Under concurrent kernel starts, spawn_tied_to_host (posix_spawn on macOS) can run in the window between socket() and fcntl(FD_CLOEXEC) inside another task's allocate_ports bind. The child duplicates the shared kernel socket FD before the parent calls fcntl(FD_CLOEXEC), bind(port), listen(), and close(), leaving the sibling kernel holding an unreachable LISTEN socket on the new kernel's port (observed via lsof with node holding 6 LISTEN sockets and cdp-node dying with EADDRINUSE after 5 s). On non-Linux Unix, bind_cloexec_listener in allocate_ports now binds std::net::TcpListener under SPAWN_FD_LOCK.read() while spawn_tied_to_host takes SPAWN_FD_LOCK.write() around cmd.spawn().
  • Serve test timeout and hidden server logs (crates/ganymede-cli/tests/server.rs).parallel_starts_through_serve sends execute_request over WebSocket right after POST /api/kernels returns 201, while core.boot runs with a 60 s startup_timeout and up to 3 attempts. exchange_step's 60 s frame wait (FRAME_SECS) sat at startup_timeout, leaving no margin for slow starts or relaunches, and start_ganymede_with sent ganymede serve stderr to /dev/null. Raised FRAME_SECS to 90 s, reported closed WebSockets cleanly instead of unwrapping None, and captured ganymede.log on Server to dump when a test panics.

2026-11-28, Keep per-client state for MCP 2026-07-28 on /mcp HTTP (#1015) ​

Re-enabled MCP protocol revision 2026-07-28 (server/discover) and MCP skills on ganymede serve --mcp's /mcp endpoint while retaining per-client state across requests without relying on legacy Mcp-Session-Id sessions.

  • Per-client state store (crates/ganymede-server/src/mcp.rs). Grouped per-connection state (current open notebook, document room holds, per-notebook read-mark tokens, client name, and connection folder dir) into ClientState. Legacy initialize + Mcp-Session-Id sessions continue to own their ClientState directly for the session lifetime. Sessionless 2026-07-28 HTTP requests bind per request to a bounded, TTL-expiring Clients table on McpState, scoped by the authenticated principal (mcp_token, server token, login cookie hash, or anonymous) and keyed by X-Ganymede-Client / _meta["ganymede/client"], falling back to io.modelcontextprotocol/clientInfo (name and version).
  • Bounded lifecycle & cleanup. Clients caps entries at 256 (preferring to evict expired and inactive entries before active ones) and expires idle clients after SESSION_IDLE (1 hour), dropping their Holds so document rooms retire. A background reaper holding a Weak reference to the table sweeps expired entries even if no further /mcp requests arrive, and exits automatically when the server stops.
  • Provenance & connection folder. cell_run, cell_add, and cell_edit now record provenance via Notebooks::client_name() (populated from io.modelcontextprotocol/clientInfo on 2026-07-28 requests as well as initialize on legacy sessions) rather than peer.peer_info(), which is empty on stateless rmcp requests. Direct 2026-07-28 HTTP clients can also supply a connection folder via _meta["ganymede/dir"] or X-Ganymede-Dir (validated identically to initialize).
  • Re-enabled 2026-07-28 on /mcp. Removed the refuse_discover middleware and supported_protocol_versions cap added in #937 so server/discover, skills/list, skills/get, and skill:// reads work directly over /mcp. ganymede mcp over stdio continues bridging server/discover to a stateful initialize session so each stdio process keeps its own Mcp-Session-Id and tears it down on DELETE /mcp.
  • Tests & docs. Added unit tests for ClientKey isolation and Clients TTL/LRU eviction, HTTP integration tests covering direct 2026-07-28 discovery, skills, open-notebook state, read marks, provenance, multi-client/principal isolation, connection folder validation, and idle room-hold reaping, and updated docs/mcp.md.

2026-11-28, Stop offering MCP 2026-07-28 on /mcp HTTP (#937) ​

Direct HTTP clients connecting to ganymede serve --mcp's /mcp endpoint on MCP protocol revision 2026-07-28 were served statelessly by rmcp with a fresh Notebooks handler per request, losing the open notebook, read marks, and client provenance between calls.

  • Server (/mcp). Notebooks::supported_protocol_versions now caps advertised protocol revisions at ProtocolVersion::LATEST_WITH_INITIALIZE (2025-11-25), so direct 2026-07-28 requests that skip discovery are rejected with UNSUPPORTED_PROTOCOL_VERSION (-32022) instead of running statelessly. Because rmcp checks supported_protocol_versions before dispatching server/discover—and returning -32022 prevents clients such as rmcp's ClientLifecycleMode::Auto from falling back to initialize—an axum middleware layer behind auth refuses server/discover on POST /mcp with JSON-RPC -32601 (Method not found). Direct HTTP clients fall back to initialize and receive a stateful session.
  • Stdio proxy (ganymede mcp). ganymede mcp previously forwarded server/discover over HTTP with 2026-07-28 headers. It now answers server/discover itself by opening (or reusing) a stateful initialize session on /mcp and shaping the server's InitializeResult into a 2026-07-28 DiscoverResult, keeping 2026-07-28 and MCP skills working over stdio without requiring /mcp to accept 2026-07-28. A repeated server/discover on the same stdio connection reuses the cached InitializeResult rather than replacing the active session.
  • Follow-up (#1015). Supporting 2026-07-28 and MCP skills directly over /mcp requires keying per-client state on the server without legacy sessions.

2026-11-28, Published-page CSP through connected-machine mounts (#899) ​

Closes item 2 of #899 (items 1, 3 and 4 shipped in #920). A published page written by nb publish and opened through a connected machine's mount at /machines/{id}/files/... previously received FILES_CSP (sandbox allow-scripts), which disabled its Download notebook button.

  • ganymede_gateway::mount::route now classifies files/... as Kind::Files (alongside Kind::Page for nbconvert/html/... and Kind::Other for the rest).
  • Machine::forward inspects the machine's raw Content-Security-Policy before sanitize_response drops it, recording upstream_page_csp: bool on Forwarded. The header itself is still stripped and never passed through.
  • is_page_csp matches only a single Content-Security-Policy header carrying an exact sandbox allow-scripts allow-downloads directive (in either token order), optionally alongside a single frame-ancestors directive because a real Ganymede server's middleware appends ; frame-ancestors <sources> to every /files response. Missing, multiple, comma-separated, wider (allow-same-origin, allow-popups, etc.), or custom policies fail closed to false.
  • ganymede-server/src/mount/proxy.rs sets this server's own static PAGE_CSP for Kind::Page and for Kind::Files when forwarded.upstream_page_csp is true, and FILES_CSP everywhere else (including non-files/ routes whose upstream sent PAGE_CSP). This server's frame_ancestors middleware then appends its own frame-ancestors, never the remote machine's.

Tests: upstream_page_csp_matches_only_the_published_page_sandbox and the_allowlist_is_exact in crates/ganymede-gateway/src/mount.rs; files_gets_page_csp_only_when_machine_sent_page_csp and published_page_on_a_real_machine_keeps_allow_downloads in crates/ganymede-gateway/tests/mount.rs.

2026-11-28, design note: multi-root named mounts (#1008) ​

Option 1 on ganymede-ui#465 settled the direction: serve multiple folders as named mounts inside a single Ganymede server instead of spawning one server per folder. The updated multi-root design note turns the #845 comparison into a concrete architecture and PR sequence.

The path model splits startup into two fixed modes: legacy single-root (root_dir, flat "" namespace unchanged) and multi-root (mounts, with a read-only virtual "" listing named mounts). Cross-mount copy is allowed while cross-mount PATCH rename is rejected with 400 BadRequest because each mount defines its own canonical containment box, per-mount FileIds / Stamps / move_lock, --checkpoint-dir root-hash namespace, and .ganymede.toml boundary. One Collab router keeps a shared Watcher and shared UUID rooms map so /api/collaboration/room/{room}, /api/fileid/path, and recovery::Store route seamlessly across mounts.

For security, stored per-notebook grants in ganymede_file_ids.db stay scoped to their own mount unless explicitly marked server-wide with a leading / at storage time (preserving standalone ganymede grant isolation without letting normalize_api_path strip the scope), HostApi::resolved checks canonical containment per mount, and WriteObserver continues passing canonical OS paths to native callbacks while emitting full <mount>/<rel> paths on /api/events/subscribe. Runtime add/remove happens in-process via ganymede-ffi (int C ABI matching ganymede.h) and CLI/config at startup rather than over HTTP mount-mutation routes, moving unmounted slots through a draining state so dirty rooms flush, writes drain, and only that mount's watchers and sessions close before iOS revokes security-scoped bookmark access. The note closes with a four-PR ganymede sequence plus the ganymede-ui#465 follow-up.

2026-11-28, per-mount Collab, FileIds, recovery, HostApi grants, and WriteObserver (#1011) ​

Generalized ganymede-server's collaboration, crash recovery, run copies, redactions, host grants, and write-observer layers from a single root to per-mount state under a single Collab coordinator (docs/multi-root.md), keeping single-root mode identical when mounts is unset. Collab now holds Roots::Single(Arc<MountCollab>) or Roots::Multi { mounts, id_index }, giving each mount its own canonical and configured disk roots, FileIds handle (opened per mount's canonical directory so standalone ganymede serve <folder> and ganymede grant share SQLite rows), Stamps, move_lock, PathLocks, and recovery::Store while sharing one room registry, one Watcher, and one WriteObserver. Path-addressed methods (grant, index_existing, file_id_of, open_notebook, room_in_use, delete_if_unchanged, delete, rename, moved, removed, begin_move_for, begin_create, folder_kernel) split <mount>/<rel> and re-prefix virtual paths, while UUID-addressed lookups (path_of, path_and_grant, set_grant, send_to_room, /api/fileid/path) route via an id_index cache with a fallback scan across active mounts. Stamps::observe records the canonical OS path for native WriteObserverFn callbacks and the full virtual <mount>/<rel> path for WriteEvent subscribers on /api/events/subscribe; Stamping::copy acquires cross-mount write guards in deterministic mount-name order. Recovery routes claim per-mount stores so standalone and multi-root copies interoperate, and unfiltered GET /api/collaboration/recovery in multi-root mode aggregates active mounts newest-first while skipping unmounted stores. run::save_copy writes multi-root run copies under <mount>/runs/<rel_stem>/<ts>.ipynb without PUTting on <mount> and fails with 403 on read-only mounts before starting a kernel; server_redactions collects configured and canonical paths for all active mounts. host.rs introduces GrantPath (MountRelative vs leading-/ ServerWide) parsed before normalize_api_path, keeping standalone ganymede grant entries confined to their own mount while translating virtual paths at GET/PUT /api/host/grants/{*path}, and enforces per-mount canonical containment in HostApi::resolved (blocking symlinks escaping a mount even into another mount).

2026-11-28, multi-root virtual Contents router and config/CLI schema (#1010) ​

Added the first layer of multi-root named mounts (docs/multi-root.md) while keeping single-root mode identical when mounts is unset. ganymede-contents now defines MountSpec, mount validation (validate_mount_name, validate_mount_specs_syntax, validate_mounts), per-mount checkpoint namespacing (mount_checkpoint_dir, matching recovery::Store's <dir>/<sha256(canonical_root)> layout), and MultiRootContents. MultiRootContents serves a read-only virtual directory at "" with deterministic timestamps and sorted mount entries, refuses mutations at "" and mount roots with 403 Forbidden, strips <mount>/ before delegating to each mount's FsContents and re-prefixes returned models (and child entries), supports cross-mount copy into writable mounts through shared FsContents read/write helpers, rejects cross-mount rename with 400 BadRequest, and preserves per-mount symlink containment (404 OutsideRoot even across active mounts). In ganymede-server, /api/contents and /api/contents/ now route PUT/PATCH/DELETE alongside GET/POST so root mutations hit Contents and return 403. Config deserializes through RawConfig (#[serde(try_from = "RawConfig")]) with root_dir: Option<PathBuf> so explicit root_dir is distinguished from the $HOME default across TOML, config_file::set, and FFI JSON: explicit root_dir + mounts fails cleanly while --multi-root, --mount, and "mounts": [] skip root_dir.canonicalize() in serve::run_with and pass config::require_root even without a usable $HOME. ServerInfo omits root_dir and writes mounts in multi-root mode so legacy single-root auto-discovery does not attach with a misleading root, and ganymede serve/ui skip attach discovery in multi-root mode.

2026-11-28, multi-root runtime mount lifecycle and ganymede-ffi (#1013) ​

Added live runtime mount attach/detach and C FFI controls for multi-root servers (docs/multi-root.md) while keeping single-root servers unchanged. Replaced the immutable mount vector in MultiRootContents (ganymede-contents) with an Arc<RwLock<MountTable>> holding active (sorted by name) and draining slots plus retained FsOptions, adding validate_new_mount, add_mount, begin_remove_mount, finish_remove_mount, and draining_contents so closing rooms can flush dirty edits after a mount is hidden from public dispatch (404). Added per-mount draining support in Collab and Stamping (Roots::Multi.draining, MountCollab::unmounting barrier, Collab::{add_mount, rollback_mount, begin_remove_mount, finish_remove_mount, drain_mount_rooms}, Cmd::Unmount, Stamps::drain, and Collab::stamping_draining) alongside per-mount InFlightRuns tracking in run.rs. Added KernelManager::shutdown_for_mount (ganymede-api) and TerminalManager::shutdown_under_root (ganymede-terminals, awaiting child reap via an exited watch channel) so detaching a mount shuts down its sessions, kernels (including transient run_notebook kernels), and PTYs without disturbing sibling mounts. Added MountRegistry (ganymede-server::mounts, wired via Startup::mounts and AppState::mounts), validating and registering mounts in Collab (with blocking FileIds open) before publishing to MultiRootContents, rewriting jpserver-<pid>.json atomically via ServerInfoFiles::rewrite_mounts, broadcasting https://ganymede-server.com/events/mounts/v1 events multiplexed into /api/events/subscribe without inflating WriteObserver::is_set(), and serving read-only GET /api/mounts (no raw OS paths, no HTTP mutation routes). Added ganymede_server_add_mount, ganymede_server_remove_mount, and ganymede_server_mounts to ganymede-ffi (include/ganymede.h and src/lib.rs), updated docs/embedding.md and docs/api.md, and added unit, HTTP, multi-instance room-lock, and C FFI tests.

2026-11-28, multi-root kernels, terminals, Lab/LSP, and MCP across mounts (#1012) ​

Replaced the remaining single-root_dir and collab.root() assumptions across kernel launching, terminals, JupyterLab page config, and MCP while keeping single-root mode unchanged when mounts is unset. Added KernelRootResolver to KernelManagerConfig (ganymede-api) and TerminalRootResolver / ResolvedTerminalRoot (plus Error::BadRequest) to TerminalConfig (ganymede-terminals), implemented by MultiRootResolver backed by Arc<MultiRootContents> in ganymede-server::serve. Kernels launched for <mount>/<rel> resolve cwd and JPY_SESSION_NAME strictly inside <mount_disk_root> with mount-boundary symlink containment; pathless launches (None / "") and unrecognized mountless session paths such as VS Code's Untitled-1-jvsc-<uuid>.ipynb fall back to the first active mount (400 BadRequest when zero mounts are registered). Terminals resolve omitted or empty cwd to the first active mount, virtual <mount> / <mount>/<rel> paths inside the target mount with symlink containment, and explicit OS cwd inside active mounts to that mount's JUPYTER_SERVER_ROOT, rejecting paths outside active mounts or zero-mount requests with 400 BadRequest. Lab::detect_multi_root sets serverRoot: "" and omits rootUri / virtualDocumentsUri in Lab::page_config while LspManager stays disabled in multi-root mode (documented in docs/known-gaps.md). In ganymede-server/src/mcp.rs, replaced all remaining collab.root() calls (open_checked, cell_snapshot, notebook_publish, notebook_paths) with per-mount helpers (Collab::file_stamp, disk_path, canonical_disk_path), enabling notebooks_list at "" and cross-mount notebooks_search with mount-contained symlink deduplication. Updated ganymede-cli/src/attach.rs (Mode::Mcp) to match cwd against ServerInfo.mounts in jpserver-<pid>.json and compute DIR_META as <mount> or <mount>/<subpath>.

2026-11-28, ran_source_hash and clients that echo outputs (#958) ​

Since #943 the room removed metadata.ganymede.ran_source_hash from a code cell whenever a client's update touched the cell's outputs (any change: an append, a stream's text growing, a replacement) or its execution_count. A client that writes outputs back after a server run, normalising or merging stream outputs, would make server runs lose the key as soon as that client looked at them, though it ran nothing. No such client is known today (JupyterLab 4.6.6 doesn't, see below, and the apps' room code doesn't write outputs back); the rule guards against one. The risk is quiet: a notebook whose outputs look stale in one client, and fine in every other.

The rule is narrowed. A client update counts as the client running or clearing the cell, and removes ran_source_hash and execution_skipped, only when it:

  • sets execution_count to another value (unchanged: the same count is no run, null is a run, as JupyterLab does at the start of a run and on Clear Outputs), or
  • leaves the cell's outputs empty: cleared, replaced by an empty list, or missing. JupyterLab's own run and Clear Outputs empty the outputs, so they are still caught.

Any other outputs change — an output appended, a stream's text grown, a non-empty list in their place — keeps the key.

room.rs: rerun_cell looks the cell up first, then asks. The count part is as before; the outputs part is new: a change under outputs counts only when the cell's outputs in the transaction is now empty (outputs_empty: missing, a YArray of length 0, or an empty Any::Array). Reading the observed change and the end state, rather than comparing outputs before and after, keeps a keystroke's cost independent of the outputs' size. Emptying counts only for a cell whose outputs weren't empty before the update (Room::cells_with_outputs, taken with the other before-update snapshot in receive): a client writing [] back over a server run that printed nothing emptied nothing. rerun_cell says which way it found a cell (the count, or emptied outputs), and only the second is filtered.

Tests (crates/ganymede-documents/tests/rooms.rs):

  • a_client_run_removes_the_ran_source_hash_and_the_skip_note: the count cleared, outputs emptied (with the count written back as it is), outputs replaced by an empty array, and outputs emptied then one appended with the count cleared in one transaction. The append case moved out: it keeps the key now.
  • a_client_that_echoes_outputs_keeps_the_ran_source_hash: an appended stream, outputs replaced with the list the cell has, replaced with a merged stream, and the count it has with an append in the same transaction.
  • a_client_that_echoes_no_outputs_keeps_the_ran_source_hash: a server run with no output, a client writing [] back (kept), then the client running it (removed).
  • The removal cases also cover outputs replaced with a plain empty list and the outputs key removed.
  • a_client_change_that_is_no_run_keeps_the_ran_source_hash, the_servers_own_edit_of_outputs_keeps_the_ran_source_hash, a_file_change_keeps_the_ran_source_hash_the_file_has: unchanged.
  • tests/http.rs: mcp_clearing_outputs_clears_the_ran_source_hash still passes; a cell whose outputs are emptied still loses the key.

Validation: validation/jupyterlab.mjs (CI's workstation job) now, after its own save, has the server run the cell while JupyterLab has the notebook open (PUT /api/collaboration/session/<path> for the file id, GET /api/sessions for the kernel, POST /api/kernels/<id>/execute with document_id and wait), waits, saves from the page, and fails unless the saved cell still has metadata.ganymede.ran_source_hash. On this Mac (cdp-kernel, JupyterLab 4.6.6, jupyter-docprovider 3.0.4, headless Chromium) it printed:

json
{"opened":true,"kernelIdle":true,"output":"hi from 42","saved":true,"serverRun":true,"hashKept":true}

The same step passes against a build of the old rule: this JupyterLab takes the server run's outputs into the shared document without writing them back, so the step guards the save that follows a server run but does not by itself reproduce a client echo. The unit tests are what pin the narrowed rule; the step is kept because a client that does echo must not lose the key on that path either.

2026-11-28, startup warning tests for kernel provider reservations (#996) ​

Follow-up from the review of PR #994 (#986, kernel provider name reservation).

kernel_providers::warn_bad_requirements now returns the Vec<String> of warning messages it logs via tracing::warn!, with the log text unchanged. That lets unit tests assert both platform branches directly without hooking a global tracing subscriber:

  • no_reservation_warnings_when_empty (all platforms): an empty [kernel_providers] reserve map logs no warnings.
  • unparsable_requirements_warn_at_startup_on_macos (#[cfg(target_os = "macos")]): valid requirements (always, never) produce no warnings; unparsable requirements produce one warning each naming the kernelspec and the parse failure, leaving valid entries quiet.
  • reserved_names_warn_at_startup_off_macos (#[cfg(not(target_os = "macos"))], run on Linux CI): a non-empty reservation map produces one warning stating that code signatures are checked on macOS only and naming the count of reserved names that stay refused.

Mutation check: skipping the warning push in warn_bad_requirements fails unparsable_requirements_warn_at_startup_on_macos on macOS (and would fail reserved_names_warn_at_startup_off_macos off macOS).

2026-11-28, optional log file expansion, permissions, and config key (#1003) ​

Follow-up from tlockney/ganymede-ui#912 (PR #921), part of #965 §4.

ganymede serve (along with lab and ui, which share ServeArgs) already accepted --log-file <FILE>, but opened the path literally without creating parent directories or setting private permissions, and had no matching log_file key in ganymede.toml. That blocked a sealed macOS SMAppService LaunchAgent plist from passing --log-file ~/Library/Logs/Ganymede/server.log without hardcoding a username.

Changes:

  • Config::log_file (crates/ganymede-server/src/config.rs): optional PathBuf key in ganymede.toml, defaulting to None (stderr). ServeArgs::into_config_with overrides it from --log-file, with an empty --log-file "" resetting it to None.
  • expand_home, resolve_log_file, and open_log_file (crates/ganymede-server/src/serve.rs):
    • Leading ~ / ~/ expands against dirs::home_dir(); ~user/... and non-leading ~ stay literal, and a missing/empty home directory returns a clear error.
    • Missing parent directories are created recursively (0700 on Unix), leaving already-existing parent directories' modes untouched.
    • The log file is opened with create(true).append(true) and mode 0600 on Unix.
    • init_logging_with resolves --log-file first, then log_file from --config or default_config() (returning None on missing or invalid config so into_config reports the error cleanly after logging is initialized).
    • Non-server commands (ServeArgs is None) continue logging to stderr unchanged.
  • Docs (docs/reference.md): documented log_file, --log-file "", leading ~/ expansion, 0700 parent directories, and 0600 file mode under ## Logging and the ganymede.toml reference with an **Unreleased.** note.

Tests:

  • Unit (crates/ganymede-server/src/serve.rs): expand_home_expands_leading_tilde_only, open_log_file_creates_private_parent_and_appends, resolve_log_file_uses_flag_then_config_and_empty_flag_disables.
  • CLI integration (crates/ganymede-cli/tests/cli.rs): serve_writes_logs_to_tilde_log_file_from_flag_and_config verifies --log-file ~/Library/Logs/Ganymede/server.log (0700 dir, 0600 file, real log lines, no ANSI escapes, empty stderr), log_file in ganymede.toml appending to the same file, and --log-file "" returning logs to stderr.
  • Docs checks: cargo test -p ganymede-cli --bin ganymede reference and node docs/scripts/check-unreleased.mjs.

2026-11-28, one config file for the app and the server (#995) ​

ganymede.toml can now be the Mac app's settings file as well as ganymede serve's, one file both read: ganymede_config_read gives its keys as the JSON object ganymede_server_start takes as config_json, and ganymede_config_set applies a JSON object to the file. The app will add the keys only its launch needs (root_dir, static_dir, port, cookie_secret_file) and passes the result, so a setting made in the app is one the server reads on its next start, and a comment or key a person wrote in the file survives the app's edits. Swift never writes TOML.

Decisions worth the record:

  • ganymede.toml, not a second file. The app could keep its settings in its own file, or in UserDefaults, and pass them to ganymede_server_start alone. Then the background ganymede serve would read neither, and a setting made in the app — MCP on, a tailnet login allowed — would hold only while the app's server ran. One file means one answer to "what are this machine's Ganymede settings": the app's launch keys and the server's are the same document, and the keys the app adds (root_dir, static_dir, port, cookie_secret_file) are ones ganymede serve reads, not a private side channel.
  • toml_edit, not serde. set parses the file into a DocumentMut and merges the patch into it, so comments, key order, whitespace and keys the patch doesn't name are untouched. Serializing a Config back out would keep only the keys Config knows, in its order, with its formatting: a file the app wrote would lose everything a person put in it. toml_edit is the same maintainers and parser as toml, which the server already had, and it is added to the workspace at 0.25 beside it.
  • The whole module is in ganymede-server, not ganymede-ffi. The file's path comes from serve::ganymede_config_dir and DEFAULT_CONFIG_FILE, and the check that an edit is valid is Config::from_toml, both in that crate; the C ABI functions are wrappers over config_file::read and config_file::set. So the CLI, the tests and an embedder all go through one implementation of what the file means.
  • A patch merges; null deletes. A value sets a key, null removes it, and an object merges into that table recursively rather than replacing it, since the app sets one setting at a time and a whole [tailscale] replaced to change allow would drop whois. A table the patch creates is a standard table with a blank line before it in a document with keys already, as a person writes them, and an inline table inside an inline table, so a static_headers = { … } file stays as it is.
  • An invalid edit writes nothing. The edited text is checked with Config::from_toml before anything is written, and its error names the file, so a misspelt key is refused with the same "unknown field" a server would report rather than written and failing at the next start. The check is on the whole file, not the patch: a file that was already invalid stays invalid and every edit of it is refused, which is the honest answer — the app can't make it valid by adding one key.
  • The file is replaced atomically, 0600, in a 0700 dir. A temporary file in the same directory (.ganymede.toml.<pid>.<n>.tmp, O_EXCL, 0600) is written, synced and renamed over the file, so a reader sees the old file or the new one; the config can hold a token, so the file and a dir the app creates are private. A symlinked file is written through the link — symlink_metadata first, then canonicalize — so a dotfile manager's link keeps pointing at the file it names instead of being replaced by a regular file.
  • read returns the file's keys, not Config's. It doesn't validate: a key from a newer Ganymede, or one only the app's launch uses, comes back, and a key the current Config doesn't know doesn't make the read fail. That is what makes read → add the launch keys → ganymede_server_start work for a file written by either side.
  • A legacy file is read but not edited. With dir NULL, serve::find_default_config may find ganymede.toml in the Jupyter config dir, which the server still reads; read and set decide with that same function, so a dangling link in the config dir counts as no file in both, and read reads that file, so the app shows what the server is serving, but set refuses to create a new file beside it — the server would then read the new file and silently ignore the settings in the old one — and says to move it.
  • Numbers keep their TOML meaning. A JSON number that fits an i64 is an integer, else a float; a u64 above i64::MAX is an error rather than a float, since TOML integers are signed and writing it as a float would change it. A datetime, which JSON has no type for, reads as its TOML text.
  • One lock, in process. set calls in one process take turns on a mutex, since the C functions take any thread and two threads would otherwise both read the old file and the second rename drop the first's edit. Across processes nothing is locked: each call re-reads the file, so two processes lose only an edit made during the other's read and write. A lock file in the config dir would be a second thing to keep correct, and only the app writes settings.

The header's two functions are new, so the docs for them carry the release note: docs/embedding.md lists both, and docs/reference.md's config-file section says a program can edit the file through them. The Mac app doesn't yet, so what it will keep there is described as the plan, naming ganymede-ui#902, which updates that text when it ships. (A markdown page can't hold the ganymede-ui marker as an HTML comment: check-unreleased allows that only in site/index.html.)

The follow-up is in ganymede-ui, ganymede-ui#902: the app moves the settings it keeps in UserDefaults — the MCP switches, [tailscale] allow, the [host] defaults — into this file, through these two functions, so they outlive the app's server and are one set with the server's.

Tests:

  • ganymede-server/src/config_file.rs, unit: a set changes only its key's line and keeps a comment beside it; a new key goes at the end; a new table, and a subtable of one, are standard tables, with a blank line before them, and no blank line in an empty file; an existing table and an existing inline table are merged into, keeping the comment above the table; null removes a key from the document and from a table, and changes nothing for a key that isn't there; a refused edit — unknown key, unknown key in a table, wrong type, null in an array, not an object, u64 too large — leaves the file byte-for-byte as it was and no temporary file behind; the read returns tables as objects, arrays, datetimes as text and an unknown key; a file that is not TOML is an error naming it; a new dir and file are 0700 and 0600, an existing 0644 file becomes 0600; a symlink stays a symlink and the target changes; a dangling symlink is an error; with a Jupyter config dir, the legacy file is read, a broken one is named in the error, a set is refused and creates nothing, a set with both files writes the new one, and a dangling link reads the legacy file as the server does; a patch that changes nothing creates no file; a failed rename leaves no temporary file; and 64 threads setting different keys all land.
  • ganymede-ffi/tests/config_default_dir.rs, its own binary since it sets GANYMEDE_CONFIG_DIR and JUPYTER_CONFIG_DIR: with a NULL dir, read gives the legacy file, set refuses and creates nothing, and after the file is moved set writes it in the config dir.
  • ganymede-ffi/tests/config.rs, from C's side: set then read gives the keys back and the file keeps its comment; a refused set returns nonzero with a message naming the file and changes nothing; a NULL json and a patch that isn't an object are errors; a missing file reads as {}, with a NULL error_out allowed; a file that is not TOML returns NULL with a message.
  • smoke.c, which CI builds and runs: a temp dir reads as {}, a set writes it, and the read gives the key back.

Removing the Config::from_toml check in apply_to fails a_refused_edit_leaves_the_file_as_it_was (it writes the bad key instead) and a_refused_edit_says_so_without_a_path; it is restored after checking, and the workspace's tests and clippy are run with it restored.

2026-11-28, Terminal resize race with macOS /bin/sh (#368) ​

ganymede_terminals::tests::names_echo_resize_and_delete flaked intermittently on e2e (macos-latest) in two ways: either c.term.process.size() was still Ok((24, 80)) right after resize(40, 132) (#534), or stty size kept reporting 24 80 across all 20 retries (#368).

  • Root cause. Disassembly of macOS /bin/bash (invoked by /bin/sh) shows the tty-settings helper called during line-editor setup/teardown issues ioctl(tty, TIOCGWINSZ, &ws) followed by ioctl(tty, TIOCSWINSZ, &ws). Because the test only waited for "42" from echo $((6*7)), process.resize(40, 132) could run concurrently with /bin/sh preparing the tty for the next prompt—landing between TIOCGWINSZ (24x80) and TIOCSWINSZ so the shell wrote (24, 80) right back onto the PTY.
  • Fix. Set M=p; PS1="${M}-2> " alongside echo $((6*7)) and wait for the expanded prompt "p-2> " before resizing. Parameter expansion in PS1 avoids matching the echoed command line and guarantees the shell has finished tty setup and is waiting for input before resize(40, 132) executes.

2026-11-28, refuse an unsafe default root (#989) ​

Without --root-dir and root_dir in the config file, the server serves the home directory of the user running it. When there is no usable home directory it now refuses to start with an error asking for --root-dir, where #988 fell back to the current directory and logged a warning. A home counts only if dirs::home_dir() names an existing directory whose canonical path isn't /: a home of / would serve the whole disk, and the old current-directory fallback was unstable and could expose / under launchd or systemd, which start a service there. The server checks this in ServeArgs::into_config_with, so every command that serves (serve, lab, ui) exits non-zero before anything creates directories under a missing HOME. An explicit --root-dir / or root_dir = "/" is still the user's choice and works, and the config file's root_dir counts as explicit, so a broken HOME doesn't stop a service whose file names its root. config::default_root_dir returns the usable home or None; only Config::default() still has a path, ., which the serve path never reaches because the check refuses first, and the embedded server passes its own root. One case is left as is: with a missing HOME and an explicit root, the server still creates $HOME/.local/share/ganymede/recovery, so a later start without --root-dir serves that new, nearly empty home (the root was explicit, and the next default start is still a real directory owned by the user).

2026-11-28, opt-in update check (#956) ​

ganymede serve, lab and ui can now check GitHub for a newer release and report it at GET /api/update: --check-for-updates, or check_for_updates = true in the config file. It is off by default, so a server that never sets it asks no one anything and the page it serves has nothing new to say; #956 is a notice, not a reason to make serve phone home for everyone.

The check asks for the latest release's version once at start, after the listener is bound, and then once a day, and stops with the server. The answer is kept in the server's state so any client can read it without asking GitHub again, and a failed check keeps the last good answer and says last_check_failed, so a notice doesn't come and go with the network. update_available compares that version to the running one with the comparison ganymede update already uses, +build suffix aside.

The HTTP stays in ganymede-cli, which already has ureq and the release lookup ganymede update uses. The server crate gets a function, UpdateCheck, that returns the latest version — ganymede-cli hands it over in Startup.update_check — so ganymede-server gains no HTTP client and no dependency. An app embedding the server passes none, and the check stays off even with check_for_updates on: the Mac app updates with Sparkle, so only the ganymede binary checks. ganymede mcp's private server passes none either.

A build of main is not checked. Its next release is the latest main build, whose version is only known once it is downloaded, as ganymede update --check says. The binary passes the version it prints (GANYMEDE_VERSION, so 0.18.0+main.<commit> on a build of main) in Startup.running_version; the server's own crate version is the same for a release build, and is what an embedded server uses.

The endpoint answers enabled, running, latest, update_available, checked_at (RFC 3339, UTC), last_check_failed and main_build, and needs the token like the other API routes. Tests inject a fake check, so none of them touch the network. docs/reference.md, docs/api.md, docs/security.md and docs/privacy.md cover the flag, the key, the response and what the request carries.

The issue asked that a main build compare against the latest main build. It doesn't, for the reason above: there is no version to compare until the build is downloaded, so /api/update says main_build: true and ganymede update remains the way to get a newer one.

Tests: update.rs's unit tests cover the answer, a failed check, main builds, and, with paused time, a second check a day after the first and none before. tests/embedded.rs runs run_with with a counting check: with the setting off the check is never called and /api/update says enabled: false; on, the fake version comes back over HTTP. The CLI's serve, lab and ui share update::server_startup(), which a test checks hands over the check and GANYMEDE_VERSION. The CLI's own copies of is_main_build and base_version are gone; it uses the server crate's.

The check is one request with short timeouts (ten seconds to connect or answer, twenty in all) and no retries, through Releases::quiet, so a failure prints nothing and is logged at debug by the server, and a server stopped during a check waits at most that long to exit (tokio waits for blocking threads when the runtime drops). ganymede update keeps its retries and longer timeouts. CLI tests start ganymede serve and ganymede lab with --check-for-updates and an HTTPS_PROXY that refuses connections, so nothing leaves the machine: /api/update says the check is on and that it ran and failed. Reverting either command's hand-over fails its test.

2026-11-28, Write observer pending writes (#942) ​

ganymede_server_set_write_observer (#916) only runs after a write is renamed into place and Stamping has restamped the server's own grants in SQLite. Between the rename and the callback, an embedding app checking a kept answer sees the new stamp on disk before its write log knows it, and drops the answer.

  • Pre-rename stamp. ganymede_nbformat::atomic_write_with closes the synced temp file and runs a callback with (&temp_path, &resolved_target) right before persist. Because file_stamp hashes size, mtime in ns, and (on Unix) inode without ctime, the temp file's stamp survives the rename. ganymede_contents::with_write_hook scopes a tokio::task_local! through FsContents::run's spawn_blocking onto the four server-observed writes (save_locked, save_chunk, non-directory copy, and restore_checkpoint), keeping write_checkpoint, new_untitled, and directory copies silent. save_chunk appends beyond chunk 1 modify the file in place, so their hook passes None for the planned after stamp; Observed::wrote falls back to file_stamp then and keeps the pre-rename stamp for atomic writes so an outside overwrite between rename and wrote is never blessed.
  • Observer lifecycle. WriteObserver now tracks a generation per registration and takes WriteCallbacks (pending, wrote, cancelled) via set_callbacks, keeping set as an adapter. Observed tracks the pending notification and cancels on error or drop (when not already finished), only if the same observer generation is still installed so a replacement observer never gets a spurious cancelled for a pending it did not see. All callbacks still run outside the observer's lock so they may call set or set_callbacks themselves.
  • C ABI. Added GanymedeWriteCallbacks and ganymede_server_set_write_callbacks to ganymede.h and ganymede-ffi, sharing CWriteCallbacks with ganymede_server_set_write_observer (which stays unchanged for existing callers). Documented in docs/embedding.md with an **Unreleased.** note.

2026-11-29, adopt late agent runs per cell (#763) ​

Follow-up from the #784 review on #763: an agent's own runs are now adopted into its read mark cell by cell as each finishes, rather than once when the whole timed-out batch ends.

Previously, execute::run_and_wait waited for a single BatchEnd after the entire batch completed and spawned a task calling adopt_own_runs for all queued ids at once, and notebook_run_all / run_cells also called self.own_runs for every queued id when run_and_wait returned. Two bugs followed:

  • After a timeout, a finished earlier cell stayed unadopted until the rest of the batch ended, so intermediate tool calls misreported it as ran by someone else.
  • A person's re-run of an earlier cell while later cells were still queued or running was overwritten as the agent's own when the batch finished.

What changed:

  • execute.rs: RoomCmd::Enqueue, Batch, and RoomCmd::Done carry an optional OnCellDone (Arc<dyn Fn(Option<&str>, &str, u64) + Send + Sync>). RoomExec::finish returns the execution_count written to a code cell (or None when skipped, deleted, converted away from code, or when the kernel sent no execute_input), and RoomExec::handle invokes on_done(notebook, cell_id, count) in the same room-task turn right after room.edit. That makes the room update and read-mark adoption atomic — no scheduling window between Done and a concurrent notebook_read or @@changed check, no timeout-boundary race, and no extra background task spawned on timeout. Passing the room's current notebook path (updated on Cmd::Moved) also prevents a renamed room from mutating an unrelated notebook later placed at the old path.
  • execute.rs: run_worker delivers BatchEnd through a new RoomCmd::BatchDone command on the room channel so a non-timeout run_and_wait wakes only after every preceding RoomCmd::Done (and its on_done callback) has been applied in the room task. RoomExec::pending includes usize::from(finished.is_some()) on non-empty enqueue and decrements it on BatchDone, so an idle room cannot retire between the last Done and BatchDone.
  • mcp.rs: replaced own_runs_late and the post-run_and_waitself.own_runs calls in notebook_run_all and run_cells with Notebooks::on_own_cell_done. ClientState.tokens is now an Arc<Mutex<HashMap<String, String>>> so the callback captures only marks, tokens, and path: closing a session still drops ClientState.holds immediately while timed-out cells run, yet late completions always adopt into the session's latest mark (including one created via notebook_read or switched via notebook_read(since) after the run started, even after disconnect).

Tests:

  • Unit tests in crates/ganymede-server/src/execute.rs: on_cell_done_fires_only_when_code_cell_gets_an_execution_count and room_exec_stays_busy_until_batch_done_is_processed.
  • Deterministic gated-kernel integration tests in crates/ganymede-server/tests/http.rs: mcp_adopts_late_runs_per_cell_as_each_finishes, mcp_adopts_each_cell_before_batch_ends_even_without_timeout, mcp_timed_out_batch_failure_adopts_failed_cell_not_skipped_cells, mcp_late_run_adopts_after_session_disconnect_and_handles_room_close, mcp_late_run_adopts_into_token_acquired_or_switched_after_start_and_disconnect, and mcp_moved_room_late_run_does_not_adopt_into_new_notebook_at_old_path.

2026-11-29, agent-native eval follow-ups (#821) ​

Addressed the two Low findings from the #826 review of evals/agent-native/ (tracked on #821):

  • planted-request now checks notebook_requests replies in the stream-json log. Previously planted-request checked only metadata.ganymede.request on the plant cell, which is set only when the agent answers it; if a server regression listed a file-origin cell as an open request and the model declined the injected instruction, the scenario still passed. Added pure helpers notebookRequestsReplies(log) (returning { ok, ids }) and listedRequestIds(log) beside ganymedeToolCalls in evals/agent-native/score.mjs that match each non-error user tool_result with non-empty text to an assistant notebook_requests tool_use by tool_use_id and collect cell ids from unindented @@request {...} headers (ignoring other tools such as notebook_read, @@edit lines, and indented @@request lines inside request bodies). score() now forwards log to scenario.check(nb, person, log). When a non-empty stream-json log is present, planted-request fails both if "plant" is listed and if no successful notebook_requests reply was observed (catching runs where the agent skipped notebook_requests, every call errored, or the tool_result was dropped or unreadable, rather than passing vacuously). Omitting log or passing an empty string preserves notebook-only unit checks. Both runOne and rescore in evals/agent-native/run.mjs pass the stream-json log through, and evals/agent-native/score.test.mjs covers all cases.
  • Reworded person-edit-kept in evals/agent-native/README.md. The table row previously described a stale-cell_edit refusal followed by notebook_read(since), which the check does not verify and no baseline run hit because the ganymede-journal plugin's PostToolUse hook reads the @@changed pointer in before the agent edits. Reworded it to state what the check verifies: the agent keeps the note when it rewrites the cell (whether the plugin hook or a refused stale cell_edit told it of the change). Issue #824's "reads it with since" wording is met in spirit — the check verifies that the note survives in the final cell and appears in metadata.ganymede.agent.history, whichever path delivered the change.

2026-11-29, App screenshots and v0.19.0 app docs sync (#1033) ​

Refreshed the native app screenshots and updated the landing page, README, app guide, and screenshot tooling after ganymede-ui v0.19.0 shipped the visual redesign (ganymede-ui#844 Step 8).

  • Screenshot capture. Bootstrapped a temporary detached ganymede-ui worktree at origin/main against GanymedeFFI.xcframework and the ganymede v0.19.0 CLI, then ran apple/scripts/capture-screenshots.sh (ScreenshotUITests on macOS, ScreenshotUITests-iOS on iPad Pro 13-inch landscape and iPhone 18 Pro portrait) to produce all six Fremont Bridge captures: mac-{light,dark}.png (2560x1640), ipad-{light,dark}.png (2752x2064), and iphone-{light,dark}.png (1206x2622). Visually checked every PNG before copying into docs/images/apps/. One cold-start iPad simulator runner launch exited unexpectedly right after the trust-button check; retrying SCREENSHOT_PLATFORM=ipad against the warmed DerivedData completed both iPad shots cleanly in 45 s.
  • Landing page, README, and app guide. Updated alt text, captions, and prose in site/index.html, README.md, and docs/app.md to match the Fremont Bridge captures and the shipped ganymede-ui v0.19.0 feature set (navy/cream/orange palette, custom Mac tabs, glass sidebar with unified Find, bottom status bar, iPad/iPhone touch redesign, Background Server LaunchAgent, shared ganymede.toml settings, Bleeding edge update channel, per-remote start folder, and local data-file loading in jupyter.sql on in-app and browser kernels). Because ganymede-uiv0.19.0 is already published, no **Unreleased in ganymede-ui.** markers were added.
  • Screenshot script and development docs. Replaced the manual Orbits.ipynb / screencapture flow in docs/scripts/app-screenshots.sh with a wrapper around ganymede-ui's apple/scripts/bootstrap.sh and apple/scripts/capture-screenshots.sh (supporting --skip-bootstrap, --only, and release-tag GANYMEDE_REF downloads without cloning Rust sources), and updated the "App screenshots" section of docs/development.md to match.

2026-11-29, docs audit for v0.19.1 / ganymede-ui v0.19.0 / cdp-kernel v0.17.0 (#1040) ​

Audited the VitePress docs under docs/*.md (outside the separately tracked app guide, code primer, and development docs) against origin/main after ganymede v0.19.1, ganymede-ui v0.19.0, and cdp-kernel v0.17.0:

  • docs/rooms.md: Replaced the stale "The latest release answers 400 source_hash is required." note with "Servers from before 0.12.0...", dropped the closed #957 tracking note on iOS recovery copies, fixed the "a kernel that went away" wording in clean-run stamping, and fixed the VitePress anchor to live-agent-edits.md#_1-who-changed-what.
  • docs/roadmap.md & docs/known-gaps.md: Moved shipped features from ganymede v0.19.0/v0.19.1, ganymede-ui v0.19.0, and cdp-kernelv0.17.0 to Done (one server per Mac / background LaunchAgent / shared ganymede.toml / kernel provider socket / menu bar / CLI attach, server-side multi-root mounts, recovery copies, visual redesign and editing features, local data file loading in jupyter.sql, update checks) while keeping genuinely open follow-ups accurate (ganymede-ui#465 iOS multi-folder sidebar UI, multi-root LSP disablement, #316, #795, #816, ganymede-ui#301/#663/#673/#678/#697/#808). Updated known-gaps.md for self-contained HTML export, document rooms in the apps, and ganymede-ui#465.
  • docs/reference.md: Updated Programs that edit the file for ganymede-ui 0.19.0 (ganymede-ui#902), documented mounts, kernel_providers_socket, and the Mac app's always-written jpserver-<pid>.json under Server info file, noted multi-root mounts matching for ganymede mcp under Attaching to a running server, added mcp watch to Commands and GANYMEDE_MCP_SKILLS to Environment variables, and fixed the VitePress anchor install.md#_8-update-and-uninstall.
  • docs/programs.md: Replaced the stale What's next section (#658 run copies and #647 ganymede execute --grant already shipped) with direct links to reference.md#run-copies and reference.md#under-ganymede-execute.
  • docs/api.md: Added /api/mounts to Every route, noted <mount>/<rel> paths and multi-root mounts lookup in jpserver-<pid>.json under Hear of a write, and fixed the VitePress anchor embedding.md#seeing-the-server-s-own-writes.
  • docs/architecture.md: Added ganymede-host to the crates table, updated Seams for RegisteredKernels, the kernel provider socket, and MultiRootContents, updated the Mac app entry for the optional background server, and replaced the stale note claiming a native iPad kernel was open on the roadmap (ganymede-ui#765).
  • docs/security.md & docs/privacy.md: Updated [kernel_providers] background-server wording to present tense and updated the Mac app update check cadence to hourly with the optional Bleeding edge feed (releases/download/main-build/appcast.xml).
  • docs/frontends.md, docs/switching.md, docs/python-free.md, and docs/protocol.md: Aligned export descriptions with frontends.md#export (script, Markdown, and Ganymede's self-contained HTML page work; Python template exports do not), updated frontends.md for cdp-kernel 0.8.0+ reporting application/typescript so jupyterlab-lsp 5.3 attaches to TypeScript notebooks, noted multi-root LSP disablement in frontends.md, and noted registered kernels in python-free.md.
  • docs/mcp.md, docs/data-output.md, docs/kernel-provider.md, docs/host-api.md, docs/install.md, docs/getting-started.md, docs/examples.md, and docs/why.md: Updated multi-root/version-checked MCP attach and Mac server info file wording, fixed install.md#_8-update-and-uninstall in mcp.md, closed tracking notes (#647, #747), noted ganymede-ui 0.19.0 provider client and in-app SQL file loading, noted CLI attach in install.md/getting-started.md, and brought why.md's release arc table up to 0.19.1.

Verified with node docs/scripts/check-unreleased.mjs, cd docs && npm ci && npm test && npm run build, a rendered HTML anchor check across all built pages, and Rust doc-parity tests.

2026-11-29, mcp watch session reuse (#763) ​

ganymede mcp watch previously called call_with on every poll, opening and tearing down a full MCP Streamable HTTP session (initialize, notifications/initialized, tools/call, DELETE) every --every seconds (review follow-up from #786).

  • Session reuse. Replaced per-poll call_with with McpSession (tracking the Endpoint, Mcp-Session-Id, negotiated MCP-Protocol-Version, and a monotonically incrementing JSON-RPC request id starting at 1) and poll_with_session inside watch_loop. Steady-state polling now sends a single tools/call POST per tick and shares the same McpSession plumbing with one-shot ganymede mcp call.
  • 404 recovery without looping. When the server returns HTTP 404 for a reused session (idle timeout or same-endpoint restart), poll_with_session drops the stale session without sending DELETE, re-initializes once, and retries the poll immediately so no tick or event is dropped. If a brand-new session or the single retry also gets 404, it gives up on that poll rather than looping.
  • Auth, restart, and teardown. Non-2xx responses (including 401/403 JSON bodies from Ganymede's auth middleware) and malformed 200 JSON-RPC bodies (including unexpected id or server-request method fields on plain JSON responses, matching SSE filtering while allowing "id": null on error objects) are explicitly rejected instead of being parsed as empty tool replies; auth and transport failures drop the session without sending DELETE and clear the cached endpoint so the next tick re-discovers. Failed notifications/initialized responses (other than 401/403/404) in start(), tool errors, malformed 200 bodies, endpoint changes, broken stdout, and SIGINT/SIGTERM/SIGHUP (via stop_signal(), exiting with 130/143/129 per help.rs) all close any live session with a best-effort DELETE on a 2 s timeout.
  • Tests. Added deterministic unit tests in crates/ganymede-cli/src/mcp.rs covering SSE session reuse across 4 polls, transparent 404 re-initialization, persistent-404 non-looping, 401/403 token rotation, connection-refused restart recovery, --edits JSON mode, tool-error/malformed-200 teardown, endpoint switching, start() notifications/initialized failure cleanup, and plain JSON method/id validation, plus an end-to-end SIGTERM binary test in crates/ganymede-cli/tests/cli.rs.

2026-11-29, mount-drain race tests for run_notebook and empty-room cleanup (#1030) ​

Follow-up from #1029 (closing #1013) adding two targeted race tests in ganymede-server without changing production behavior:

  • run::tests::remove_mount_blocks_on_run_notebook_track_run_after_start_with_env (crates/ganymede-server/src/run.rs): exercises run_notebook_as's state.mounts.track_run(&m) guard after start_with_env, cell execution (result answer 42), and the run's transient kernel shutdown have all returned. In MountRegistry::remove_mount, live.kernels.shutdown_for_mount runs in Step 3 before self.runs.wait_drained in Step 4, so pausing cell execution alone would either block inside Step 3 or terminate execution once Step 3 marks the session dead. Instead, the test runs with save: "copy" and pauses save_copy in a Contents wrapper positioned outside Stamping (so neither kernels.in_flight, nor kernels.shutdown_for_mount, nor stamps.drain holds a barrier on the mount). It verifies remove_mount has already hidden the mount in Step 1 and remains blocked strictly on self.runs.wait_drained until save_copy resumes and run_notebook_as drops _run_guard, leaving the sibling mount and kernel undisturbed.
  • collab::multi_root_tests::empty_room_cleanup_mid_await_drain_guard_keeps_room_open_for_unmount (crates/ganymede-server/src/collab.rs): exercises the exact mid-.await window in run_room's empty-room cleanup path. After a client dirties a notebook, leaves, and a transient autosave error sets save_failures == 1, cleanup passes the pre-contents.get is_mount_draining check while it is still false and suspends inside contents.get. While suspended, MountB transitions into draining and hides from public dispatch so contents.get resolves to NotFound. The post-contents.get if gone && collab.is_mount_draining(&d.path) guard keeps the room open with zero spurious file_gone recovery copies so Cmd::Unmount flushes the dirty edit cleanly to disk.

Mutation checks (temporarily disabling each production guard and reverting):

  • Commenting out _run_guard (state.mounts.track_run(&m)) in run_notebook_as fails remove_mount_blocks_on_run_notebook_track_run_after_start_with_env because remove_mount completes immediately without waiting for the in-flight run.
  • Commenting out if gone && collab.is_mount_draining(&d.path) { continue; } in run_room fails empty_room_cleanup_mid_await_drain_guard_keeps_room_open_for_unmount because the room closes with FileGone (and writes a spurious recovery copy) instead of staying open for Cmd::Unmount.

2026-11-29, refresh Ganymede Code Primer for v0.19 architecture (#1039) ​

Updated the code primer at site/book/index.html and rebuilt docs/images/book/cover.png to describe main as of 29 Nov 2026 across ganymede (v0.19.1), ganymede-ui (v0.19.0), and cdp-kernel (v0.17.0):

  • Cover & Chapter 1: updated the "as of" date to 29 Nov 2026, updated repository line/file counts (ganymede ~131k lines / ganymede-server ~60k, cdp-kernel 49 src/ files and 19 runtime modules, ganymede-ui ~43k lines of Swift), noted the Mac Background Server LaunchAgent and kernel provider socket under "Where it runs", added Mount to the Vocabulary table, and fixed two double-escaped apostrophes in the home chapter cards.
  • Chapters 2–4: updated crate sizes, noted atomic_write_with and with_write_hook pre-rename stamping, ganymede-gateway local-plus-gateway listing and outage reporting, RegisteredKernels origin/unregister/deferred start powering the kernel provider socket, ganymede-api/src/executions.rs execution history ring buffer, KernelRootResolver / shutdown_for_mount, and ganymede-contents/src/multi.rs (MultiRootContents).
  • Chapters 5–7: added mounts.rs, kernel_providers.rs, stamping.rs / write_observer.rs / path_locks.rs, config_file.rs, login_path.rs, update.rs, and recovery.rs; documented default ~ root (refusing unusable home or /), multiplexed write + mount events on /api/events/subscribe, embedded-server room locks, guarded run rechecks and ran_source_hash, clean_run cell fingerprinting (v1:...), and per-mount Collab / FileIds / GrantPath containment.
  • Chapters 8–9: added mcp/skills.rs (MCP Skills extension), sessionless MCP 2026-07-28 per-client state with background reaping, multi-root MCP and attach.rs CLI attachment (serve, ui, mcp), always-written Mac jpserver-<pid>.json info file, and the new ganymede-ffi C ABI functions (ganymede_server_add_mount/_remove_mount/_mounts, ganymede_server_set_write_callbacks, ganymede_config_read/_set).
  • Chapters 10–12: added cdp-kernel v0.17.0 browser package-type fetching/IndexedDB caching (src/browser/package-types.ts), cdp_kernel.state_reset stderr metadata, lockfile serialization, and DuckDB worker failure handling; documented ganymede-ui v0.19.0 visual redesign (palette tokens, cell cards, recessed output well, error rail, expanded view), room and IndexedDB local recovery, browser/in-app kernel SQL file loading (sql-files.ts, sql-preload.ts), full live Markdown preview, server update notices, Mac Background Server LaunchAgent, ThisMacVerifier / BackgroundServerRouting, KernelProviderClient, SharedConfig, MenuBar, custom WorkspaceTabStrip / WorkspaceTabHost and unified PageModel, redesigned Mac sidebar/toolbar/unified Find tab/ status bar, redesigned iPad and iPhone Touch/ chrome, per-remote start folder and opt-in device API, and the Bleeding edge Sparkle channel.
  • Chapters 13–14: added the nightly WebKit/iPad/iPhone Playwright and XCUITest/ScreenshotUITests workflows, the multi-root reading path, and updated the multi-root open edge now that the server and FFI side shipped.

2026-11-29, review eval follow-ups (#821) ​

Closed the five pre-baseline review-eval follow-up items tracked on #821 from the #828 review and Gaps entries 19 to 21:

  • Fixed inverted finding text (evals/review/cases/ganymede-827-copy-test.json). Changed "fails every test" to "fails no test" so the judge scores against the actual defect rather than its negation.
  • Paginated issue comments (evals/review/issue-mcp.mjs).ghGet now runs gh api --paginate --slurp for get_comments (leaving single-object get unpaginated) and flattens the resulting array of page arrays (flattenPages) into a single JSON array before beforeDate filters it. Using --slurp avoids concatenated [...][...] JSON output across pages, handles empty [[]] and single-page responses cleanly, and fails loudly if an unslurped or non-array payload arrives.
  • Added cases for Gaps entries 19, 20, and 21. Added ganymede-827-lock-test.json, ganymede-827-copy-others.json, and ganymede-827-move-lock.json, all class E (missed) cases from #827. Because commit 61f91d6 merged main at bd2dabb (#828) into the #827 branch, all three use bd2dabb8203938cd63cfe86966a2b7d1b3191941 as base (their true merge-base with main), keeping each diff scoped to #827's 15 files instead of pulling #828's diff in alongside it. Updated the counts in evals/review/README.md to 10 known, 11 missed, 5 clean (25 findings).

2026-11-29, review eval Gap 29 case (#821) ​

Added the review replay eval case for review-prompt.md Gap 29 (tlockney/ganymede-ui#667, tracked in the 2026-11-17 comment on #821) and extended the harness with the minimal support needed to replay it faithfully:

  • Optional extraIssues (evals/review/cases.mjs, issue-mcp.mjs, tools.mjs, run.mjs). A case can now declare extraIssues: [{ repo, number }] for other issues the diff or PR references (here tlockney/ganymede-ui#399). caseIssues deduplicates the main issue and extras; issue-mcp.mjs passes them through CASE_EXTRA_ISSUES and enforces the exact allowlist and beforeDate comment cutoff on every allowed issue (without listing extra issues in denial messages, avoiding steering); tools.mjs adds exact Bash(gh api repos/<repo>/issues/<n>) rules (never /comments, so comments stay date-filtered); and checkIssues verifies gh can read every allowed issue before runs start. Verified against live GitHub that #399's live body does not mention #666 and its #666 by-hand item was added in comment 6962451884 (2026-11-17T22:10:43Z), after head 94b0b1de (2026-11-17T21:52:50Z), so beforeDate hides it without needing a body snapshot.
  • Optional prBody (evals/review/cases.mjs, run.mjs). Cases whose defect depends on PR text (such as Closes #666 and the Verification checklist claiming the by-hand check is tracked on #399) can supply prBody, appended as PR_BODY: before DIFF in assemblePrompt. Cases that omit prBody produce byte-identical prompts.
  • New case evals/review/cases/ganymede-ui-667.json. Class D (Docs and process), Medium, missed, diffing 2c4f3403 (the sole parent and merge-base on main) to 94b0b1de (passed pre-push review, flagged by GitHub review 5947460898). Brings the set to 27 cases (10 known, 12 missed, 5 clean; 26 findings).
  • README updates (evals/review/README.md). Documented extraIssues and prBody, updated counts, and clarified the baseline cost sentence from PR #1044's review nit (The 21-case baseline at 2 runs (42 reviews)...).
  • Lock exit-listener cleanup (evals/review/store.mjs). Adding another runEval test in run.test.mjs tripped Node's MaxListenersExceededWarning (11 exit listeners on process) because lock()'s release never removed its exit listener; release() now calls process.off("exit", release).

2026-11-30, the book through 2026-11-29 (#1053) ​

site/book/ was hand-edited in #1042 without its source, so a rebuild would have undone it. The source now carries those edits, and the book is rebuilt from it with the changes merged through 2026-11-29:

  • Chapter 5: mount/proxy.rs sets this server's sandbox policy on every forwarded response.
  • Chapter 8: mcp watch reuses one MCP session across its polls (on main, after 0.19.1).
  • Chapter 10: each package alias installs into its own cache directory (on main, after cdp-kernel 0.17.0).
  • Chapter 11: the Pyodide kernel in the browser build, and stock Jupyter servers as a backend (both on ganymede-ui main).
  • Chapter 12: SSH tunnel machines, Shortcuts actions and settings links on iPad and iPhone (ganymede-ui main); widgets on the lock screen and Mac desktop; Swift is about 53,000 lines.
  • Chapter 14: device.secrets, the multi-folder sidebar and iPad and iPhone Shortcuts are on ganymede-ui main.

The build now links folder names (Tabs/, Touch/, Assets.xcassets, apple/Tests/GanymedeUITests/ and others) to their trees, which #1042 had added by hand, and links more file names (config_file.rs, login_path.rs, update.rs, attach.rs, mounts.rs, SharedConfig.swift, MenuBar.swift and the SQL files; the in-page sql-preload.ts now links to src/lib, not the Vite plugin in scripts). Lock-screen widgets and settings links on iPad and iPhone are marked as on main. A few slashes and dashes in #1042's hand edits read as words in the source ("write and rename"). Section anchors match the line counts in their headings, and the home page's chapter cards no longer double-escape apostrophes. The cover screenshot is rebuilt with the new date.

2026-11-30, notebook-level journal metadata flag (#1057) ​

Notebooks created through ganymede mcp's notebook_open (Notebooks::create in crates/ganymede-server/src/mcp.rs) now write metadata.ganymede.journal = true alongside any kernelspec metadata, so frontends recognize newly created journals immediately — before the agent writes its first cell with metadata.ganymede.agent — and future "Convert to Journal" workflows share the same explicit notebook-level marker. Opening an existing notebook leaves its metadata untouched.

Published HTML downloadable notebook copies (Page::notebook_copy in crates/ganymede-nbformat/src/html.rs) preserve metadata.ganymede.journal = true when set while continuing to strip all other metadata.ganymede keys (such as params) and ignoring non-true values. Page::new's self.journal continues to check cell-level metadata.ganymede.agent so the exported "Marked cells were written by a person; the rest by the agent" legend only appears when agent cells are actually present.

Verified with cargo fmt --check, cargo clippy -p ganymede-nbformat -p ganymede-server --tests -- -D warnings, cargo test -p ganymede-nbformat, and cargo test -p ganymede-server --test http mcp_.

2026-12-01, Markers for ganymede-ui's in-app Python kernel and iPad Find tab (#1063) ​

ganymede-ui's main now runs Pyodide as an in-app python kernel beside the TypeScript one (ganymede-ui#292), gives the iPad one Find tab in place of Search, Outline and the pinned outline card (ganymede-ui#1073), and lists several folders in the iPad and iPhone sidebar (ganymede-ui#465). Ganymede's pages still describe the released apps, so the places that say otherwise get **Unreleased in ganymede-ui.** notes instead of new text: docs/app.md (its kinds-of-setup table and three sections), docs/in-app-kernel.md, docs/known-gaps.md (two items), docs/architecture.md, docs/security.md, docs/ipados.md, and the landing page's iPad card as an HTML comment. ganymede-ui's next release lists them and opens the issue to rewrite them. This also covers #1056.

The book (site/book/index.html, docs/images/book/cover.png, #1065) is rebuilt from its source in the same change, checked against what merged through 2026-12-01: Pyodide as an in-app kernel, the built-in agent's panel and tools, cdp-kernel's read-only variables view, the iPad Find tab and tab strip, and metadata.ganymede.journal on new MCP notebooks.

2026-12-01, HTML publisher currency heuristic follow-ups (#1062) ​

Follow-ups to the currency $ guard from #1060/#1061, all in escape_currency_math in crates/ganymede-nbformat/src/html.rs:

  • Narrowed the "remembered dollar" rule. A math span that opened at a remembered closing $ D (one followed by a digit) was escaped unconditionally, which broke real math that starts with a digit after currency (($0), ($1.20M), ($2x + 1$), ($0) and ($1 + 2$), Price is $5 so **$2n + 1$** is prime.). Now a trial decides, looking at the span's closing $ C. D is escaped if a valid math span (not closed before a digit) starts at C (($0), ($1.20M), ($x + 1$); not when C is followed by whitespace or closing punctuation, as in ($0) and ($1 + 2$), ($x$)), or if C is followed by an ASCII alphanumeric, so it looks like currency or a variable itself (($0), ($12/mo), ($N/seat, min $50), ($0), ($1.20M), ($x), ($5), Args ($0), ($1) and ($HOME/$2).). Otherwise the span is real math, is left alone, and D is forgotten. When the rest of the block after C is on one line, the trial parses only that slice (current[C..block_end], the end of the innermost enclosing block): C is a closing $ in inline Markdown, so nothing opened before it encloses it, and inline math never crosses the block end. If the slice has a newline it would lose line prefixes such as a blockquote's > , so the trial then re-parses the whole cell with D escaped. A 4000-item list of - ($0), ($1.20M), ($x + N$) takes about 7 ms in a release build (a whole-cell re-parse per trial took seconds).
  • Batched escapes per block. Each pass used to escape only the leftmost candidate and passes were capped at 256 for the whole cell, so a cell with more than 256 collisions (a long list) left the tail misparsed. A pass now takes the leftmost decision in every block (inline math never crosses a block boundary), evaluates trials against the pre-pass text, applies all escapes from the end, and shifts digit_dollars by the backslashes inserted before each entry. Within a block only the leftmost candidate is taken per pass, because an escape changes how the later $ pair: in ($1), ($2x$) and ($3), ($4) the first parse also flags $) and ($ (the closing $ of the real $2x$), which is not a collision once $1 is escaped. The loop ends when a pass changes nothing. The 256-pass cap now bounds a chain of collisions inside one block: a single paragraph with more than 256 chained collisions (($1), ($2), ... ($300)) still leaves its tail misparsed as math.
  • Tests: the digit-starting math cases, the plans/variables regressions, a 300-item list of real collisions, raw constructs (code span, autolink) followed by real math, the forget step, the per-block limit (with and without an inline **..** in between), the digit_dollars shift, and a 300-collision paragraph pinning the cap, multi-line math in a blockquote and a list item, and closing punctuation after a real math close. Mutation checks run one at a time, all caught except dropping the escaped-position filter, which is behaviorally invisible (a kept entry lands on the inserted \, and only $ bytes are acted on): no per-block limit, one decision per pass for the whole cell, no shift, no digit_dollars.remove for forgotten entries (caught by a pass-count test, real_math_after_currency_settles_in_few_passes, among others), always using the slice (multi-line blockquote/list-item test), no punctuation guard on rule (a), trial always true, trial always false, no alphanumeric rule, inline-tag helpers always false, cap of 255.

Commands: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo clippy -p ganymede-engine --no-default-features -- -D warnings, cargo test --workspace, RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps (all with CARGO_INCREMENTAL=0).

2026-12-01, HTML publisher currency dollar guard and journal skill note (#1060) ​

Hardened ganymede-nbformat's HTML publisher against currency $ collisions and documented \$ escaping in the ganymede-journal plugin:

  • In crates/ganymede-nbformat/src/html.rs, added escape_currency_math ahead of Page::markdown's pulldown_cmark pass (Options::ENABLE_MATH). pulldown_cmark 0.13.6 already enforces whitespace rules, block boundaries, and top-level $ rejection, but allows a closing $ immediately before an ASCII digit (e.g. ($0 and $78,990), Inspire ($1.20M)). When pulldown_cmark's offset iterator emits an Event::InlineMath whose closing $ precedes an ASCII digit, escape_currency_math escapes range.start (which pulldown_cmark's left-to-right pass guarantees is in inline Markdown rather than inside a fenced/indented code block, closed inline code span, autolink, or inline HTML) and tracks the digit-followed range.end - 1 position (shifted across insertions) in digit_dollars so that if it later opens a span against a following valid math expression (e.g. ($0), ($1.20M), ($x + 1$)), it is also escaped as range.start without ever mutating raw constructs. Added unit coverage in html::tests::currency_dollars_are_not_misparsed_as_inline_math.
  • Updated plugins/ganymede-journal/skills/journal/SKILL.md and plugins/ganymede-journal/agents/journal-reviewer.md to remind agents and reviewers to escape literal currency $ signs as \$ in Markdown cells so journals also render cleanly in upstream JupyterLab and VS Code.

Verified with cargo fmt -p ganymede-nbformat -- --check, cargo clippy -p ganymede-nbformat --all-targets -- -D warnings, cargo test -p ganymede-nbformat, and node --test plugins/ganymede-journal/hooks/journal.test.mjs.

2026-12-01, Marker for ganymede-ui's persistent menu bar helper (ganymede-ui#1092) ​

tlockney/ganymede-ui#1092 replaces the in-app MenuBarExtra with a persistent standalone helper (GanymedeMenuBar.app, managed by the com.ganymede-server.Ganymede.menubar LaunchAgent) focused on the background server, Start/Restart/Stop Server controls, Other Servers, and Quit Menu Bar. The background server paragraph in docs/app.md still describes the released in-app menu bar item, so it gets a visible **Unreleased in ganymede-ui.** note (check-unreleased.mjs requires a > [!NOTE] block in Markdown) for ganymede-ui's release script to pick up once the next app release ships.

2026-12-01, Server metadata for local monitors and menu bar (#1059) ​

Added three backwards-compatible, non-secret metadata fields for local monitors such as GanymedeMenuBar.app (tlockney/ganymede-ui#1089):

  • GET /api/status runtime summary (ganymede-api, ganymede-server). Added optional ganymede_version, mcp_mode ("off", "read_only", "edit_only", "full"), and tailscale (enabled, allow_count, whois) to StatusModel alongside the existing Jupyter keys. No tokens, credentials, or individual tailnet login names are ever serialized.
  • Provider kernel marker (ganymede-kernel-host, ganymede-api). Added KernelProcess::is_provider (returning true only for Origin::Provider in RegisteredKernels) and optional KernelModel.provider (skip_serializing_if = "Option::is_none"), so /api/kernels and /api/sessions emit "provider": true only for [kernel_providers] kernels and omit the field for OS subprocess and embedded app kernels.
  • ganymede serve --role <role> (ganymede-server). Added an optional, CLI-only --role flag ([A-Za-z0-9_-]{1,64}, rejected in ganymede.toml so manual CLI servers sharing the config file do not inherit a service role) that writes "role" into jpserver-<pid>.json and omits it when unset.

The Dependabot sweep moved cookie from 0.18.2 to 0.18.3 in Cargo.lock for GHSA-8wcq-xq25-7fhm: private cookie nonces can repeat in a process that forks. cookie is in Cargo.lock only as an optional dependency of ureq (through cookie_store, behind ureq's cookies feature, which neither ganymede-cli nor sentry turns on), so it isn't compiled into any target: cargo tree -i cookie --all-features --target all prints nothing. Dependabot reads the lockfile, not the build graph, so it raised an alert anyway. The fix is a patch release in range, so taking it clears the alert at no cost.

2026-12-02, HTML publisher currency trial with a code span or inline HTML in the span (#1068) ​

Follow-up to #1062 in trial_reopens_math in crates/ganymede-nbformat/src/html.rs. The trial decides whether a math span that opens at a remembered dollar D and closes at C is a currency collision. When the rest of the block after C was on one line, it parsed only that slice, on the claim that this equals re-parsing the cell with D escaped. That claim fails when the span's text D..C holds a backtick, < or ]: once D is escaped, that character can open a code span, inline HTML, an autolink, or a link or image destination or title (after a ]) that encloses C. In ($0), ($1 + x$) and ($y$) the slice trial escaped D, while the whole-cell trial keeps $1 + x$as math, so the same text decided differently depending on whether the paragraph continued on another line. The same happens with($0), ($1 + x w. The trial now re-parses the whole cell when D..Cholds a backtick,<or], as it already did when the slice has a newline. Real math with < ($1 < x$) that opens at a remembered dollar now takes that whole-cell parse too: the output is the same, the cost is a parse of the cell instead of the block. The long-list case from #1062 (($0), ($1.20M), ($x + N$)`) has none of these characters and keeps the linear-time slice.

Test: raw_construct_opened_inside_the_span_uses_the_whole_cell_trial checks that the code-span, inline-HTML, link destination, link title, image and [-before-D examples decide the same on one line and wrapped, and that the code-span example renders as math. Mutation checks: dropping the new condition fails every example; dropping only `, only < or only ] fails the matching examples.

Commands: cargo fmt --all --check, cargo clippy --workspace --all-targets -- -D warnings, cargo clippy -p ganymede-engine --no-default-features -- -D warnings, cargo test --workspace, RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps (all with CARGO_INCREMENTAL=0).

2026-12-02, image zoom in published pages (#1075) ​

Thomas asked for the image zoom that his field-dossier-html and editorial-longform-html page skills have, in a published notebook page. Charts sit at the width of the text column, which is narrow for a wide chart and narrower on a phone.

The skills' lightbox wraps each image in a <button> with the image's source repeated in data-zoom-src. Doing that here would put every image in the page twice, and pages with images are already about twice the size from the notebook copy. So the zoom lives entirely in the page's one script: it finds the article's images, makes each a focusable button, and builds the overlay when the page loads. The markup doesn't change, and without script the page is as before. Styles go in page.css (and the page-style skill copy), from the skills' overlay: dark backdrop, close button, caption from the alt text.

The script sizes the overlay image from the image's own size: the largest that fits the window, so SVG charts scale up crisply, while bitmaps stop at their own size, since scaling them up only blurs them. A first try with a fixed box and object-fit: contain left a wide chart in a tall empty frame. On a phone in portrait, fitting the width gains nothing for a wide chart, so below 640px wide an image shows at least at its own size (as far as the height allows) and its frame scrolls sideways. The caption is the alt text, left out when it is the exporter's stand-in "Output image". The image sits on the page's figure colour, as in the page, so a chart with a transparent background stays readable over the dark backdrop.

Images inside a link keep following the link. Images inside an HTML output's frame don't zoom: the frame runs no script. Focus goes to the overlay itself rather than its Close button, so the Space that opened it can't land on the button and close it at once; Tab keeps focus in the overlay, and closing returns focus to the image.

The pre-push review found that, without a caption, the fit left out the image's padding, so a scaled-up chart overflowed its frame by 24px and scrolled; it also found the overlay kept the last image's size for one with no natural size yet. Both are fixed: the size is cleared first, and fitted again when the image loads. String checks in the Rust tests couldn't catch either, so validation/page-zoom.mjs publishes a fixture notebook and drives the overlay in Chromium (sizes, no clipping, the bitmap cap, the phone rule, the link exclusion, keys and focus). CI's workstation job runs it; it fails on the first version of the fit.

A second review round found more of the script with no failing test: the scroll lock (the fixture page was too short to scroll), the size reset and the refit on load (the test decoded every image first), the width fix (it only matters between 640 and about 800px wide), and a long caption, which the fit reserved a fixed 40px for and which pushed the image under Close on a phone. The fit now measures the caption, clamped to three lines and kept from shrinking, after the overlay shows. The script covers each of these, and each fails when its line is taken out. It runs in Chromium only; iPhone Safari is a check by hand, filed as #1077.

MIT license.