fix(runtimed): ephemeral notebook review cleanups#1671
Merged
Conversation
Three follow-ups from the ephemeral notebooks PR (#1669) code review: 1. Cap redirect map at 1000 entries to bound memory under extreme agent churn (previously only TTL pruning was implemented) 2. Add delete_metadata() to NotebookDoc and use it to cleanly remove the ephemeral flag on save instead of setting it to an empty string 3. Document that promoted rooms intentionally lack .automerge persistence since .ipynb autosave is the source of truth for file-backed notebooks
The autosave debouncer is spawned above the ephemeral flag clearing, not below. Self-review catch.
rgbkrk
approved these changes
Apr 9, 2026
rgbkrk
reviewed
Apr 9, 2026
| Ok(true) | ||
| } | ||
| None => Ok(false), | ||
| } |
Member
There was a problem hiding this comment.
I have to wonder if there's a pattern to "delete in" with automerge
Collaborator
Author
|
Re: the |
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.
Summary
Follow-up from #1669 code review — three small cleanups:
Cap redirect map at 1000 entries — prevents unbounded growth under extreme agent churn (thousands of save-and-disconnect cycles within an hour). Evicts oldest entries when the cap is hit.
Add
delete_metadata()to NotebookDoc — replacesset_metadata("ephemeral", "")with a clean key deletion. No more empty string keys left in the CRDT.Document promoted room persistence — clarifies that
persist_txremainsNoneafter ephemeral→persistent promotion. The.ipynbautosave (via file watcher) is the source of truth for file-backed notebooks, not.automergepersistence.Test plan
cargo test -p runtimed --lib)cargo xtask lint)