Skip to content

Remove auto-instantiate from /api/execute endpoint#8943

Merged
mscolnick merged 1 commit intomainfrom
push-lmnuozptrvux
Mar 31, 2026
Merged

Remove auto-instantiate from /api/execute endpoint#8943
mscolnick merged 1 commit intomainfrom
push-lmnuozptrvux

Conversation

@manzt
Copy link
Copy Markdown
Collaborator

@manzt manzt commented Mar 31, 2026

Code mode now builds its execution plan from the NotebookDocument and calls mutate_graph/_run_cells on the kernel directly, so the notebook no longer needs to be pre-instantiated before scratchpad execution. The _apply_ops diff source also switches from the graph to the document to stay consistent with this approach.

Code mode now builds its execution plan from the NotebookDocument and
calls mutate_graph/_run_cells on the kernel directly, so the notebook no
longer needs to be pre-instantiated before scratchpad execution. The
_apply_ops diff source also switches from the graph to the document to
stay consistent with this approach.
Copilot AI review requested due to automatic review settings March 31, 2026 17:07
@manzt manzt added the enhancement New feature or request label Mar 31, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Mar 31, 2026 5:08pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the implicit notebook instantiation that previously occurred inside the hidden /api/kernel/execute (SSE scratchpad) endpoint, aligning scratchpad execution with the newer “build execution plan from NotebookDocument” approach described in the PR metadata.

Changes:

  • Removed the automatic session.instantiate(..., auto_run=True) call from /api/kernel/execute, so the endpoint no longer guarantees the notebook has been instantiated before scratchpad execution.

@manzt manzt requested a review from mscolnick March 31, 2026 17:59
@mscolnick mscolnick merged commit bd75e65 into main Mar 31, 2026
48 of 49 checks passed
@mscolnick mscolnick deleted the push-lmnuozptrvux branch March 31, 2026 18:07
@github-actions
Copy link
Copy Markdown

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.21.2-dev102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants