Skip to content

Add incremental Matrix sync command#28

Merged
mdheller merged 4 commits intomainfrom
work/matrix-incremental-sync
May 3, 2026
Merged

Add incremental Matrix sync command#28
mdheller merged 4 commits intomainfrom
work/matrix-incremental-sync

Conversation

@mdheller
Copy link
Copy Markdown
Contributor

@mdheller mdheller commented May 3, 2026

Summary

Adds incremental Matrix sync support using the durable Matrix sync state introduced in the prior lane.

This PR adds:

  • MatrixSyncRequest for incremental sync requests.
  • MatrixServiceBackend.sync() protocol method.
  • Offline in-memory sync behavior for CI.
  • Optional matrix-nio backed sync implementation.
  • MatrixServiceAdapter support for backend-driven matrix_sync when no explicit payload is provided.
  • agent-term-matrix sync command using stored next_batch.
  • Sync options for --timeout-ms, --full-state, --persist, --save-state, and --no-save-state.
  • Tests for backend sync, adapter sync, CLI sync, state updates, and persistence behavior.

Boundary decisions

  • CI uses the in-memory backend and does not need a homeserver.
  • matrix-nio remains optional and lazy-imported.
  • Sync state is local durable state, not authority over Matrix room semantics.
  • Event persistence remains explicit via --persist.

Validation

Expected CI:

ruff check .
pytest

@mdheller mdheller merged commit 8bb4c39 into main May 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant