Repository navigation
Reject corrupted document titles before writes - #702
Open
MaggieAppleton wants to merge 4 commits into
Open
MaggieAppleton wants to merge 4 commits into
MaggieAppleton wants to merge 4 commits into
Conversation
This branch has not been deployed
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.
The Planner could save a title containing NUL and other control bytes, producing a corrupted heading and URL. Reject damaged title text before title normalization and persistence, keeping the previously committed document intact.
The guards cover Planner title drafts, explicit rename, document creation, structural edits, rewrites, and browser Yjs updates. Browser validation follows the known title node even if it moves or changes heading level. Previously stored corrupt titles remain readable and can be repaired by an explicit rename.
Deleting the known title inserts a blank H1 while preserving an unchanged existing body H1, including legacy damaged text in that body heading. New or changed title proposals still pass the corruption guard.
Validated on source commit
9c9ddd8a3(the final head adds only lane memory metadata):bun run fix,bun run types, andbun run cipass.3544d06fa(CI run). The downloaded browser summary records no failures: 22 design, 17 diagram, and 863 integration tests passed on the first attempt; one responsive-workspace reduced-motion test passed on retry after its 100 ms assertion timed out. Eleven browser cases were skipped.Validation boundary