Skip to content

feat(sync): add Composio trello memory-sync pipeline - #109

Closed
CodeGhost21 wants to merge 1 commit into
tinyhumansai:mainfrom
CodeGhost21:feat/composio-trello-sync
Closed

feat(sync): add Composio trello memory-sync pipeline#109
CodeGhost21 wants to merge 1 commit into
tinyhumansai:mainfrom
CodeGhost21:feat/composio-trello-sync

Conversation

@CodeGhost21

@CodeGhost21 CodeGhost21 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds TrelloSyncPipeline — a Composio memory-sync pipeline for the trello toolkit — closing the gap where connecting Trello reports ACTIVE but fails at sync with tinycortex sync does not support toolkit 'trello'.

The pipeline implements both SyncPipeline and IncrementalSource, handing itself to the generic run_incremental_sync engine. 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 = boards. scopes() fetches the authorized member's boards via TRELLO_GET_MEMBERS_BOARDS_BY_ID_MEMBER (idMember: "me"); each board becomes a SyncScope.
  • Items = cards. action() = TRELLO_GET_BOARDS_CARDS_BY_ID_BOARD, paged with Trello's before cursor (oldest card id in a full page; a short page drains the board).
  • Sort cursor = dateLastActivity.
  • Scope errors tolerated — one inaccessible/archived board does not abort the rest.

Stable dedupe

document_id = "trello:<card id>" via the shared document() helper, which also sets metadata.taint = "external_sync". Per-run ids are never used as the upsert key. The dedup key suffixes dateLastActivity so 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, and src/memory/sync/mod.rs exactly like the existing six pipelines (gmail, github, notion, linear, clickup, slack).

Tests

trello_tests.rs sibling (per repo convention) covering:

  • toolkit() / action() are the stable slugs.
  • extract_page() on a sample Composio JSON payload — reads cards and only emits a before cursor on a full page.
  • dedup_key() suffixes dateLastActivity.
  • document() yields a stable trello:<card id> document_id with taint = external_sync.

Run (toolchain 1.96.1; the pipeline is behind the sync feature):

  • cargo fmt --all -- --check — clean
  • cargo clippy --features sync --lib — clean
  • cargo test --features sync --lib sync::composio — 21 passed (incl. 4 new trello tests)
  • cargo test --features sync --test composio_sync_mock — 12 passed

Scope

Part of #82 (tinycortex pipeline body; openhuman wiring is the follow-up step). The openhuman-side work — bumping the vendor/tinycortex submodule, adding the sync.rs:344 selector arm, and registering the ComposioProvider so memory_sources.supported_toolkits advertises trello — is intentionally not included here.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Trello synchronization for importing boards and cards into memory.
    • Supports incremental updates, pagination, and detection of edited cards.
    • Trello card content includes board information and relevant metadata.
  • Tests

    • Added coverage for pagination, duplicate handling, document creation, and provider configuration.

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>
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds an incremental Trello Composio sync pipeline that discovers boards, paginates cards, tracks edits through activity cursors, creates SkillDocument records, adds unit tests, and exports the pipeline through the memory sync modules.

Changes

Trello synchronization

Layer / File(s) Summary
Pipeline contract and exports
src/memory/sync/composio/providers/trello.rs, src/memory/sync/composio/providers/mod.rs, src/memory/sync/composio/mod.rs, src/memory/sync/mod.rs
Defines TrelloSyncPipeline, its incremental sync behavior, and public re-exports.
Board, card, and document synchronization
src/memory/sync/composio/providers/trello.rs
Discovers boards, fetches paginated cards, derives deduplication keys, and converts cards into SkillDocument values.
Pagination and document validation
src/memory/sync/composio/providers/trello_tests.rs
Tests action identifiers, pagination, activity-aware deduplication, and document metadata.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • tinyhumansai/openhuman#4970 — Covers adding and registering the Trello Composio sync pipeline.
  • tinyhumansai/tinycortex#82 — Directly requests the Trello sync pipeline implemented by this change.

Suggested reviewers: senamakel

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
Loading

Poem

A rabbit hops through boards of green,
Fetching cards in rows unseen.
Cursors turn and edits bloom,
Trello notes find memory room.
“Sync complete!” the bunny sings.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a Composio Trello memory-sync pipeline.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/memory/sync/composio/providers/trello.rs (1)

32-40: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Document the public pipeline type and constructor.

TrelloSyncPipeline and new are 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

📥 Commits

Reviewing files that changed from the base of the PR and between 9a0603a and 914d2aa.

📒 Files selected for processing (5)
  • src/memory/sync/composio/mod.rs
  • src/memory/sync/composio/providers/mod.rs
  • src/memory/sync/composio/providers/trello.rs
  • src/memory/sync/composio/providers/trello_tests.rs
  • src/memory/sync/mod.rs

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