Compact reconciled document receipts through an explicit retention policy

This commit is contained in:
2026-11-10 17:06:10 +08:00
parent 69eb29343e
commit 786453cce0
7 changed files with 82 additions and 5 deletions
+18
View File
@@ -874,3 +874,21 @@ ordered comparison and no-op rules.
Synchronous document validation loops directly over the same per-record checks
used by the cooperative iterator. The iterator retains its original yield points;
the atomic publication path does not pay a generator handoff per unchanged record.
Resolved Foundry document receipts have an explicit retention policy. The SDK
keeps raw receipts by default; CanvasRuntimeHost opts into `summary`. Only a
successfully reconciled protocol-2 document change with known model/record fields
can become the adapter's `foundry.reconciled-document` version-1 summary. It keeps
the request ID, covered logical operation IDs, project ID and actual returned
canvas versions. Frozen request bytes, ledger outcome, ACK base and history remain
in their existing owners. This summary does not retain the complete raw response
for audit, and cannot be used as a fresh server proof or replay input.
The engine prepares the summary for the same Root publication that resolves the
ledger and installs the ACK/document/history result. If that publication rejects,
the original raw receipt remains available with the unresolved request. A failed
or invalid summary codec reports the error and retains raw data without failing a
valid ACK. Unknown fields/components/versions, unresolved requests and run/asset
receipts stay raw. Existing stored raw receipts are not migrated by this policy.
The recovery envelope remains unchanged: receipts are opaque JSON, and the
adapter-local summary has its own version and explicit replay rejection.