Skip to content

Trigger/RPC-driven Composio syncs discard the source's registry caps #49

Description

@YellowSnnowmann

Found by the #18 end-to-end review. Pre-existing on main — not introduced by the sync move; filed separately so it is tracked rather than folded into #48.

core/src/sync/composio/mod.rs (run_connection_sync) reads the user's per-source max_items / sync_depth_days from the registry, logs them as caps from registry, then discards them:

let _ = (provider, src_max_items, src_sync_depth_days);

and dispatches the connection with no budgets. The periodic scheduler passes the caps; the trigger-driven and RPC-driven paths do not.

Failure scenario: a user caps Gmail at max_items=10, sync_depth_days=7 to control Composio spend. A GMAIL_NEW_GMAIL_MESSAGE trigger fires → the pipeline runs uncapped → the caps only hold when the periodic loop happens to be the caller.

Fix is now one line: post-#48, sync::pipelines::host::run_composio_connection takes (max_items, sync_depth_days) directly — pass src_max_items, src_sync_depth_days instead of None, None and delete the let _. Left out of #48 deliberately: that PR is a move, and a behaviour change hidden inside a relocation is how regressions go unreviewed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions