freemo
ff9c6540a2
feat(server): entity sync (_cleveragents/sync/*)
Implement entity synchronization between client and server using
the _cleveragents/sync/* A2A extension methods per the specification.
Sync models (src/cleveragents/a2a/sync_models.py):
- Pydantic v2 models for pull/push/status requests and responses
- VectorClock with increment, merge, happens-before, and concurrency
detection for distributed conflict detection
- SyncEntitySnapshot, SyncConflict, SyncState, SyncQueueEntry models
- SyncEntityType enum: actor, skill, action, plan, session
- ConflictResolution enum: last_writer_wins, manual, server_wins,
client_wins
SyncService (src/cleveragents/application/services/sync_service.py):
- pull(): download server namespace entities to local cache with
incremental sync (since timestamps) and force-overwrite option
- push(): push local entity definitions to server namespace with
configurable conflict resolution strategy
- status(): compare local and server entity versions, detect drift,
report local-ahead, server-ahead, and concurrent conflicts
- resolve_conflict(): manually resolve detected conflicts with
winner selection (local or server)
- Offline queue: enqueue_offline() and process_offline_queue() for
retry on reconnect, with max-retries enforcement
- The local/ namespace is never synced per specification
A2A facade (src/cleveragents/a2a/facade.py):
- Replaced sync stub handlers with real _handle_sync_pull,
_handle_sync_push, _handle_sync_status routing to SyncService
- Added sync_service property and TYPE_CHECKING import
- Facade returns stubs when no SyncService is registered
Tests:
- Behave BDD: features/entity_sync.feature (65 scenarios, 247 steps)
covering models, vector clocks, pull/push/status, conflict resolution,
offline queue, facade integration, constructor validation, edge cases
- Robot Framework: robot/entity_sync.robot (8 integration tests)
ISSUES CLOSED: #866
2026-05-29 07:21:08 -04:00
..
2026-05-07 20:05:33 +00:00
2026-04-15 06:37:18 +00:00
2026-04-27 07:33:18 +00:00
2026-05-28 17:35:08 -04:00
2026-05-29 07:21:08 -04:00
2026-04-13 04:56:01 +00:00
2026-05-29 07:21:08 -04:00
2026-04-13 04:56:01 +00:00
2026-05-13 06:49:40 +00:00
2026-04-28 03:22:06 +00:00
2026-04-23 11:46:36 +00:00
2026-05-01 09:10:48 +00:00
2026-04-05 21:26:33 +00:00
2026-05-28 20:47:07 -04:00
2026-05-07 20:05:33 +00:00
2026-04-13 04:56:01 +00:00
2026-05-07 20:05:33 +00:00
2026-05-14 08:10:58 +00:00
2026-04-05 21:19:40 +00:00
2026-04-13 04:56:01 +00:00
2026-05-06 01:07:15 +00:00
2026-04-27 05:00:54 +00:00
2026-05-09 23:13:33 +01:00
2026-05-05 01:33:31 +00:00
2026-04-17 16:28:45 +08:00
2026-04-30 10:56:21 +00:00
2026-05-28 17:35:08 -04:00
2026-05-12 13:02:59 +00:00
2026-04-13 04:56:01 +00:00
2026-05-27 12:14:04 -04:00
2026-04-23 12:19:50 +00:00
2026-04-30 10:56:21 +00:00
2026-05-06 04:08:25 +00:00
2026-04-30 02:05:12 +00:00
2026-05-16 13:38:54 +00:00
2026-05-07 20:05:33 +00:00
2026-05-02 21:54:17 +00:00
2026-05-15 22:19:57 +01:00
2026-05-05 02:01:49 +00:00
2026-05-19 12:43:34 +00:00
2026-04-23 09:08:11 +00:00
2026-05-07 07:08:52 +00:00
2026-04-30 02:05:12 +00:00
2026-04-20 13:54:28 +00:00
2026-04-13 04:56:01 +00:00
2026-05-03 00:39:15 +00:00
2026-04-17 18:33:39 +00:00
2026-04-17 11:46:38 +00:00
2026-04-13 04:56:01 +00:00
2026-05-05 02:01:49 +00:00
2026-04-05 08:39:14 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-05-12 01:05:10 +00:00
2026-05-05 02:01:49 +00:00
2026-04-08 11:02:14 +00:00
2026-04-13 04:56:01 +00:00
2026-05-05 02:01:49 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-05 07:43:56 +00:00
2026-05-09 23:13:33 +01:00
2026-04-05 17:55:54 +00:00
2026-05-05 02:01:49 +00:00
2026-05-16 04:14:17 +00:00
2026-04-21 05:14:07 +00:00
2026-05-11 04:39:29 +00:00
2026-05-07 20:05:33 +00:00
2026-04-17 11:46:38 +00:00
2026-05-16 13:38:54 +00:00
2026-04-17 11:46:38 +00:00
2026-04-23 12:19:50 +00:00
2026-04-12 08:15:49 +00:00
2026-04-05 04:33:46 +00:00
2026-04-05 04:33:46 +00:00
2026-04-08 11:02:14 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-05 20:56:32 +00:00
2026-04-09 13:00:47 +00:00
2026-04-15 00:24:13 +00:00
2026-04-12 16:43:30 +00:00
2026-04-05 04:09:27 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 02:01:49 +00:00
2026-04-05 04:22:46 +00:00
2026-04-05 04:22:46 +00:00
2026-04-05 04:22:46 +00:00
2026-04-05 04:22:46 +00:00
2026-04-05 04:22:46 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-30 10:56:21 +00:00
2026-04-21 16:53:08 +00:00
2026-05-16 06:04:01 +00:00
2026-05-08 05:11:47 +00:00
2026-04-24 05:45:20 +00:00
2026-05-19 21:56:28 +01:00
2026-05-05 17:18:16 +00:00
2026-05-07 23:49:20 +00:00
2026-04-05 08:22:45 +00:00
2026-04-05 18:08:56 +00:00
2026-04-05 21:06:04 +00:00
2026-04-20 06:08:50 +00:00
2026-04-05 08:43:01 +00:00
2026-05-07 20:05:33 +00:00
2026-05-29 07:21:08 -04:00
2026-05-12 08:30:24 +00:00
2026-05-13 12:24:33 +00:00
2026-04-13 04:56:01 +00:00
2026-04-24 22:46:41 +00:00
2026-05-16 16:40:54 +00:00
2026-05-02 01:36:45 +00:00
2026-04-30 14:56:33 +00:00
2026-04-05 17:49:20 +00:00
2026-04-05 08:29:55 +00:00
2026-05-05 05:25:28 +00:00
2026-04-09 14:17:50 +00:00
2026-04-28 04:06:57 +00:00
2026-04-28 04:06:57 +00:00
2026-04-05 05:46:05 +00:00
2026-05-19 21:56:28 +01:00
2026-04-05 08:26:50 +00:00
2026-05-05 02:01:49 +00:00
2026-05-22 20:42:25 +01:00
2026-05-19 12:43:34 +00:00
2026-05-19 12:43:34 +00:00
2026-04-26 11:19:10 +00:00
2026-04-05 07:06:53 +00:00
2026-04-23 09:22:33 +00:00
2026-05-28 11:36:14 -04:00
2026-05-11 04:39:29 +00:00
2026-05-19 12:43:34 +00:00
2026-04-05 07:48:02 +00:00
2026-04-19 17:10:17 +00:00
2026-04-13 04:56:01 +00:00
2026-04-24 10:32:15 +00:00
2026-04-21 03:38:05 +00:00
2026-05-19 12:43:34 +00:00
2026-05-19 12:43:34 +00:00
2026-04-17 08:34:33 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 02:01:49 +00:00
2026-04-13 04:56:01 +00:00
2026-04-17 08:34:33 +00:00
2026-05-05 02:01:49 +00:00
2026-04-17 08:34:33 +00:00
2026-04-17 08:34:33 +00:00
2026-04-13 04:56:01 +00:00
2026-04-21 11:31:15 +00:00
2026-05-19 19:28:35 +01:00
2026-05-28 00:05:08 -04:00
2026-05-19 19:28:35 +01:00
2026-05-19 19:28:35 +01:00
2026-05-07 20:05:33 +00:00
2026-05-19 12:43:34 +00:00
2026-04-05 20:46:24 +00:00
2026-05-19 12:43:34 +00:00
2026-05-09 12:23:24 +00:00
2026-05-09 12:23:24 +00:00
2026-05-12 08:30:24 +00:00
2026-05-12 08:30:24 +00:00
2026-05-05 02:01:49 +00:00
2026-05-14 22:57:11 +00:00
2026-05-22 20:42:25 +01:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-05 04:38:31 +00:00
2026-05-05 02:01:49 +00:00
2026-04-09 06:11:39 +00:00
2026-05-08 09:32:29 +00:00
2026-05-29 03:59:05 -04:00
2026-05-05 17:18:16 +00:00
2026-04-10 18:59:10 +00:00
2026-04-05 08:22:36 +00:00
2026-05-08 09:57:18 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-05-07 20:05:33 +00:00
2026-04-13 04:56:01 +00:00
2026-05-05 06:16:46 +00:00
2026-05-05 06:16:46 +00:00
2026-05-18 06:05:54 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-05 08:29:36 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-05 09:03:32 +00:00
2026-05-07 20:05:33 +00:00
2026-04-30 10:03:08 +00:00
2026-05-03 00:17:15 +00:00
2026-04-05 04:37:45 +00:00
2026-04-21 11:56:19 +00:00
2026-05-11 08:59:08 +00:00
2026-04-13 04:56:01 +00:00
2026-05-29 05:08:08 -04:00
2026-04-13 04:56:01 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 02:01:49 +00:00
2026-05-05 10:56:18 +00:00
2026-04-08 11:02:14 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-05-11 04:39:29 +00:00
2026-05-11 04:39:29 +00:00
2026-04-05 21:11:53 +00:00
2026-04-05 07:15:48 +00:00
2026-04-05 08:22:36 +00:00
2026-04-13 04:56:01 +00:00
2026-04-23 12:19:50 +00:00
2026-04-05 08:59:59 +00:00
2026-05-08 06:24:23 +00:00
2026-05-22 20:42:25 +01:00
2026-05-14 06:46:27 +00:00
2026-04-14 02:51:16 +00:00
2026-04-21 01:59:07 +00:00
2026-04-08 11:02:14 +00:00
2026-04-08 11:02:14 +00:00
2026-04-30 02:05:12 +00:00
2026-04-25 04:21:23 +00:00
2026-05-14 22:57:11 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-05-12 10:17:39 +00:00
2026-04-13 04:56:01 +00:00
2026-04-05 08:22:45 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-05 17:52:59 +00:00
2026-04-13 04:56:01 +00:00
2026-04-08 11:02:14 +00:00
2026-05-07 23:39:08 +01:00
2026-04-13 04:56:01 +00:00
2026-04-15 13:37:16 +08:00
2026-04-28 09:23:33 +00:00
2026-04-13 04:56:01 +00:00
2026-04-08 11:02:14 +00:00
2026-04-13 04:56:01 +00:00
2026-05-12 16:45:59 +00:00
2026-04-21 06:42:10 +00:00
2026-04-28 10:12:06 +00:00
2026-05-05 04:04:13 +00:00
2026-04-26 18:23:48 +00:00
2026-04-26 12:19:34 +00:00
2026-05-05 09:37:22 +00:00
2026-05-02 21:57:54 +00:00
2026-04-13 04:56:01 +00:00
2026-05-15 02:41:37 +00:00
2026-05-23 00:01:44 +00:00
2026-04-24 19:01:56 +00:00
2026-05-05 17:48:39 +00:00
2026-04-13 04:56:01 +00:00
2026-04-08 11:02:14 +00:00
2026-04-13 04:56:01 +00:00
2026-04-08 11:02:14 +00:00
2026-04-08 11:02:14 +00:00
2026-04-08 11:02:14 +00:00
2026-05-07 14:22:57 +00:00
2026-05-13 12:24:33 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 21:16:55 +00:00
2026-04-26 17:34:52 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-05-07 19:14:53 +00:00
2026-04-08 11:02:14 +00:00
2026-04-08 11:02:14 +00:00
2026-04-27 01:12:35 +00:00
2026-04-13 04:56:01 +00:00
2026-04-23 18:29:11 +00:00
2026-04-22 00:45:09 +00:00
2026-05-13 07:13:34 +00:00
2026-04-13 04:56:01 +00:00
2026-04-10 20:50:20 +00:00
2026-04-13 04:56:01 +00:00
2026-04-28 07:33:43 +00:00
2026-05-27 23:17:15 -04:00
2026-04-05 09:09:06 +00:00
2026-05-29 05:08:08 -04:00
2026-04-27 07:33:18 +00:00
2026-04-27 07:33:18 +00:00
2026-04-24 04:11:54 +00:00
2026-05-28 12:52:19 -04:00
2026-04-13 04:56:01 +00:00
2026-04-21 08:45:06 +00:00
2026-04-06 07:55:09 +00:00
2026-04-05 04:19:52 +00:00
2026-04-13 04:56:01 +00:00
2026-05-19 12:43:34 +00:00
2026-04-30 15:36:26 +00:00
2026-04-05 18:08:09 +00:00
2026-05-27 00:46:19 -04:00
2026-04-05 18:08:09 +00:00
2026-04-05 18:09:41 +00:00
2026-05-08 11:15:36 +00:00
2026-05-22 15:12:04 +00:00
2026-04-23 23:01:46 +00:00
2026-05-08 11:15:36 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-13 04:56:01 +00:00
2026-04-22 06:37:17 +00:00
2026-05-29 03:59:05 -04:00
2026-04-06 07:55:09 +00:00
2026-04-05 03:26:37 +00:00
2026-04-30 10:56:21 +00:00