feat(sync): add Composio trello memory-sync pipeline - #109
Conversation
Implement TrelloSyncPipeline (SyncPipeline + IncrementalSource) modeled on the ClickUp provider: boards are sync scopes (fetched for member "me" via TRELLO_GET_MEMBERS_BOARDS_BY_ID_MEMBER) and cards on each board are the syncable items (TRELLO_GET_BOARDS_CARDS_BY_ID_BOARD), paged with Trello's `before` cursor. Dedupe is stable: document_id = "trello:<card id>" via the shared document() helper (metadata.taint = "external_sync"); the dedup key suffixes dateLastActivity so edited cards re-ingest. No card content is logged. Register through providers/mod.rs, composio/mod.rs, and sync/mod.rs like the existing six pipelines. Adds trello_tests.rs covering toolkit()/action(), extract_page() paging, dedup_key(), and a stable document_id from document(). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📝 WalkthroughWalkthroughAdds an incremental Trello Composio sync pipeline that discovers boards, paginates cards, tracks edits through activity cursors, creates ChangesTrello synchronization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant IncrementalSync
participant TrelloSyncPipeline
participant Composio
participant SkillDocument
IncrementalSync->>TrelloSyncPipeline: discover board scopes
TrelloSyncPipeline->>Composio: list boards
Composio-->>TrelloSyncPipeline: return boards
TrelloSyncPipeline->>Composio: fetch paginated cards
Composio-->>TrelloSyncPipeline: return cards
TrelloSyncPipeline->>SkillDocument: create card document
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/memory/sync/composio/providers/trello.rs (1)
32-40: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the public pipeline type and constructor.
TrelloSyncPipelineandneware public but have no item docs. As per coding guidelines,src/**/*.rs: “Document public APIs, module contracts, and non-obvious behavior thoroughly, preferring module-level docs and item docs.”🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/memory/sync/composio/providers/trello.rs` around lines 32 - 40, Document the public TrelloSyncPipeline type and its new constructor with Rust doc comments, describing the pipeline’s purpose and the constructor’s parameters and behavior. Add the item docs directly above TrelloSyncPipeline and TrelloSyncPipeline::new, without changing their implementation.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/memory/sync/composio/providers/trello.rs`:
- Around line 32-40: Document the public TrelloSyncPipeline type and its new
constructor with Rust doc comments, describing the pipeline’s purpose and the
constructor’s parameters and behavior. Add the item docs directly above
TrelloSyncPipeline and TrelloSyncPipeline::new, without changing their
implementation.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f83cb9f1-975a-4d45-9137-ed39a125cc6a
📒 Files selected for processing (5)
src/memory/sync/composio/mod.rssrc/memory/sync/composio/providers/mod.rssrc/memory/sync/composio/providers/trello.rssrc/memory/sync/composio/providers/trello_tests.rssrc/memory/sync/mod.rs
Summary
Adds
TrelloSyncPipeline— a Composio memory-sync pipeline for thetrellotoolkit — closing the gap where connecting Trello reportsACTIVEbut fails at sync withtinycortex sync does not support toolkit 'trello'.The pipeline implements both
SyncPipelineandIncrementalSource, handing itself to the genericrun_incremental_syncengine. It is modeled on the ClickUp provider (providers/clickup.rs) — the closest existing shape — because ingestion fans out over containers (Trello boards) and pages items (cards) within each, using a global recency cursor.Shape
scopes()fetches the authorized member's boards viaTRELLO_GET_MEMBERS_BOARDS_BY_ID_MEMBER(idMember: "me"); each board becomes aSyncScope.action()=TRELLO_GET_BOARDS_CARDS_BY_ID_BOARD, paged with Trello'sbeforecursor (oldest card id in a full page; a short page drains the board).dateLastActivity.Stable dedupe
document_id = "trello:<card id>"via the shareddocument()helper, which also setsmetadata.taint = "external_sync". Per-run ids are never used as the upsert key. The dedup key suffixesdateLastActivityso an edited card re-ingests. This applies the lesson from tinyhumansai/openhuman#4953 rather than reintroducing it. No card content is logged.Registration
Wired through
providers/mod.rs,composio/mod.rs, andsrc/memory/sync/mod.rsexactly like the existing six pipelines (gmail,github,notion,linear,clickup,slack).Tests
trello_tests.rssibling (per repo convention) covering:toolkit()/action()are the stable slugs.extract_page()on a sample Composio JSON payload — reads cards and only emits abeforecursor on a full page.dedup_key()suffixesdateLastActivity.document()yields a stabletrello:<card id>document_idwithtaint = external_sync.Run (toolchain 1.96.1; the pipeline is behind the
syncfeature):cargo fmt --all -- --check— cleancargo clippy --features sync --lib— cleancargo test --features sync --lib sync::composio— 21 passed (incl. 4 new trello tests)cargo test --features sync --test composio_sync_mock— 12 passedScope
Part of #82 (tinycortex pipeline body; openhuman wiring is the follow-up step). The openhuman-side work — bumping the
vendor/tinycortexsubmodule, adding thesync.rs:344selector arm, and registering theComposioProvidersomemory_sources.supported_toolkitsadvertisestrello— is intentionally not included here.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Tests