Repository navigation
Add the mdbase.comment contract pack - #13
Merged
Merged
Conversation
Comments, replies and suggested edits as records of their own, anchored to a quote of the commented record's Markdown body (Reader's target.quote and target.text_position shapes, in Unicode code points of the body after its frontmatter). Replies link to the thread's first comment; authors link to mdbase.person records. Links tolerate deleted targets, and withdrawing a comment empties it instead of deleting it. The pack ships the contract, its schema and an editable seed comment type.
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.
Adds
mdbase.comment1.0.0: comments, replies and suggested edits stored as their own records rather than markup in the commented record.target) and state (status,resolved_by,resolved_at); each reply is a separate record whosein_reply_tolinks to it, so concurrent replies never conflict.target.quote(exact/prefix/suffix) is authoritative, andtarget.text_positionrecords offsets in Unicode code points of the Markdown body after the frontmatter (profilemarkdown-body,sha256:basis hash). An emptyexactis an insertion point.motivation: editingwithsuggestion.replacementis a suggested edit;suggestion.outcomerecords accepted/rejected.document,in_reply_to,created_byandresolved_byare links declared withvalidate_exists: false, so comments on deleted records are kept, not invalid. Withdrawing setsdeleted_atand empties the body.scripts/comment-contract.test.mjscovers the schema and that the starter type matches it.npm testbuilds and verifies all packs withMDBASE_VERIFY_CLIset to the mdbase 0.1.0-beta.117 CLI; the four Person-pack upgrade failures reproduce identically onmainand are unrelated. Installing the pack with that CLI and validating sample records accepts a comment whose document and author no longer exist and rejects a suggestion without a target.mdbase writer embeds the published provision for its comments.