From c6d3651ffd932eefca02bc1f0a245af227359c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Tejero=20Cantero?= Date: Fri, 7 Aug 2026 00:47:34 +0200 Subject: [PATCH] :bug: Write the document revision to the column that exists `set-document-revision-statement` emitted `SET d.revn`, but the column is `revision`: the beadpot contract renames `:revn` and the DDL has followed it since. The statement is the last one in every sync batch, so each batch raised after its mutations had already committed, and the session's in-memory index stayed frozen at its load-time revision. Name the column through `nodes/cypher-property-key` rather than spelling it, so the DDL and the statement cannot disagree again. Found by the binder gate in the next commit, on its first run. AI-assisted-by: mixed models --- backend/src/app/graph/sync.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/src/app/graph/sync.clj b/backend/src/app/graph/sync.clj index 22ff2f01ef..2720902912 100644 --- a/backend/src/app/graph/sync.clj +++ b/backend/src/app/graph/sync.clj @@ -247,9 +247,13 @@ (defn- set-document-revision-statement + "The column is `revision`, not `revn` — beadpot spells the revision number out + (`schema.contract`). Named through `cypher-property-key` so the two cannot + disagree again." [doc-id revn] (str "MATCH (d:Document {id: " (ladybug/format-uuid doc-id) "}) " - "SET d.revn = " (ladybug/format-int revn) ";")) + "SET d." (nodes/cypher-property-key "Document" :revn) " = " + (ladybug/format-int revn) ";")) (defn- resolve-parent-for-add [index {:keys [parent-id frame-id page-id]}]