Admit scoped structural edits with snapshot identity manifests and replay proofs

This commit is contained in:
2026-11-09 04:40:03 +08:00
parent 6c0a421f59
commit 945aaea504
24 changed files with 292 additions and 74 deletions
+28
View File
@@ -94,3 +94,31 @@ the retained read baseline and forces a full checkpoint without older partial jo
dependencies. Creation, deletion, owner/endpoint/reference changes, uploads and AI
remain gated during partial loading; broader structural scope admission and real
Foundry deployment/integration remain unfinished.
Loading version 4 adds an optional stream-header `elementOwners` manifest and uses
recovery format 10. It covers every active source ID, including unloaded records,
and must match both per-owner counts and each received record. New IDs must also
avoid the captured tombstones; new canvas IDs avoid all captured version keys.
Without this manifest the page retains version-3 field-only admission.
In version 4, complete owners can create elements and a frame/child-canvas pair,
undo/redo them, redirect loaded connections, and move/remove objects born after the
capture when the affected owners are ready. Existing-element removal/reparenting
requires the entire captured source closure; a missing incoming edge is not proof
that no edge exists. Declared references are checked against the transaction's final
model. Shared loaded asset references are permitted; new uploads, generation,
progressive import/copy admission and complete export remain gated during loading.
ACK validation reconstructs the exact protocol-2 effects of applied logical intents
on the original source; late source blocks cannot erase births, restorations or tree
changes. Both the source capture and exact request identities recover through format
10. Pure intent proofs and applied prefixes are cached by immutable source/registry/
intent identities; changing the source invalidates those proofs.
Query coverage also exposes an immutable captured ID set. A missing ID outside that
complete namespace can be reported absent before all payloads arrive; an ID inside it
remains unloaded until received. An old tombstone alone cannot classify a captured
restored ID as absent. Absence does not make an old ID available for fresh creation.
The identity manifest costs O(N) header bytes and memory and still obeys the existing
8 MiB line / 64 MiB response limits; this does not make database acquisition lazy.