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.
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-sourcemax_items/sync_depth_daysfrom the registry, logs them ascaps from registry, then discards them: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=7to control Composio spend. AGMAIL_NEW_GMAIL_MESSAGEtrigger 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_connectiontakes(max_items, sync_depth_days)directly — passsrc_max_items, src_sync_depth_daysinstead ofNone, Noneand delete thelet _. Left out of #48 deliberately: that PR is a move, and a behaviour change hidden inside a relocation is how regressions go unreviewed.