Lock, not pin: the flag that keeps the model from rewriting a node

The badge reads LOCKED, the status line and messages say lock and unlock, p's
help says what it is and that it is not P, and the cascade says a locked node
was flagged, not rewritten. Pin now means only a pane's pin. The stored flag
and the op API keep the old name, pinned, so a live library keeps its locks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-16 02:03:28 -05:00
1 parent edc31aac9a
commit abf79c14cc
8 files changed
+21 -18

No files matched your search

+3 -3
View File
@@ -243,7 +243,7 @@ export async function reconcile(llm: LLM, doc: Doc, id: NodeId, onText: OnText =
}
export interface CascadeEvent {
kind: "decide" | "rewrite" | "keep" | "pinned" | "revise";
kind: "decide" | "rewrite" | "keep" | "locked" | "revise";
node: NodeId;
text: string;
}
@@ -278,7 +278,7 @@ export async function cascade(
let i = 0;
for (; i < levels; i++) {
if (doc.snap().nodes[chain[i]]?.pinned) {
emit({ kind: "pinned", node: chain[i], text: "pinned: flagged, not rewritten" });
emit({ kind: "locked", node: chain[i], text: "locked: flagged, not rewritten" });
break;
}
if (await regenUp(llm, doc, chain[i], noop, opts.signal, opts.hooks)) emit({ kind: "rewrite", node: chain[i], text: "re-summarised" });
@@ -297,7 +297,7 @@ export async function cascade(
snap = doc.snap();
if (!snap.nodes[c] || !staleness(snap, c).down || !rendered(c)) continue;
if (snap.nodes[c].pinned) {
emit({ kind: "pinned", node: c, text: "pinned: flagged, not rewritten" });
emit({ kind: "locked", node: c, text: "locked: flagged, not rewritten" });
continue;
}
if (await regenDown(llm, doc, c, noop, opts.signal, opts.hooks)) {