Repository navigation
Send a never-synced project's missing entries only to an empty FieldWorks - #365
Conversation
…orks #361 made LfMerge send every entry a never-synced project's FieldWorks lacks, so that an LF project's first Send/Receive -- as when one is migrated -- would not lose the entries a LIFT import into LF left without user references. But it did that for every never-synced project, and the ones whose FieldWorks already has entries were cloned from it: the entries it lacks were since deleted in FLEx, or dropped when its repository was begun afresh. Their next sync would bring those entries back, undoing what #362 was for. Three never-synced projects on the live server are like that, with 664 such entries between them. So the missing entries are now sent only when FieldWorks had no entries at all before the conversion began, which is how a migration's new LexBox project starts. Every other never-synced project is back to how #362 left it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test Results 2 files ±0 25 suites ±0 4m 50s ⏱️ +6s Results for commit fd79190. ± Comparison against base commit c731109. This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
In a never-synced project whose FieldWorks has entries, an LF entry with no user references that FieldWorks lacks is taken to have been deleted in FLEx since the initial clone, and the transfer back to Mongo marks it deleted. The data cannot check that: an entry imported into LF from LIFT after the clone looks just the same, and would be marked deleted too. That is deliberate, but it should not pass unnoticed. Each such entry is now logged by GUID and name as it is left out, so that one which turns out to be LF's own can be found and restored -- marking it deleted leaves it in Mongo. The comment there now says this is an assumption, and names the case it gets wrong. After a sync nothing is logged: an entry FieldWorks lacks then was certainly deleted in FLEx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Devin's concerns could not be reproduced with real data (it would require a LIFT import on LF and someone adding entries to FieldWorks and doing a FW S/R before LF ever did a Send/Receive, which no project has ever done). But I added some logging to make sure that if such a convoluted process did happen, there was an explanation for why the LF entries were suddenly marked as deleted. (Reversing the process would simply involve setting So since the only concern Devin raised is something that can't happen, I'm merging now so that we have an actual correct algorithm in |
#361 made LfMerge send every entry a never-synced project's FieldWorks lacks, so that an LF project's first Send/Receive -- as when one is migrated -- would not lose the entries a LIFT import into LF left without user references. But it did that for every never-synced project, and the ones whose FieldWorks already has entries were cloned from it: the entries it lacks were since deleted in FLEx, or dropped when its repository was begun afresh. Their next sync would bring those entries back, undoing what #362 was for. Three never-synced projects on the live server are like that, with 664 such entries between them.
So the missing entries are now sent only when FieldWorks had no entries at all before the conversion began, which is how a migration's new LexBox project starts. Every other never-synced project is back to how #362 left it.