Expand description
Deterministic scratch-workspace rendering.
Renders a notebook change to the file tree its schema generates
paths declare: artifact notes are read directly from the notebook
directory (notebooks are plain git-backed folders; nb-api
exposes their paths) and copied byte-for-byte, so identical notes
always produce a byte-identical tree. Rendering writes only to
scratch destinations — never to the repository working tree.
Structs§
- Rendered
Document - One document of a rendered change tree.
Enums§
- Render
Error - Errors from rendering.
Functions§
- aggregate_
content_ hash - Computes the aggregate content hash of a rendered document set: the SHA-256 hex digest over the sorted (tree_path, body hash) pairs. The aggregate identifies the exact reviewable content of a change — any body edit, addition, removal, or rename of a rendered document changes the value — so review verdicts bind it. Sorting makes the digest independent of enumeration order; a NUL separates path from hash and a newline terminates each pair so adjacent fields cannot alias across pair boundaries.
- render_
documents - Renders a change’s artifact notes into an ordered document list:
artifacts in schema declaration order, documents within a folder
artifact sorted by path. Notes the change has not authored yet
(absent files) are skipped; control-plane files (
meta, theworktodo note) belong to no artifact and never render. - review_
diff - Builds a unified diff between a change’s durable documents (those
with merge targets) and the current contents of their repository
targets, in
git diffformat suitable for external review tooling. Target provenance headers are stripped before comparing, so the diff shows document changes rather than header churn. Unchanged targets are omitted; absent targets diff from/dev/null. - write_
tree - Writes a rendered document list as a file tree, replacing any
previous contents of
destinationso stale files never survive a re-render.