Phil Larson
30a83f21fc
fix(engine): requeue stale assistant continuations ( #2095 )
...
## Summary
- detect persisted executor sessions that cannot continue from an
assistant message
- clear the stale session pointer after the executor lock is released
- requeue the task with workflow progress preserved instead of marking
it failed
## Test plan
- `pnpm --filter @fusion/engine exec vitest run
src/__tests__/executor-step-session.test.ts -t "clears a stale
assistant-continuation resume session and requeues without marking the
task failed" --project=engine-default --silent=passed-only
--reporter=dot`
- `pnpm --filter @fusion/engine typecheck`
- `pnpm build`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved recovery when an assistant continuation session becomes stale
by restarting a fresh session with bounded retries, preserving overall
task progress.
* Clears invalid persisted session/continuation state and defers requeue
until coordination cleanup is safe.
* When retries are exhausted, tasks are marked failed and the error
callback runs (without routing to review).
* **Tests**
* Added coverage for stale-session recovery, repeated-stale behavior,
correct (or skipped) requeue decisions, and progress/error handling
paths.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-14 08:21:19 -07:00
..
2026-07-14 08:21:19 -07:00
2026-05-23 02:29:38 -07:00
2026-07-13 19:07:58 -07:00
2026-07-13 19:07:58 -07:00
2026-05-20 15:54:44 -07:00
2026-05-29 20:05:14 -07:00
2026-07-13 19:07:58 -07:00
2026-06-29 04:12:13 -07:00
2026-05-21 12:04:58 -07:00
2026-05-19 17:19:02 -07:00
2026-06-26 16:14:44 -07:00
2026-07-13 19:07:58 -07:00
2026-07-06 19:03:07 -07:00
2026-06-13 04:54:59 -07:00
2026-06-04 22:53:02 -07:00
2026-07-05 11:31:48 -07:00
2026-06-22 01:37:59 -07:00
2026-07-12 13:56:36 -07:00
2026-07-12 10:04:29 -07:00
2026-07-14 08:17:36 -07:00
2026-07-10 07:46:52 -07:00
2026-07-04 10:42:21 -07:00
2026-07-04 21:28:15 -07:00
2026-07-10 11:53:07 -07:00
2026-07-13 08:10:56 -07:00
2026-07-14 08:17:36 -07:00
2026-06-30 12:56:03 -07:00
2026-07-03 22:04:45 -07:00
2026-07-07 22:06:21 -07:00
2026-06-21 16:23:42 -07:00
2026-06-07 20:43:44 -07:00
2026-07-01 09:06:01 -07:00
2026-05-21 12:49:50 -07:00
2026-07-13 19:07:58 -07:00
2026-06-22 03:04:21 -07:00
2026-05-20 08:23:40 -07:00
2026-05-23 00:03:12 -07:00
2026-06-09 15:21:39 -07:00
2026-06-15 12:34:44 -07:00
2026-06-26 16:14:44 -07:00
2026-06-15 02:30:41 -07:00
2026-06-04 16:16:50 -07:00
2026-06-27 21:39:40 -07:00
2026-07-14 08:17:36 -07:00
2026-07-08 23:40:52 -07:00
2026-06-01 08:23:02 -07:00
2026-07-13 19:07:58 -07:00
2026-06-27 12:20:42 -07:00
2026-06-07 23:03:38 -07:00
2026-05-19 22:50:39 -07:00
2026-05-14 19:26:58 -07:00
2026-07-13 19:07:58 -07:00
2026-05-29 10:23:59 -07:00
2026-06-26 00:57:32 -07:00
2026-07-14 08:21:19 -07:00
2026-07-13 19:07:58 -07:00
2026-07-12 21:39:23 -07:00
2026-07-13 19:07:58 -07:00
2026-05-29 07:11:00 -07:00
2026-07-13 19:07:58 -07:00
2026-06-25 08:35:44 -07:00
2026-07-13 19:07:58 -07:00
2026-05-14 04:32:42 -07:00
2026-05-14 04:32:43 -07:00
2026-07-13 19:07:58 -07:00
2026-05-26 21:57:31 -07:00
2026-05-16 17:31:09 -07:00
2026-07-12 21:39:23 -07:00
2026-07-02 13:07:16 -07:00
2026-07-01 09:41:20 -07:00
2026-06-05 20:05:29 -07:00
2026-06-26 11:56:12 -07:00
2026-07-12 13:56:36 -07:00
2026-07-14 08:18:52 -07:00
2026-07-12 13:56:36 -07:00
2026-06-26 00:57:32 -07:00
2026-07-02 11:38:32 -07:00
2026-06-22 19:48:50 -07:00
2026-06-25 20:12:20 -07:00
2026-06-25 20:12:20 -07:00
2026-07-11 22:16:48 -07:00
2026-05-28 15:04:41 -07:00
2026-05-26 21:57:31 -07:00
2026-07-13 19:07:58 -07:00
2026-05-23 09:59:50 -07:00
2026-07-11 22:16:48 -07:00
2026-05-21 16:30:31 -07:00
2026-07-13 19:07:58 -07:00
2026-05-16 23:45:17 -07:00
2026-07-13 19:07:58 -07:00
2026-07-13 19:07:58 -07:00
2026-05-30 09:43:02 -07:00
2026-06-13 16:16:52 -07:00
2026-06-19 23:50:37 +00:00
2026-05-16 17:31:09 -07:00
2026-06-29 08:49:59 -07:00
2026-07-09 19:58:06 -07:00
2026-07-13 19:07:58 -07:00
2026-07-09 19:58:07 -07:00
2026-07-12 13:56:36 -07:00
2026-07-04 21:28:16 -07:00
2026-07-09 19:58:07 -07:00
2026-07-08 15:09:26 -07:00
2026-06-04 12:44:43 -07:00
2026-07-13 19:07:58 -07:00
2026-06-04 07:34:02 -07:00
2026-06-07 21:19:10 -07:00
2026-07-13 19:07:58 -07:00
2026-05-19 19:28:05 -07:00
2026-07-13 19:07:58 -07:00
2026-07-13 19:07:58 -07:00
2026-07-10 01:15:40 -07:00
2026-07-13 19:07:58 -07:00
2026-07-13 19:07:58 -07:00
2026-07-13 19:07:58 -07:00
2026-07-13 19:07:58 -07:00
2026-06-29 01:05:44 -07:00
2026-06-11 21:00:23 -07:00
2026-07-07 22:04:51 -07:00
2026-07-09 19:58:03 -07:00
2026-06-04 22:53:02 -07:00
2026-07-12 13:57:08 -07:00
2026-07-12 19:47:27 -07:00
2026-07-13 19:07:58 -07:00
2026-07-13 19:07:58 -07:00
2026-07-10 22:25:21 -07:00
2026-05-14 22:16:44 -07:00
2026-06-07 23:03:38 -07:00
2026-07-01 16:38:27 -07:00
2026-07-12 12:47:38 -07:00
2026-05-17 02:08:01 -07:00
2026-05-21 00:17:33 -07:00
2026-07-12 20:09:57 -07:00
2026-07-12 23:26:02 -07:00
2026-06-25 16:22:40 -07:00
2026-06-25 23:25:23 -07:00
2026-07-08 12:29:14 -04:00
2026-07-13 19:07:58 -07:00
2026-05-19 14:22:11 -07:00
2026-07-13 19:07:58 -07:00
2026-07-12 12:47:38 -07:00
2026-06-19 16:47:34 -07:00
2026-07-12 11:15:52 -07:00
2026-05-23 14:26:57 -07:00
2026-05-30 21:53:00 -07:00
2026-05-14 05:55:16 -07:00
2026-06-04 14:01:55 -07:00
2026-06-29 03:15:30 -07:00
2026-07-12 12:47:38 -07:00
2026-05-31 23:24:53 -07:00
2026-06-18 00:39:01 -07:00
2026-06-23 10:30:50 -07:00
2026-07-05 11:31:48 -07:00
2026-05-14 08:24:01 -07:00
2026-05-28 21:23:48 -07:00
2026-07-14 08:17:36 -07:00
2026-07-12 16:25:48 -07:00
2026-06-12 06:49:29 -07:00
2026-05-18 00:53:23 -07:00
2026-07-14 08:15:09 -07:00
2026-07-13 19:07:58 -07:00
2026-05-19 19:28:05 -07:00
2026-06-25 14:43:41 -07:00
2026-07-02 07:32:47 -07:00
2026-06-29 10:32:51 -07:00
2026-07-01 00:51:01 -07:00
2026-06-04 07:34:02 -07:00
2026-07-07 22:06:18 -07:00
2026-06-29 18:05:44 -07:00
2026-06-25 22:33:08 -07:00
2026-07-01 11:28:03 -07:00
2026-06-11 08:43:27 -07:00
2026-07-10 01:49:15 -07:00
2026-07-01 00:51:01 -07:00
2026-05-31 08:32:01 -07:00
2026-07-01 00:51:01 -07:00
2026-07-01 00:51:01 -07:00
2026-07-01 00:51:01 -07:00
2026-06-30 00:09:36 -07:00
2026-06-29 10:32:51 -07:00
2026-06-11 08:43:28 -07:00
2026-06-09 20:44:45 -07:00
2026-07-07 10:25:11 -07:00
2026-06-21 23:02:46 -07:00
2026-07-07 08:42:47 -07:00
2026-06-26 13:13:46 -07:00
2026-06-25 08:34:44 -07:00
2026-07-13 19:07:58 -07:00
2026-05-18 01:50:22 -07:00
2026-06-26 13:13:46 -07:00
2026-06-04 13:04:15 -07:00
2026-06-12 12:49:34 -07:00
2026-07-10 21:19:22 -07:00
2026-05-18 11:01:32 -07:00
2026-05-23 15:13:17 -07:00
2026-05-16 20:54:33 -07:00
2026-05-18 15:51:01 -07:00
2026-05-15 22:18:09 -07:00
2026-07-13 19:07:58 -07:00