Remove the Composio connector tree - #118
Conversation
The entire Composio integration has been removed from the codebase, including all provider implementations, sync pipelines, API types, and host wiring. This was done because the integration is no longer supported or needed. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove the composio module and change reader_for to return Option<Box<dyn SourceReader>>, returning None for SourceKind::Composio. The composio source kind is retained for stored records, but reading requires OAuth credentials that belong in the tinyconnectors crate, not here. Returning Option forces callers to handle the absent reader explicitly rather than discovering a runtime error from a stub. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…ymemory-core/src/lib.rs,crates/ Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…tes/tinymemory-core/src/store/m Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…nymemory-core/src/sync/pipeline Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…module Composio sources are now handled by the connector module, which holds the credentials needed to reach connected accounts. The engine pipeline no longer attempts to run composio connections directly; instead it returns an error directing callers to the connector path. The standalone composio helper functions and the slack search backfill wrapper have been removed as their logic has moved to the engine-free pipelines. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove the `SyncStateStore` implementation for `HostSyncAdapter` that was kept during the transition from engine-owned to core-owned sync state, along with the associated test module. The core now owns sync state directly, making this adapter and its integration tests obsolete. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…sed sync exports Remove a duplicate definition of the `canonicalize` function in the identity store that was accidentally left after a refactor, and clean up the engine module's public re-exports by dropping `load_composio_sync_state`, `run_composio_connection`, `run_composio_connection_with_budgets`, and `run_slack_search_backfill` which are no longer used. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
The `run_gmail_backfill` function in the sync module was a thin wrapper that delegated to the engine-free pipeline, kept only because OpenHuman's backfill binary reached it through the engine shim path. That binary no longer uses this path, so the function and its re-export are removed to eliminate dead code. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Extract the cadence-related functions into a dedicated `cadence` module and re-export them from the workspace module, so that periodic sync logic can reference them through the workspace path instead of the composio module. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
…crates/tinymemory-core/src/sour Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Removed the import of `std::collections::HashSet` from the reconcile module as it was no longer used anywhere in the source file, eliminating a compiler warning about unused imports. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Clean up formatting inconsistencies across several files by removing extraneous blank lines in engine/sync.rs and store/identity.rs, and by reordering the module declaration in sync/mod.rs so that usage appears after mcp and sync_status. These changes have no effect on behaviour and are purely cosmetic. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Remove the `TestComposioHost` stub and its registration from the test seam initialiser, along with the `sync_target` helper and two `build_upsert_targets` tests that are no longer relevant. These were left over from an earlier implementation and are not exercised by any remaining test. Auto-committed-on: dragonfly Co-authored-by: Medulla <medulla@tinyhumans.ai>
Reaching a connected account needs a credential this crate does not hold and must not. The host fetches through the tinyconnectors module and hands the records back through MemorySourceSink::accept_source_items. Four things were memory's all along and stay, moved out from under the tree: the self-identity matcher (reads this crate's profile store), the periodic cadence helpers (about the user's setting, not any source), the per-run usage tally (what the audit log records), and SourceKind::Composio itself — rows already written are still stored, queried and forgotten under it. reader_for returns Option now, so a caller has to decide what to do about a kind it cannot read rather than discovering it per item at runtime. Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
Warning Review limit reached
On-demand reviews are free for the next 21 days. After that, they cost $0.25 per reviewed file. View limit detailsReview configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (113)
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0669 · 793,339 in / 14,179 out · 25,804 cached (3%) · openrouter/openai/text-embedding-3-small, deepseek/deepseek-v4-flash, z-ai/glm-5.2 · 789 embedded
critique: $0.0124 · 153,805 in / 2,209 out · 1,024 cached (1%) · deepseek/deepseek-v4-flash
security: $0.0141 · 148,365 in / 1,577 out · 24,780 cached (17%) · deepseek/deepseek-v4-flash, z-ai/glm-5.2
tests: $0.0205 · 249,683 in / 4,723 out · 0 cached (0%) · deepseek/deepseek-v4-flash
description: $0.0200 · 241,486 in / 5,670 out · 0 cached (0%) · deepseek/deepseek-v4-flash
| // error" for a source it never read would advance the caller's cursor past | ||
| // items nobody looked at, and report a healthy sync while the user's mail | ||
| // stopped arriving. | ||
| if source.kind == SourceKind::Composio { |
There was a problem hiding this comment.
Add a test for the Composio source rejection in the engine seam
The run_source_pipeline function now returns an error for Composio sources instead of routing them to the engine-free pipelines. This is a new behavioural change. The existing test that covered this (build_pipeline_refuses_composio_sources) was deleted with the Composio module. Without a test, a future change that removes or alters this error path would not be caught, and the engine seam could silently accept Composio sources that it cannot handle. Add a test that asserts the error is returned for a Composio source.
[RULE] untested-behaviour ·
| /// Canonicalize a raw value for storage and lookup. The same routine runs | ||
| /// on the entity side at match time, so equality of canonical forms is the | ||
| /// matcher's only test — no `COLLATE NOCASE`, no per-call lowercasing. | ||
| pub fn canonicalize(kind: IdentityKind, raw: &str) -> Option<String> { |
There was a problem hiding this comment.
Add tests for the identity canonicalization logic moved from profile.rs
The IdentityKind, canonicalize, and is_self_identity_any_toolkit functions were moved from sync/composio/providers/profile.rs to store/identity.rs. The tests that verified this logic (in profile.rs) were deleted with the Composio module. The identity logic is used by the memory tree's entity matching and is critical for correct self-identity detection. Move the relevant tests into this module to prevent regression.
[RULE] untested-move ·
| /// - `global == None` → `Some(max(DEFAULT, provider_default))`: no explicit | ||
| /// user choice, so fall back to the 24h default cadence (also floored at the | ||
| /// provider default). | ||
| pub(crate) fn effective_interval_secs(provider_default: u64, global: Option<u64>) -> Option<u64> { |
There was a problem hiding this comment.
Add tests for the periodic sync interval logic moved from composio/periodic.rs
The effective_interval_secs, connection_is_due, and periodic_pause_reason functions were moved from sync/composio/periodic.rs to sync/workspace/cadence.rs. The tests that verified this logic (in periodic.rs) were deleted with the Composio module. The workspace periodic sync now depends on this module. Add tests to ensure the interval calculation and pause reason detection remain correct.
[RULE] untested-move ·
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6007de4913
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Composio sources are read by the connector module, not here: reaching a | ||
| // connected account needs a credential this crate does not hold and must | ||
| // not. The host fetches through `tinyconnectors` and hands the records | ||
| // back through `MemorySourceSink::accept_source_items`. |
There was a problem hiding this comment.
Preserve connector records in the memory tree
When the new tinyconnectors path calls MemorySourceSink::accept_source_items, this delegation no longer preserves tree ingestion: TinycortexProvider::accept_source_items only calls MemoryClient::put_doc, while this commit deletes HostSyncAdapter::store/ingest_document_into_memory_tree and the composio_sync_document_reaches_memory_tree regression. Connected Gmail, Slack, and similar records are therefore stored as namespace documents but create no scoped mem_tree_chunks, so tree-backed query_source and recall cannot return them; route these writes through scoped tree ingestion and retain a replacement regression test.
AGENTS.md reference: AGENTS.md:L175-L177
Useful? React with 👍 / 👎.
| .collect() | ||
| } | ||
|
|
||
| /// Apply conservative default caps in-place to every cap-less source. |
There was a problem hiding this comment.
Invoke the retained caps migration
Removing ensure_composio_sources also removes the only call to apply_composio_source_caps_migration; a repository-wide search at this commit finds no remaining caller. On an upgrade where composio_source_caps_migration_version is still below 1, existing cap-less sources therefore keep max_items and sync_depth_days unset and can run at the provider's large internal ceiling instead of the documented conservative defaults, so the retained migration needs to be wired into a surviving startup or connector path.
Useful? React with 👍 / 👎.
# Conflicts: # crates/tinymemory-api/src/host/composio.rs # crates/tinymemory-core/src/composio_host.rs # crates/tinymemory-core/src/engine/sync.rs # crates/tinymemory-core/src/sources/readers/composio.rs # crates/tinymemory-core/src/sources/reconcile.rs # crates/tinymemory-core/src/sources/sync.rs # crates/tinymemory-core/src/sync/composio/mod.rs # crates/tinymemory-core/src/sync/composio/periodic.rs # crates/tinymemory-core/src/sync/composio/providers/catalogs_microsoft.rs # crates/tinymemory-core/src/sync/composio/providers/catalogs_productivity.rs # crates/tinymemory-core/src/sync/composio/providers/clickup/provider.rs # crates/tinymemory-core/src/sync/composio/providers/clickup/tests.rs # crates/tinymemory-core/src/sync/composio/providers/github/tests.rs # crates/tinymemory-core/src/sync/composio/providers/linear/provider.rs # crates/tinymemory-core/src/sync/composio/providers/linear/tests.rs # crates/tinymemory-core/src/sync/composio/providers/mod.rs # crates/tinymemory-core/src/sync/composio/providers/notion/provider.rs # crates/tinymemory-core/src/sync/composio/providers/notion/tests.rs # crates/tinymemory-core/src/sync/composio/providers/profile.rs # crates/tinymemory-core/src/sync/composio/providers/profile_md.rs # crates/tinymemory-core/src/sync/composio/providers/registry.rs # crates/tinymemory-core/src/sync/composio/providers/scope_lookup.rs # crates/tinymemory-core/src/sync/composio/providers/slack/provider.rs # crates/tinymemory-core/src/sync/composio/providers/sync_state.rs # crates/tinymemory-core/src/sync/composio/providers/tool_scope.rs # crates/tinymemory-core/src/sync/composio/providers/traits.rs # crates/tinymemory-core/src/sync/composio/providers/types.rs # crates/tinymemory-core/src/sync/composio/providers/user_scopes.rs # crates/tinymemory-core/src/sync/composio/providers/user_scopes_tests.rs # crates/tinymemory-core/src/sync/pipelines/composio/client.rs # crates/tinymemory-core/src/sync/pipelines/composio/gmail.rs # crates/tinymemory-core/src/sync/pipelines/composio/gmail_tests.rs # crates/tinymemory-core/src/sync/pipelines/composio/orchestrator.rs # crates/tinymemory-core/src/sync/pipelines/composio/providers/mod.rs # crates/tinymemory-core/src/sync/pipelines/composio/providers/notion.rs # crates/tinymemory-core/src/sync/pipelines/composio/providers/slack.rs # crates/tinymemory-core/src/sync/pipelines/composio/providers/slack_parse.rs # crates/tinymemory-core/src/sync/pipelines/dispatcher_tests.rs # crates/tinymemory-core/src/sync/pipelines/host.rs # crates/tinymemory-core/src/sync/pipelines/traits.rs # crates/tinymemory-core/tests/composio_gmail_non_tinycortex_e2e.rs
# Conflicts: # crates/tinymemory-api/src/host/composio.rs # crates/tinymemory-bus/src/composio/catalogs/business.rs # crates/tinymemory-bus/src/composio/catalogs/google.rs # crates/tinymemory-bus/src/composio/catalogs/messaging.rs # crates/tinymemory-bus/src/composio/catalogs/microsoft.rs # crates/tinymemory-bus/src/composio/catalogs/microsoft_tests.rs # crates/tinymemory-bus/src/composio/catalogs/productivity.rs # crates/tinymemory-bus/src/composio/catalogs/productivity_tests.rs # crates/tinymemory-bus/src/composio/catalogs/social_media.rs # crates/tinymemory-core/src/sync/composio/providers/catalogs.rs # crates/tinymemory-core/src/sync/composio/providers/clickup/tools.rs # crates/tinymemory-core/src/sync/composio/providers/descriptions.rs # crates/tinymemory-core/src/sync/composio/providers/github/tools.rs # crates/tinymemory-core/src/sync/composio/providers/gmail/tools.rs # crates/tinymemory-core/src/sync/composio/providers/linear/tools.rs # crates/tinymemory-core/src/sync/composio/providers/mod.rs # crates/tinymemory-core/src/sync/composio/providers/notion/tools.rs # crates/tinymemory-core/src/sync/composio/providers/scope_lookup.rs
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0609 · 638,617 in / 14,638 out · 49,224 cached (8%) · openrouter/openai/text-embedding-3-small, z-ai/glm-5.2, deepseek/deepseek-v4-flash · 784 embedded
critique: $0.0111 · 85,736 in / 4,942 out · 17,841 cached (21%) · z-ai/glm-5.2, deepseek/deepseek-v4-flash
security: $0.0118 · 81,013 in / 4,004 out · 28,311 cached (35%) · deepseek/deepseek-v4-flash, z-ai/glm-5.2
tests: $0.0193 · 240,399 in / 3,108 out · 3,072 cached (1%) · deepseek/deepseek-v4-flash
description: $0.0187 · 231,469 in / 2,584 out · 0 cached (0%) · deepseek/deepseek-v4-flash
| Some(value) | ||
| ); | ||
|
|
||
| SkillDocSink::store( |
There was a problem hiding this comment.
Restore removed HostSyncAdapter state round-trip test
The diff deletes a block within adapter_state_and_document_seams_round_trip_locally that tested SyncStateStore::set/get round-tripping a value through the adapter under the namespace "host-state". No replacement test covers this seam elsewhere in the diff. If the HostSyncAdapter implementation of the SyncStateStore trait has changed or the trait is still used by composio sync code, this deletion removes regression coverage for that interface. The author should either restore the round-trip or add a note explaining why the SyncStateStore trait no longer needs coverage (e.g. it is now owned by the connector module and tested there).
[RULE] removed-test-coverage ·
| // are present (openhuman#18 connector extraction). | ||
| let config = tinymemory_api::host::test_support::TestHostConfig::default(); | ||
| let missing_toolkit = source( | ||
| let source = source( |
There was a problem hiding this comment.
Restore coverage for composio source missing required fields
The original test composio_validation_reports_missing_fields_without_usage exercised two scenarios: a source missing toolkit and a source missing connection_id. The replacement test only checks a fully-formed composio source (both toolkit and connection_id present) and asserts it is refused. This loses coverage for the case where a source has toolkit but no connection_id — if the rejection logic relies on the presence of connection_id rather than the "composio" kind, that path is no longer tested. If the connector module (which now owns composio dispatch) independently validates these fields, the gap is benign but still unproven from this file. Restoring the second scenario or adding a note documenting where that coverage lives removes the ambiguity.
[RULE] contract-gap ·
How this change flows8 changed behaviours across 22 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 29 further behaviours left out to keep the diagram readable. flowchart LR
n0["HostSyncAdapter<br/>changed"]:::changed
n1["SourcePipelineFailure<br/>changed"]:::changed
n2["run_source_pipeline<br/>changed"]:::changed
n3["...ate_and_document_seams_round_trip_locally<br/>changed<br/>2 findings"]:::flagged
n4["build_pipeline_refuses_composio_sources<br/>changed<br/>2 findings"]:::flagged
n5["...der_covers_every_tree_coupled_source_kind<br/>changed<br/>2 findings"]:::flagged
n6["...and_stage_helpers_cover_empty_local_state<br/>changed<br/>2 findings"]:::flagged
n7["..._local_input_fails_without_provider_usage<br/>changed<br/>2 findings"]:::flagged
n8["memory_fixture"]:::impacted
n9["assert"]:::impacted
n10["Result"]:::impacted
n11["ChatHost"]:::impacted
n12["run_source_pipeline_core"]:::impacted
n13["...d_context_helpers_preserve_contract_state"]:::impacted
n2 -->|uses| n1
n2 -->|uses| n10
n2 -->|calls| n12
n3 -->|uses| n0
n3 -->|calls| n8
n3 -->|tests| n8
n3 -->|calls| n9
n4 -->|calls| n9
n5 -->|calls| n9
n6 -->|calls| n8
n6 -->|tests| n8
n6 -->|calls| n9
n7 -->|calls| n8
n7 -->|tests| n8
n7 -->|calls| n9
n11 -->|uses| n10
n12 -->|uses| n1
n12 -->|uses| n10
n13 -->|uses| n1
n13 -->|calls| n8
n13 -->|tests| n8
n13 -->|calls| n9
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8f287e560
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /// pipeline: reaching a connected account needs a credential this crate does | ||
| /// not hold and must not. The host fetches through the `tinyconnectors` | ||
| /// module and hands the records back through | ||
| /// `MemorySourceSink::accept_source_items`, so every toolkit-keyed entry |
There was a problem hiding this comment.
Record connector runs in the sync audit log
When a host follows the new tinyconnectors path and submits records through MemorySourceSink::accept_source_items, the sink only writes documents and never appends a SyncAuditEntry. The only remaining production append sites are in sources::sync, whose Composio branch now fails before ingestion, so successful connector runs and their provider costs disappear from sync_audit_log and cost/history surfaces. Add an audit handoff for connector batches, including provider usage and the final run verdict.
Useful? React with 👍 / 👎.
What changed
Reaching a connected account needs a credential this crate does not hold and must not. Fetching moved into the
tinyconnectorsTinyBus module, which the host loads and calls; the records come back here throughMemorySourceSink::accept_source_items, the sink that already existed for exactly this.Deleted:
sync/composio/,sync/pipelines/(the engine-free Composio sync in its entirety),sources/readers/composio.rs,composio_host.rs, andtinymemory-api/src/host/composio.rs. 20,785 lines.What was rescued rather than deleted
Four things were memory's all along and had only ended up under that tree because Composio was the first source to need them:
store::identity— the self-identity matcher. It reads this crate's profile store to answer "is this email address the user themselves?" while building entity rows. Writing those rows is the module's job now; reading them never was anything but memory's.sync::workspace::cadence—effective_interval_secs,connection_is_due,periodic_pause_reason. None of it is source-specific: it is about the user's cadence setting and the machine's pause policy, and the answers are the same for a folder or an RSS feed.sync::usage::ProviderUsage— what one run cost. It is what the sync audit log records, and the audit log is this crate's.SourceKind::Composio— kept. Rows already written are still stored, queried, and forgotten under it, and removing the kind would orphan every one of them. What left is the reading.Public API / behaviour changes
sources::readers::reader_forreturnsOption<Box<dyn SourceReader>>.NoneforSourceKind::Composio. A stub reader that always errored would let a caller call it and discover the same thing at runtime, once per item; theOptionmakes the caller decide up front.engine::sync::run_source_pipelinerefuses a Composio source rather than skipping it. A pipeline that answered "0 records, no error" for a source it never read would advance the caller's cursor past items nobody looked at, and report a healthy sync while the user's mail stopped arriving.engine:run_composio_connection,run_composio_connection_with_budgets,load_composio_sync_state,run_slack_search_backfill,run_gmail_backfill.sources::reconcile:ensure_composio_sources. It scanned Composio live; that scan is the host's, through the module. The caps migration stays.Validation
Sequencing
Depends on openhuman#5849, which moves every caller onto the module. Do not merge before it.