Add partial integration coverage for issue #472#519
Open
manzt wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
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. |
Contributor
Coverage Report
TypeScript statements: 46.12% (2117 / 4590) |
1b00d16 to
3f6eaf9
Compare
4d05fde to
c5c0705
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.