From a432b5cf8cc70f459f6aabbd8cb3e14c494ccadb Mon Sep 17 00:00:00 2001 From: Ben West Date: Tue, 17 Mar 2026 15:37:00 -0700 Subject: [PATCH] docs(changelog): correct UUID handling scope description syncIdentifier and uuid fields are used for dedup, not copied to identifier. Only UUID values in _id field are extracted to identifier. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- CHANGELOG.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77421ad8..6a134a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,14 +7,14 @@ All notable changes to cgm-remote-monitor are documented in this file. ### Added #### UUID/Identifier Handling (REQ-SYNC-072) -- **Treatments API**: Server now normalizes client sync identities into a unified `identifier` field +- **Treatments API**: UUID values in `_id` field are now extracted to `identifier` - Loop overrides: UUID in `_id` → extracted to `identifier` - - Loop carbs/doses: `syncIdentifier` → copied to `identifier` - - xDrip+: `uuid` → copied to `identifier` + - Loop carbs/doses: `syncIdentifier` field used for dedup (not copied) + - xDrip+: `uuid` field used for dedup (not copied) - AAPS: `identifier` unchanged (already correct) - **Entries API**: CGM entries with UUID `_id` now handled correctly (GAP-SYNC-045) -- **Deduplication**: Server uses `identifier` for upsert matching when present -- **Benefits**: Re-uploading treatments after app reinstall/cache clear updates existing records +- **Deduplication**: Server uses `identifier`, `syncIdentifier`, or `uuid` for upsert matching +- **Scope**: Only UUID values in `_id` field trigger normalization; other fields preserved #### Test Infrastructure - **NODE_ENV=test safety check**: Tests now refuse to run without `NODE_ENV=test`, preventing accidental production database destruction (GAP-SYNC-046)