Tyler Yust
07375a65d8
fix(cron): recover flat params when LLM omits job wrapper ( #12124 )
...
* fix(cron): recover flat params when LLM omits job wrapper (#11310 )
Non-frontier models (e.g. Grok) flatten job properties to the top level
alongside `action` instead of nesting them inside the `job` parameter.
The opaque schema (`Type.Object({}, { additionalProperties: true })`)
gives these models no structural hint, so they put name, schedule,
payload, etc. as siblings of action.
Add a flat-params recovery step in the cron add handler: when
`params.job` is missing or an empty object, scan for recognised job
property names on params and construct a synthetic job object before
passing to `normalizeCronJobCreate`. Recovery requires at least one
meaningful signal field (schedule, payload, message, or text) to avoid
false positives.
Added tests:
- Flat params with no job wrapper → recovered
- Empty job object + flat params → recovered
- Message shorthand at top level → inferred as agentTurn
- No meaningful fields → still throws 'job required'
- Non-empty job takes precedence over flat params
* fix(cron): floor nowMs to second boundary before croner lookback
Cron expressions operate at second granularity. When nowMs falls
mid-second (e.g. 12:00:00.500) and the pattern targets that exact
second (like '0 0 12 * * *'), a 1ms lookback still lands inside the
matching second. Croner interprets this as 'already past' and skips
to the next occurrence (e.g. the following day).
Fix: floor nowMs to the start of the current second before applying
the 1ms lookback. This ensures the reference always falls in the
*previous* second, so croner correctly identifies the current match.
Also compare the result against the floored nowSecondMs (not raw nowMs)
so that a match at the start of the current second is not rejected by
the >= guard when nowMs has sub-second offset.
Adds regression tests for 6-field cron patterns with specific seconds.
* fix: add changelog entries for cron fixes (#12124 ) (thanks @tyler6204)
* test: stabilize warning filter emit assertion (#12124 ) (thanks @tyler6204)
2026-02-08 23:10:09 -08:00
..
2026-02-04 04:10:13 -08:00
2026-02-07 09:32:31 -08:00
2026-02-07 17:07:12 -08:00
2026-02-09 09:20:52 +09:00
2026-02-01 19:52:56 +05:30
2026-02-07 22:16:59 -05:00
2026-01-31 16:19:20 +09:00
2026-02-09 06:41:53 +00:00
2026-01-23 18:34:33 +00:00
2026-02-08 23:10:09 -08:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-08 17:21:31 -08:00
2026-02-08 16:20:13 -05:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-02 16:18:09 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-17 08:26:12 +00:00
2026-01-31 16:19:20 +09:00
2026-01-30 03:16:21 +01:00
2026-02-02 21:44:02 +09:00
2026-02-01 15:37:19 -08:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-03 09:34:25 -08:00
2026-02-02 21:44:02 +09:00
2026-02-08 04:53:31 -08:00
2026-02-08 04:53:31 -08:00
2026-02-05 16:06:11 -08:00
2026-01-24 01:18:33 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-09 09:58:58 +09:00
2026-02-01 10:03:47 +09:00
2026-02-02 21:44:02 +09:00
2026-02-05 12:09:23 -08:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-06 13:16:58 -05:00
2026-02-06 13:16:58 -05:00
2026-01-31 16:19:20 +09:00
2026-02-04 04:10:13 -08:00
2026-02-05 20:37:53 +00:00
2026-02-05 20:37:53 +00:00
2026-02-01 19:52:56 +05:30
2026-02-01 20:04:53 +05:30
2026-01-31 16:19:20 +09:00
2026-01-31 16:19:20 +09:00
2026-02-05 16:54:44 -05:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-01-19 00:34:26 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-04 16:16:34 -05:00
2026-02-01 10:03:47 +09:00
2026-02-04 16:16:34 -05:00
2026-01-20 10:51:25 +00:00
2026-01-31 16:19:20 +09:00
2026-02-05 12:09:23 -08:00
2026-02-01 10:03:47 +09:00
2026-02-06 15:09:32 -06:00
2026-01-31 16:19:20 +09:00
2026-01-19 00:34:26 +00:00
2026-02-07 00:19:04 -08:00
2026-02-07 14:07:52 +08:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-05 16:54:44 -05:00
2026-02-01 10:03:47 +09:00
2026-01-31 07:54:15 +00:00
2026-02-05 16:54:44 -05:00
2026-02-05 16:54:44 -05:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-05 16:35:38 -08:00
2026-02-07 00:19:04 -08:00
2026-02-07 00:19:04 -08:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-09 09:58:58 +09:00
2026-02-02 04:45:14 -08:00
2026-01-31 16:19:20 +09:00
2026-02-02 17:36:49 +00:00
2026-01-31 16:19:20 +09:00
2026-02-05 17:50:57 -08:00
2026-01-31 16:19:20 +09:00
2026-02-07 20:02:32 -08:00
2026-01-31 16:19:20 +09:00
2026-02-06 18:03:03 -08:00
2026-02-07 20:02:32 -08:00
2026-01-31 16:19:20 +09:00
2026-02-07 20:02:32 -08:00
2026-02-04 01:03:59 -08:00
2026-02-05 16:54:44 -05:00
2026-02-05 19:55:02 -05:00
2026-02-02 01:22:41 -08:00
2026-02-02 01:22:41 -08:00
2026-01-27 16:02:19 -06:00
2026-02-02 16:18:09 +09:00
2026-02-05 13:58:43 -08:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-26 19:05:00 +00:00
2026-01-18 18:43:31 +00:00
2026-01-24 22:09:24 +00:00
2026-01-20 10:07:05 +00:00
2026-01-30 03:16:21 +01:00
2026-01-23 01:34:21 +00:00
2026-01-23 01:34:21 +00:00
2026-01-23 00:42:45 +00:00
2026-02-07 17:07:12 -08:00
2026-02-05 13:58:43 -08:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 19:30:33 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-02 02:28:22 -08:00
2026-01-31 16:19:20 +09:00
2026-02-09 09:20:52 +09:00
2026-01-22 23:51:59 +00:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-02 23:56:27 +00:00
2026-02-01 10:03:47 +09:00
2026-02-08 17:21:31 -08:00
2026-02-07 20:02:32 -08:00
2026-02-07 20:02:32 -08:00
2026-02-01 14:52:11 -08:00
2026-02-01 10:03:47 +09:00
2026-02-07 20:02:32 -08:00
2026-02-01 10:03:47 +09:00
2026-01-31 22:46:19 +05:30
2026-01-21 06:29:36 +00:00
2026-02-04 17:12:16 -05:00
2026-01-23 01:00:24 +00:00
2026-01-31 16:19:20 +09:00
2026-02-04 17:12:16 -05:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-07 20:02:32 -08:00
2026-02-01 10:03:47 +09:00
2026-01-26 20:35:06 +05:30
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-30 03:16:21 +01:00
2026-02-01 10:03:47 +09:00
2026-02-02 03:14:34 -08:00
2026-02-06 16:42:57 -06:00
2026-02-02 20:42:40 +00:00
2026-02-02 16:18:09 +09:00
2026-02-01 14:52:11 -08:00
2026-01-31 16:19:20 +09:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-02-01 10:03:47 +09:00
2026-01-24 01:30:44 +00:00
2026-02-01 10:03:47 +09:00
2026-02-02 21:33:36 +00:00
2026-02-05 16:37:58 -08:00
2026-01-31 16:19:20 +09:00
2026-02-04 19:49:36 -05:00
2026-02-02 16:18:09 +09:00
2026-02-04 19:49:36 -05:00
2026-02-05 16:37:58 -08:00
2026-02-01 10:03:47 +09:00
2026-01-17 08:06:35 +00:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-01-30 03:16:21 +01:00
2026-02-01 15:23:25 -08:00
2026-01-30 03:16:21 +01:00
2026-02-01 15:23:25 -08:00
2026-02-01 10:03:47 +09:00
2026-01-30 03:16:21 +01:00
2026-01-18 06:58:54 +00:00
2026-02-04 19:11:23 -05:00
2026-01-31 16:19:20 +09:00
2026-01-30 03:16:21 +01:00
2026-02-02 23:56:27 +00:00
2026-02-02 23:56:27 +00:00
2026-01-17 06:32:24 +00:00
2026-01-31 16:19:20 +09:00
2026-02-02 16:18:09 +09:00
2026-02-07 17:40:51 -08:00
2026-02-02 16:18:09 +09:00
2026-02-07 17:40:51 -08:00
2026-02-05 16:08:46 -08:00
2026-02-05 16:08:46 -08:00
2026-02-09 09:58:58 +09:00
2026-02-05 18:08:29 -08:00
2026-02-06 00:23:04 +05:30
2026-02-01 10:03:47 +09:00
2026-02-07 09:32:31 -08:00
2026-02-05 16:06:11 -08:00
2026-02-05 16:06:11 -08:00
2026-02-03 13:56:20 -05:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-31 16:19:20 +09:00
2026-01-31 16:04:04 +09:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-01-30 03:16:21 +01:00
2026-02-01 10:03:47 +09:00
2026-02-01 22:23:16 +00:00
2026-01-31 07:54:15 +00:00
2026-01-31 16:19:20 +09:00
2026-02-07 20:02:32 -08:00
2026-02-08 04:53:31 -08:00
2026-02-07 20:02:32 -08:00
2026-02-01 10:03:47 +09:00
2026-02-07 20:02:32 -08:00
2026-01-30 07:17:42 +01:00
2026-02-01 10:03:47 +09:00
2026-02-07 09:32:31 -08:00
2026-02-01 10:03:47 +09:00
2026-01-31 19:58:05 -06:00
2026-02-07 09:32:31 -08:00
2026-02-07 20:02:32 -08:00
2026-02-07 20:02:32 -08:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-02 17:36:49 +00:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 01:57:49 -08:00
2026-02-01 01:57:49 -08:00
2026-02-02 08:45:51 +00:00
2026-01-30 03:16:21 +01:00
2026-02-04 19:49:36 -05:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-07 20:02:32 -08:00
2026-02-07 20:02:32 -08:00
2026-01-25 02:43:08 +00:00
2026-02-08 16:20:13 -05:00
2026-02-06 13:16:58 -05:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-08 17:21:31 -08:00
2026-02-08 20:06:29 -05:00
2026-02-08 16:20:13 -05:00
2026-01-18 23:10:39 +00:00