fix(sync): retain strict V3 fallback publication
This commit is contained in:
parent
99e428c558
commit
ba5021b436
2 changed files with 12 additions and 1 deletions
|
|
@ -55,6 +55,16 @@ internal suspend fun publishBundleAndRequest(
|
|||
return@withContext SyncRequestResult.Error("prepare:${opened.message}")
|
||||
}
|
||||
val snapshot = (opened as com.labfytools.trainlog.data.DirectExchangeSnapshotResult.Ready).snapshot
|
||||
/* CONTRACT: the request signal remains compatible with an unconfigured
|
||||
* desktop, so publish the strict standalone V3 snapshot before admission.
|
||||
* A configured daemon still routes the signal exclusively to the complete
|
||||
* generation below; this compatibility publication never selects V3. */
|
||||
when (val publication = exporter.exportMobileBundle(snapshot)) {
|
||||
SyncExportResult.Unsupported -> return@withContext SyncRequestResult.Unsupported
|
||||
is SyncExportResult.Error ->
|
||||
return@withContext SyncRequestResult.Error("prepare:${publication.message}")
|
||||
is SyncExportResult.Exported -> Unit
|
||||
}
|
||||
return@withContext when (
|
||||
val result = SyncGenerationForegroundCoordinator(repository).run(
|
||||
canonicalExchangeDirectory(),
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ class SyncdRoutingTest(unittest.TestCase):
|
|||
)[0]
|
||||
self.assertIn("SyncGenerationForegroundCoordinator(repository).run", production)
|
||||
self.assertNotIn("generation-opt-in", production)
|
||||
self.assertNotIn("exportMobileBundle", production)
|
||||
self.assertIn("exportMobileBundle", production)
|
||||
self.assertIn("generation below", production)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Reference in a new issue