← All repositories

crossmate

A collaborative crossword app for iPhone and iPad

git clone https://code.inqk.net/crossmate.git


commit a7ada168088a59eaa5400ac6ff0edd3b9df649c6
parent 32997a08f7f55e0994bb5c4574c90132a517cb45
Author: Michael Camilleri <[email protected]>
Date:   Sun, 14 Jun 2026 04:55:37 +0900

Add logging to Decision application

Diffstat

MCrossmate/Sync/SyncEngine.swift | 12++++++++++++

1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/Crossmate/Sync/SyncEngine.swift b/Crossmate/Sync/SyncEngine.swift

@@ -1506,6 +1506,18 @@ actor SyncEngine {
                         localAuthorID: localAuthorID,
                         databaseScope: scope
                     )
+                    // The decision-apply path is otherwise silent, which makes
+                    // a "synced fact that never landed" (e.g. a nickname that
+                    // applied on the sender but not here) impossible to diagnose
+                    // from the on-device log. Record the fetched decision name,
+                    // its zone, and whether it applied so the receive side is
+                    // observable.
+                    effects.traces.append(
+                        "decision applied=\(wrote) " +
+                        "\(record.recordID.recordName) " +
+                        "zone=\(record.recordID.zoneID.zoneName)/" +
+                        "\(record.recordID.zoneID.ownerName) scope=\(scope)"
+                    )
                     // Our own name Decision echoed back from the account zone
                     // (or a friend zone a sibling seeded): adopt its version so
                     // this device's next rename supersedes it rather than