trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

Explicit runIds bulk cancel silently excludes runs older than seven days

Open jenslys opened this issue 3 weeks ago • 1 comments

SDK 4.8.3, Trigger.dev Cloud. Observed during a real cancellation; hosted backend revision unknown.

Reproduce

  1. Select two cancellable runs in one environment: one created within seven days, one still DELAYED and older than seven days.
  2. Call runs.bulk.cancel({ runIds: [recentRunId, oldDelayedRunId] }) and poll to completion.
  3. Retrieve the older run directly.

Expected: both explicit IDs are selected. The documentation says the seven-day default applies only to filter selections.

Actual: only recent IDs contribute to counts.total/success; failure is zero. The omitted older run remains DELAYED and directly retrievable. No time filter was supplied. We stopped on the count mismatch.

Matching public source: at bdcbc61ab2871f7cc81f29ec36e42c8676ff6aa9, freezeRunListFilters leaves explicit IDs unbounded. However, convertRunListInputOptionsToFilterRunsOptions calls timeFilters without dates, reintroducing its 7d default for both count and batch selection. This source behavior matches the Cloud observation; its deployed revision is not established.

Suggested regression: count and paginated selection include explicit IDs at T−30 days and T−1 day; filter-only calls without a range retain the seven-day default.

jenslys avatar Nov 10 '26 22:11 jenslys

I have submitted a fix in PR #5112 (https://github.com/triggerdotdev/trigger.dev/pull/5112) with full unit test coverage (6 tests passing, Exit Code 0).

granbellllc-png avatar Nov 11 '26 01:11 granbellllc-png