marimo-pair
marimo is a reactive Python runtime for building reproducible Python programs
(marimo notebooks). Cells are connected by the variables they define and
reference. Running a cell re-executes dependents in dataflow order. The active
runtime holds the kernel namespace, cell state, and dataflow graph. The
notebook (.py file) is the artifact the kernel writes from that state while a
session is running.
A user interacts with the same runtime via a notebook UI with cells, outputs, and widgets.
WARNING. The active runtime is the source of truth. You are working inside
the user's live notebook session. The kernel — not the .py file on disk —
holds the truth about cells, variables, and the dataflow graph. Make every
notebook change through marimo._code_mode (cm); direct file edits WILL NOT
reach the live kernel or user, and the kernel may overwrite them on save.
Reading disk is fine, but prefer ctx.cells[...].code for current cell code.