Development
Ganymede is a Cargo workspace, and docs/ is this site. The TypeScript for web-view UIs is in tlockney/ganymede-ui.
Build and test
cargo build --workspace
cargo test --workspace # uses an in-process fake kernel
cargo test -p ganymede-contents # again without the sqlite feature
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warningsCI also type-checks the kernel host's Windows code from Linux. To run the same check, add the target once:
rustup target add x86_64-pc-windows-gnu
cargo clippy -p ganymede-kernel-host --all-targets --target x86_64-pc-windows-gnu -- -D warningsThe end-to-end tests in crates/ganymede-cli/tests/ also use whatever real kernels and Jupyter are installed, and skip what is missing (variables below). CI runs them on Linux and macOS with cdp-kernel and ipykernel, with jupyter execute and jupyter server as the reference. Python there is a test oracle and a kernel, never a dependency of the product. Nothing may skip in that job; the rust job, which has no real kernels, lists what it skipped in its run summary.
End-to-end tests
These variables make the end-to-end tests strict or add to them:
| Variable | Effect |
|---|---|
GANYMEDE_E2E_KERNELS=cdp-node,python3 | These kernels must exist; their tests fail instead of skipping. |
GANYMEDE_E2E_JUPYTER=/path/to/jupyter | The reference jupyter (needs nbclient and jupyter_server). Defaults to PATH. |
GANYMEDE_E2E_REQUIRE_JUPYTER=1 | Fail instead of skipping when it is missing. |
E2E_DUMP=1 | Print both server transcripts. |
GANYMEDE_E2E_PYTHON=/path/to/python | The Python for collab.rs (needs jupyter_ydoc, pycrdt, websockets 15 or later). When set, it must have them or the test fails. Defaults to python3, then python, skipping when neither has them. |
GANYMEDE_E2E_LAB=1 | Run lab.rs, which downloads JupyterLab and the widget extensions from PyPI (about 18 MB). |
kernels.rs: the same scenarios on every kernel, through the engine and the CLI: kernel_info passthrough, results, streams, errors, stdin, interrupt, restart, comms, completion, inspection, standalone kernels.parity.rs: each notebook ine2e/notebooks/is executed byjupyter executeand byganymede execute, and the files are compared after normalizing timestamps and ids. Mismatches are kept under$TMPDIR/ganymede-parity-*. Also checks thatganymede trustandjupyter trustshare one signature store.server.rs: one REST and websocket scenario againstjupyter serverandganymede serve, compared as transcripts, including which cells come backtrustedafter each kind of save and afterPOST .../trust.collab.rs: ajupyter-collaborationclient (e2e/collab/ydoc_client.py, onjupyter_ydocandpycrdt) syncs with a document room, edits the notebook while another program changes it on disk, and both sides and the saved file must converge.lab.rs:ganymede lab installfrom PyPI, thenganymede serveanswering/laband/lab/api/settingsfrom the installed bundle and the default widget extensions.lab_start.rs:ganymede lab --no-browseron a stand-in bundle, offline: the port fallback, and the printed URL logging in at/lab.e2e/wasm-smoke/: the engine built forwasm32-wasip1, running a notebook on the fake kernel under Node's WASI. It is its own workspace with its ownCargo.lock, which CI builds--locked. When a change to the engine's dependencies makes that lockfile stale, refresh it:cargo update --manifest-path e2e/wasm-smoke/Cargo.toml --workspace.
CI runs the e2e job on Linux and macOS with Node 24, cdp-kernel 0.17.0, and ipykernel, plus a portability job for iOS, Android, and wasm, where a compiler warning fails the build. Its workstation job follows Install on Linux and macOS with Python hidden from PATH (scripts/test-workstation.sh): the PR's binary through install.sh, cdp-kernel from npm, ganymede lab install, ganymede lab driven by Playwright (login, trust, widgets, and validation/jupyterlab.mjs running and saving a cell), ganymede execute, nb-cli's remote and gateway modes (validation/nb-cli.sh), ganymede serve with the VS Code extension's requests, and the uninstall, failing if any Python ran. Its image job builds container/Dockerfile from the checkout and runs container/smoke-test.sh on it. Its lsp job drives JupyterLab with jupyterlab-lsp against ganymede serve and against jupyter lab with jupyter-lsp, and checks both show the same diagnostics from typescript-language-server and pyright (scripts/test-lsp.sh). Its coverage job runs the whole suite on Linux under cargo llvm-cov, kernels included but not the lab install/ui install download tests (the e2e job runs those), and puts line coverage in the job summary, with a row for each .rs file the pull request changes. It is informational and never fails on a number. Locally: cargo llvm-cov --workspace --open.
Evals
Evals run a real agent (claude -p with the ganymede-journal plugin) and score the notebook it leaves, by hand and never in CI; CI runs only the scorers' unit tests. evals/journal measures how good a journal is; evals/agent-native has an agent and a simulated person edit one live notebook, and says when to run it (on changes to the MCP tools, rooms or the plugin, and weekly). evals/review replays the pre-push review prompt on known diffs and scores what it catches (on each change to review-prompt.md, and monthly).
CI
- Pins. The cdp-kernel, ipykernel, nbclient, and
jupyter_serverversions the end-to-end jobs install are in one place, theenv:block at the top of.github/workflows/ci.yml. Bump them together in one pull request, with theCDP_KERNEL_VERSIONdefault incontainer/Dockerfileand the tested versions table; for cdp-kernel,scripts/release.shdoes this in the release commit (Releasing). A weekly scheduled run installs the latest releases instead, so drift shows up there first.NB_CLI_VERSION(nb-cli, for the workstation job) is pinned there too and also goes to the latest release on the scheduled run. - Base images.
container/Dockerfilepins each base image by tag and multi-arch digest, and Dependabot's weeklydockergroup updates them. Keep therusttag the same as thelinux-releasejob's container inci.yml. - Rust versions. CI builds with the latest stable.
rust-versionin the workspaceCargo.tomlis the oldest supported Rust, and themsrvjob builds with exactly that; raise it on purpose. - Dependencies. The
auditjob runscargo deny(deny.toml): RustSec advisories fail it, duplicate versions show as warnings. A pull request checks advisories only when it changesCargo.lock, aCargo.tomlordeny.toml(thechangesjob'sdepsoutput), so a new advisory doesn't fail unrelated pull requests; pushes tomain, the weekly run and manual runs check them every time. Licenses are checked bycargo aboutagainstabout.toml. Dependabot (.github/dependabot.yml) opens weekly grouped bumps for Cargo, npm, and the actions; its pull requests are exempt from the linked-issue check. - Docs-only changes. A pull request, or a push to
main, that changes onlydocs/,site/(other thansite/install.sh), or Markdown builds nothing: thechangesjob (scripts/ci-changes.sh) says so, and every job reports success without running. ThePagesworkflow still builds the site. Anything else, the weekly schedule and manual runs run the whole CI. A failed weekly run opens a "Weekly CI run failed" issue, or comments on the open one. Add a path to the script's list only if no job can be affected by it. - The XCFramework.
ffi (macos-latest)builds it only when the change can affect ganymede-ffi (the script'sffioutput: anything butganymede-cli,ganymede-engine, the test and tooling directories, and other scripts and workflows), and bothfficells build without LTO except on the weekly schedule. The release profile build is alsorelease.yml's, on every push tomainand every tag. - The macOS e2e and workstation cells.
e2e (macos-latest)andworkstation (macos-latest)run their steps only when the change can affect them (the script'smacosoutput): anything undercrates/, the Cargo and toolchain files,site/install.sh,e2e/,validation/,docs/reference.md,docs/mcp-tools.md,scripts/test-install.sh,scripts/test-workstation.sh,ci.yml, and any path the script doesn't list. A pull request that changes onlyevals/,plugins/,container/, other scripts or other workflows leaves them as an ubuntu run with every step skipped, under the same check names. A push tomainthat changes code runs them on macOS regardless.scripts/test-ci-changes.sh(theinstall-scriptjob) checks the script's outputs; add a case when you add a path. - Actions are pinned by full commit SHA, with the version in a comment. Let Dependabot move them; don't hand-edit a tag back in.
- Permissions. Every workflow starts from
contents: read(or nothing), and a job that needs more asks for it itself.
Rules
- The host knows no language. No code depends on a kernel's language or branches on it, and Python kernels arrive only as installed kernelspecs. Outside tests,
pythonappears in the host crates only where a file format is defined by Python's output (nbformat's float layout, the trust signature's scalar format), in PyPI's names (ganymede lab installfetches JupyterLab's wheels from there), and in comments that say what Python does. - The REST and websocket API is a compatibility target, not a design space: match
jupyter_server. - Each change is a pull request that references a GitHub issue, with CI green, and adds what it learned to the development log as its own file,
docs/notes/YYYY-MM-DD-<topic>.md. Don't append todocs/notes.md: one shared file makes every pair of open PRs conflict. - Status lives in two pages: Known gaps (what doesn't work) and the Roadmap (what is done and planned). Other pages and crate READMEs describe what is there and link to those two instead of saying "not yet"; status repeated elsewhere went stale in each docs review.
Releases
scripts/release.sh <level> bumps the workspace version, writes CHANGELOG.md, commits on release/vX.Y.Z, and opens an issue and a PR for it. Squash-merging the PR publishes vX.Y.Z from the release commit's push to main and tags it. It is a dry run without --execute. Releasing has the whole path, and what to do when a release fails partway.
This site
The landing page is plain HTML and CSS in site/. The book (site/book/, The book) is one generated HTML page, with its fonts in site/book/fonts/. It is generated outside this repository from the code architecture primer, which the maintainer keeps and rebuilds by hand. A small fix, such as a broken link, can go straight into index.html; tell the maintainer so the primer gets it too. These docs are Markdown in docs/, built by VitePress:
cd docs && npm install
npm run fetch-ui # ganymede-ui's docs, from its main branch
npm run fetch-cell-api # the cell API reference, from cdp-kernel and ganymede-ui
npm run dev # live preview
npm run build # into docs/.vitepress/distThe pages under /docs/ganymede-ui/ are tlockney/ganymede-ui's docs/*.md, copied into docs/ganymede-ui/ (not committed) by npm run fetch-ui; set GANYMEDE_UI_DIR to copy from a local checkout instead. Edit them in ganymede-ui. Without the copy the site builds without them. ganymede-ui's docs workflow sends a repository_dispatch (ganymede-ui-docs) when they change on its main, which rebuilds and deploys this site.
The pages under /docs/cell-api/ are the reference pages that cdp-kernel (docs/jupyter-reference.md, docs/widgets-reference.md) and ganymede-ui's device package (packages/device/docs/reference.md) generate from the doc comments on their types, copied into docs/cell-api/ (not committed) by npm run fetch-cell-api; set CDP_KERNEL_DIR or GANYMEDE_UI_DIR to copy from a local checkout. Edit the doc comments there. The script points links to cdp-kernel's guides at cdp-kernel.org, and other links that leave the pages at GitHub. A cdp-kernel page that names a notebook gets, after each ```ts cell block, the outputs that cell saved in it, as on cdp-kernel.org: widgets saved with their state run on the page (docs/.vitepress/theme/widgets.ts, a copy of cdp-kernel's). The site picks up changes to them on its next build.
The Pages workflow builds both on every pull request that touches them, so a broken page or dead link fails the PR. It deploys them to GitHub Pages from main on every merge that touches them, and again after each release. install.sh installs the latest release, so docs for a feature that isn't released yet carry this note, one per section the feature adds, next to it in the docs page, README, or landing page:
> [!NOTE]
> **Unreleased.** Available only from a build of `main` (HEAD), not in
> the latest release.Keep the words **Unreleased.** as they are: the release looks for them and removes the notes (Releasing). Don't say it any other way, such as a word in parentheses after the feature: the release wouldn't find it. npm run check-unreleased in docs/, which the Pages workflow runs, fails on one. A change to a feature that is already released needs no note. site/install.sh goes live on merge too, and must work with the latest release. Diagrams are SVG files in docs/images/, with their dark colours in a @media (prefers-color-scheme: dark) block, so they follow the OS on GitHub. The docs build writes a light and a dark copy of each into docs/images/themed/ (not committed), and the site shows the one that matches its theme toggle (themed.ts); a new diagram needs nothing more than that block. Give each a legend for any colour or line style that carries meaning. The design is cdp-kernel.org's; keep site/style.css and docs/.vitepress/theme/custom.css in step with each other.
App screenshots
The landing page's Apps section, README.md, and Ganymede's app show the Mac, iPad and iPhone apps from docs/images/apps/: {mac,ipad,iphone}-{light,dark}.png, captured from ganymede-ui's Fremont Bridge fixture (2026-11-09-fremont-bridge.ipynb) via its ScreenshotUITests and ScreenshotUITests-iOS XCUITest plans. Re-shoot them on a Mac when the apps' look changes, and after a ganymede-ui release, with docs/scripts/app-screenshots.sh and a ganymede-ui checkout:
docs/scripts/app-screenshots.sh ~/src/ganymede-ui docs/images/appsThe wrapper bootstraps the ganymede-ui checkout against the GANYMEDE_REF pinned in its ci.yml (downloading GanymedeFFI.xcframework and the bundled CLI for a release tag, or checking out and building from a commit), then delegates to ganymede-ui's apple/scripts/capture-screenshots.sh. Against an already-bootstrapped ganymede-ui checkout, pass --skip-bootstrap or invoke apple/scripts/capture-screenshots.sh /path/to/ganymede/docs/images/apps directly; --only mac|ipad|iphone|ios captures a subset.
It needs macOS with Xcode, the iOS Simulator runtime, Node, and XcodeGen. capture-screenshots.sh boots the largest 13-inch iPad Pro (landscape) and newest iPhone Pro (portrait) simulators with the status bar at 9:41, runs ScreenshotUITests and ScreenshotUITests-iOS in both light and dark appearances (-UITesting --uitest-appearance light|dark), and exports the named PNGs directly from the .xcresult attachments — no manual clicks, simulator rotation, Screen Recording permission, or system dark-mode switch are required. On a headless Mac, enable Automation Mode without per-run authentication prompts first (sudo DevToolsSecurity -enable and sudo automationmodetool enable-automationmode-without-authentication). ganymede-ui's nightly/manual UI Tests workflow (ui-tests.yml) runs the same script and uploads app-screenshots as a build artifact.
docs/scripts/app-screenshots.sh keeps its scratch DerivedData (and any commit-SHA ganymede checkout) in docs/scripts/work/ (git-ignored). Set GANYMEDE_REF, GANYMEDE_DIR, GANYMEDE_XCFRAMEWORK, GANYMEDE_CLI, DERIVED_DATA, IPAD_UDID, or IPHONE_UDID to override defaults, and inspect every picture before committing it.