From 543e583e2b65fdb48d13887b43cde8f45655cfa5 Mon Sep 17 00:00:00 2001 From: delchev Date: Tue, 8 Sep 2026 10:57:04 +0300 Subject: [PATCH] docs(intent): a posting rewrite is one transaction (#7132) The amendment path deletes the rows it replaces, updates the header and writes the derived lines. Stated as separate transactions, a line a validation refuses halfway leaves an unbalanced entry that no later event ever repairs - the source has already reached its moment - so the whole post is written together or not at all. Co-Authored-By: Claude Opus 5 --- docs/help/intent/dsl-reference.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/help/intent/dsl-reference.md b/docs/help/intent/dsl-reference.md index bf72c474a..46fb59861 100644 --- a/docs/help/intent/dsl-reference.md +++ b/docs/help/intent/dsl-reference.md @@ -1891,6 +1891,13 @@ it. The handler therefore derives the whole content and compares it with the pos carries: identical is a redelivery and does nothing, different rewrites that post in place - the header assignments re-applied, the items replaced. There is never a second document for one source. +The rewrite is **one transaction**: the rows it replaces, the header and every derived line either +all become durable or none of them does. Written as separate transactions, a line a validation +refuses halfway leaves a header with a partial set of lines - an unbalanced entry - and nothing ever +comes back to repair it, because the source has already reached its moment and raises no further +event. That is worse than the stale but balanced post the rewrite set out to fix, so the whole post +is written together or not at all. + The rewrite stops where the created document's own lifecycle says somebody has taken it over: it is rewritable only while its `function: EntityStatus` relation still holds the `init:` value the posting's own create wrote (a created document with no status lifecycle has nothing to act on, so it