Skip to main content

Module doc

Module doc 

Source
Expand description

Operations on the ctxpkg.research-context.v1 document: applying a proposal patch exactly like Cloud does on merge, and rebasing pending draft ops onto a newer revision. The wire types and their structural validation live in lean_ctx_protocol::cloud::knowledge.

Functionsยง

apply_patch
Apply ops in order; any op that does not fit the document is an error.
rebase_ops
Re-apply draft ops onto a newer base, dropping ops the base already contains (the same fact was merged meanwhile). Ops that clash with the new base are an error; the caller then keeps the draft on its old base.
same_content
Equality of what a person wrote, ignoring credits assigned on merge.