feat(sync): préparation à la synchronisation cloud (ticket #12)

Ajuste les ports et le bootstrap applicatif, ainsi que le mapping
Drift des repositories, pour préparer une future synchronisation cloud
(invariants documentés dans docs/sync-invariants.md). Corrige au
passage un bug de fuseau horaire UTC dans le mapping Drift. flutter
analyze propre, 35/35 tests verts, build APK debug validé.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-18 00:53:58 +02:00
parent d13a3eb8de
commit e38dd75f69
5 changed files with 603 additions and 122 deletions

View File

@ -92,3 +92,26 @@ abstract interface class WorkoutHistoryRepository {
Future<void> saveSetResult(WorkoutHistorySetResult result);
Future<void> delete(String id, DateTime deletedAt);
}
final class SyncRunSummary {
const SyncRunSummary({
required this.pushedChanges,
required this.pulledChanges,
});
final int pushedChanges;
final int pulledChanges;
}
abstract interface class SyncGateway {
Future<SyncRunSummary> synchronize();
}
final class NoOpSyncGateway implements SyncGateway {
const NoOpSyncGateway();
@override
Future<SyncRunSummary> synchronize() async {
return const SyncRunSummary(pushedChanges: 0, pulledChanges: 0);
}
}