Skip to content

Add partial integration coverage for issue #472#519

Open
manzt wants to merge 1 commit into
mainfrom
push-ytxqluorqsok
Open

Add partial integration coverage for issue #472#519
manzt wants to merge 1 commit into
mainfrom
push-ytxqluorqsok

Conversation

@manzt
Copy link
Copy Markdown
Collaborator

@manzt manzt commented Apr 17, 2026

Covers the narrow part of #472 that our current reload path does handle: an external rewrite of a dependency cell is detected by VS Code, propagates into the notebook document, and leaves the dependent cell's output in a usable state (preserved or recomputed, never blank and never a traceback).

Does not close #472.

Copilot AI review requested due to automatic review settings April 17, 2026 23:53
Copy link
Copy Markdown

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

Adds an end-to-end integration test to cover the subset of issue #472 that the current VS Code reload path supports: when the notebook file is rewritten on disk, VS Code reloads the notebook source and dependent cell output remains usable (preserved or recomputed, not blank and not erroring).

Changes:

  • Adds a new integration suite for issue #472 verifying external disk edits propagate into the open notebook document.
  • Asserts dependent cell output after reload is non-empty, non-erroring, and either preserved (5) or recomputed (42).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +490 to +498
// Output must survive the reload in a usable state — either the
// preserved "5" (lazy mode: user will re-run) or a freshly recomputed
// "42" (autorun). What must NOT happen: blank output, or a traceback
// from a failed synthetic run. The pre-fix failure mode was blank.
const depOutput = cellOutputText(nb.cellAt(1));
NodeAssert.ok(
depOutput.length > 0,
`dependent cell should still have an output after external edit. Got empty`,
);
Comment on lines +403 to +404
// was that these edits went undetected; our reload path picks them up and
// the marimo runtime re-runs the dependency chain in autorun mode.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

Coverage Report

Area Lines Branches Functions
Python 48.80% (490 / 955) 39.45% (101 / 256)
TypeScript 46.31% (2036 / 4396) 36.86% (769 / 2086) 43.87% (559 / 1274)

TypeScript statements: 46.12% (2117 / 4590)

@manzt manzt force-pushed the push-ytxqluorqsok branch 3 times, most recently from 1b00d16 to 3f6eaf9 Compare April 21, 2026 22:09
@manzt manzt force-pushed the push-ytxqluorqsok branch 4 times, most recently from 4d05fde to c5c0705 Compare May 5, 2026 19:32
Covers the narrow part of #472 that our current reload path does
handle: an external rewrite of a dependency cell is detected by VS
Code, propagates into the notebook document, and leaves the dependent
cell's output in a usable state (preserved or recomputed, never blank
and never a traceback).

Does not close #472. The issue is also about the stronger guarantee
`marimo edit --watch` gives from the terminal — hot-reloading affected
cells on save from anywhere. That requires either wiring `--watch`
into the server or a broader watcher story we haven't landed. The
test is intentionally lenient about autorun behavior (it accepts
either preserved or recomputed output) because autorun timing in the
shared-venv test harness differs from a real dev host.
@manzt manzt force-pushed the push-ytxqluorqsok branch from c5c0705 to 3bd9cce Compare May 13, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code extension doesn't watch for external file edits (--watch flag not exposed)

2 participants