Yeah, that is my best attempt for title. The less cryptic explanation as follows:
1. Translator starts a translation T1. Translates sections T1-s1, T1-s2, T1-s3, T1-s4
2. Translator decides to delete this translation. Does so from CX dashboard.
3. Translator wants to translate T1 again from scratch. The newly started translation is T2
4. Translator translates 2 sections. T2-s1, T2-s2. Saves it
5. Translator returns and resumes T2. T2-s1, T2-s2 are restored as expected. In addition to this T1-s3, T1-s4 are also restored. That is wierd.
Internally what happens is, T1, T2 get same translation id since its SourceLanguage-TargetLanguage-SourceTitle pair is same. With this translation Id, sections are stored in corpora table.
When T2 started, we are not fetching this from table because it is a fresh translation. But when T2 is restored, All sections from corpora table which match the translation id is restored. They are T2-s1, T2-s2, T1-s3, T1-s4
So this is an edge case. When T2 started while T1 exist with deleted status, we probably want to clear sections associated with it from corpora table while doing deleted->draft transition.
Or, does it help the translator by providing the old saved sections? (+cc @Pginer-WMF )