Skip to content

Identities and state

Studio attaches every mutation, build, presentation, and browser observation to the state it observed. Names identify durable product objects. Revisions identify content. Generations identify replaceable owners and incarnations.

Product terms

TermContract
NotebookSaved Marimo Python file that owns data, computation, controls, and reactive behavior
ViewStable name and route for one presentation of a notebook
View projectDirectory containing view.toml, authored frontend source, and provider configuration for one view
Source documentUTF-8 text file authorized by provider inspection or the Studio-owned view.toml
Build inputFile or bounded directory included in the immutable snapshot used by a build
View providerInstalled Python extension that offers starters, inspects a view project, and builds browser files
Provider keyDurable distribution/registration identity stored in view.toml
StarterCreation-time choice that produces initial view project files
ArtifactValidated immutable browser file tree produced by one build profile
PresentationOne artifact combined with notebook source, runtime configuration, projections, and browser session state
PreviewStudio surface that renders the current development presentation
Python runtimeNotebook execution in a server-side Marimo session. Its configuration ID is server
Browser runtimeNotebook execution in a browser worker through WebAssembly and Pyodide. Its configuration ID is wasm
Prepared runtimeBrowser rendering from verified outputs computed during export. Its static runtime ID is zero-python

Source documents and build inputs are separate allowlists. A read-only lockfile can affect a build without accepting Source writes. An editable guidance file can remain outside the build input set when editing it should not rebuild the artifact.

Stable names

IdentityFormatLifetime
View nameLowercase letter followed by lowercase letters, digits, or hyphensStable until the view is removed
Provider keyCanonical distribution plus entry-point registration, such as marimo-studio/reactPreserved by Studio Source mutations for one view
Starter IDProvider key plus local starter key, such as marimo-studio/react:revealUsed during creation and not persisted
Cell targetNative cell name or Studio cell aliasStable while the notebook name or binding remains
Value selectorVariable name plus permitted attribute and item stepsResolves against the current notebook namespace
Projection site IDLowercase artifact-local ID with at most 128 charactersStable for one authored source site

Content revisions

RevisionIdentifiesChanges when
Source revisionExact UTF-8 source document contentThe document bytes change. Public values use sha256:<digest>
Notebook revisionProvider-visible static notebook recordCell source, names, configuration, definitions, references, or dependency edges change
Project revisionComplete normalized build-input snapshot plus provider provenanceA declared build input or provider build identity changes
Artifact revisionComplete validated browser file tree and projection declarationsAny published artifact file or mount declaration changes
Presentation revisionSelected view, saved notebook and configuration, build profile, and artifactAny input to the delivered presentation changes
Projection revisionPresentation projection targets, policy, runtime bindings, diagnostics, and runtime instanceProjection authorization or runtime binding state changes

An artifact revision can remain current across repeated builds when the validated browser file tree is byte-identical. Development and production profiles can publish the same artifact revision while retaining separate build attempt and publication state.

Ownership generations

GenerationIdentifiesUsed by
Catalog generationStudio configuration plus the current set of named view incarnationsWorkspace mutation admission
View generationDurable owner of one name joined with the current view project directoryView write, build, export, and removal admission

Both generations are opaque 64-character lowercase hexadecimal strings. Read them from status, view read --json, or the Python handles that return them. Do not construct or persist them as long-term identifiers.

view write checks the source revision, catalog generation, and view generation immediately before commit. A failed check preserves the current file and returns a conflict. Read the current source and retry from that state.

Removing a view terminates its view generation. Recreating the same name creates a new view generation. Existing Python View handles remain bound to the incarnation they observed.

Runtime and browser identities

IdentityScope
Runtime instanceOne mounted notebook runtime configuration
Runtime session IDOne Python runtime session. Browser runtime observations have no server session ID
Browser client IDOne connected Studio tab
Presentation sessionOne browser admission to a presentation revision
Projection instance IDOne active element in the browser DOM at one projection site
Request ID and sequenceOne browser evidence request and its ordered observation

Browser validation accepts evidence when these identities still match the selected view, view generation, runtime, runtime instance, session, presentation revision, request, and active projection instances. A stale observation cannot validate a newer presentation.

Workspace state

StudioOverview.state and marimo-studio status --json use these values:

StateMeaning
unconfiguredThe notebook has no Studio configuration
needs-viewStudio configuration exists and the default view project still needs creation
readyThe configured workspace has at least one valid view and its default view exists

Build freshness

ViewInspection.freshness and view inspect --json report development build freshness:

FreshnessCurrent sourceRetained artifactMeaning
currentMatchesPresentThe development artifact was built from the current project revision
staleNewer or invalidPresentPreview can retain the last successful artifact while source needs another successful build
unbuiltPresentAbsentCurrent source has no successful development artifact
buildingBuild in progressOptionalStudio is preparing a candidate from the current snapshot
failedLatest attempt failedAbsentNo successful development artifact is available

ViewInspection.build describes the retained successful artifact. It can remain present when freshness is stale.

Projection state

Projection hosts use connecting, loading, stale, ready, missing, and error. See Notebook result projections for DOM attributes and events.

Validation state

Validation levels are cumulative:

LevelRequired evidence
staticSaved notebook, configuration, view source, build contract, and projection targets
runtimeStatic evidence plus one complete supervised notebook execution
browserRuntime evidence plus a current rendered observation for one view

See Errors and JSON for conflict codes and machine output.