John Paul Soliva
fc3533d123
fix(gateway): reap an abandoned turn's background jobs by owner, not container key
...
The terminal tool stores the container key in ProcessSession.task_id
(`session:<key>` on local/SSH, `default` / `profile:<name>` under
persistent Docker) and the spawning turn's id in owner_task_id. The
abandoned-turn cleanup from #76687 (/stop, /new, eviction, the
inactivity watchdog, API-server disconnect and /v1/runs stop) snapshots
and reaps by the turn's raw session id, and snapshot_running_ids /
kill_all compared it against task_id, so they never matched: the
turn's background jobs kept running after the turn was abandoned, and a
notify_on_complete job woke the session later. process_manage(list)
missed the session's own jobs for the same reason.
Match ownership on owner_task_id in snapshot_running_ids, kill_all
(and so kill_started_since) and list_sessions(task_id=), falling back
to task_id for entries without an owner. has_active_processes stays on
the container key: its caller passes container keys.
The two new tests spawn through the real terminal tool inside a session
context and drive the real /stop core and inactivity watchdog; both
fail on the previous code.
(cherry picked from commit 1735bbf84dae90ea2c68499a8971f6bed1570366)
2026-09-24 16:04:05 +05:30
..
2026-09-23 19:54:47 -07:00
2026-09-23 18:52:49 -05:00
2026-09-23 06:46:02 -07:00
2026-09-23 17:09:54 -07:00
2026-09-21 15:02:49 -07:00
2026-09-15 04:12:13 -07:00
2026-09-20 15:32:00 -07:00
2026-09-17 09:04:38 -07:00
2026-09-15 21:46:37 -07:00
2026-09-20 15:32:42 -07:00
2026-09-19 23:41:45 -07:00
2026-09-20 18:50:37 -07:00
2026-09-24 02:41:14 -05:00
2026-09-17 21:17:26 +05:30
2026-09-20 10:16:51 -07:00
2026-09-20 13:54:22 -07:00
2026-09-24 05:30:52 -05:00
2026-09-24 05:29:27 -05:00
2026-09-20 11:51:14 -07:00
2026-09-16 16:59:03 -07:00
2026-09-23 18:52:49 -05:00
2026-09-18 10:28:40 -07:00
2026-09-15 06:16:38 -07:00
2026-09-23 18:52:49 -05:00
2026-09-23 06:46:02 -07:00
2026-09-18 19:20:01 -07:00
2026-09-18 19:20:01 -07:00
2026-09-23 03:25:06 -07:00
2026-09-17 09:02:55 -07:00
2026-09-19 22:51:13 -07:00
2026-09-18 14:09:20 -07:00
2026-09-18 14:06:15 -07:00
2026-09-16 14:34:22 -07:00
2026-09-21 08:58:37 -07:00
2026-09-16 17:47:50 -07:00
2026-09-19 10:44:26 -07:00
2026-09-21 15:02:49 -07:00
2026-09-19 10:44:26 -07:00
2026-09-15 03:45:41 -07:00
2026-09-20 15:49:52 -07:00
2026-09-20 15:54:45 -07:00
2026-09-21 02:52:15 -07:00
2026-09-15 18:41:46 -07:00
2026-09-20 15:50:20 -07:00
2026-09-23 10:42:18 -04:00
2026-09-20 09:52:22 -07:00
2026-09-19 23:57:59 -07:00
2026-09-13 21:05:42 -07:00
2026-09-15 18:40:52 -07:00
2026-09-22 13:57:51 +05:30
2026-09-15 03:45:41 -07:00
2026-09-20 12:53:47 -07:00
2026-09-21 10:40:03 -07:00
2026-09-21 18:39:24 -07:00
2026-09-19 01:32:28 -07:00
2026-09-20 10:44:16 -07:00
2026-09-21 18:39:24 -07:00
2026-09-18 10:10:40 -07:00
2026-09-18 10:38:08 -07:00
2026-09-21 18:39:24 -07:00
2026-09-17 21:17:26 +05:30
2026-09-21 18:39:24 -07:00
2026-09-24 15:58:26 +05:30
2026-09-16 16:59:03 -07:00
2026-09-13 21:03:11 -07:00
2026-09-16 16:42:47 -07:00
2026-09-21 10:40:03 -07:00
2026-09-16 17:21:14 -07:00
2026-09-19 10:44:26 -07:00
2026-09-23 08:09:47 -07:00
2026-09-23 10:07:51 -07:00
2026-09-23 06:46:02 -07:00
2026-09-21 10:04:32 +05:30
2026-09-22 17:54:42 +05:30
2026-09-20 18:22:18 -07:00
2026-09-18 12:47:49 -07:00
2026-09-20 19:02:21 -07:00
2026-09-20 12:40:36 -07:00
2026-09-23 15:43:51 -07:00
2026-09-22 22:00:24 +00:00
2026-09-20 15:34:58 -07:00
2026-09-23 06:46:02 -07:00
2026-09-20 10:07:26 -07:00
2026-09-22 17:54:42 +05:30
2026-09-17 19:06:29 -04:00
2026-09-23 06:46:02 -07:00
2026-09-23 11:45:12 +05:30
2026-09-21 13:14:22 -07:00
2026-09-22 22:00:24 +00:00
2026-09-22 17:54:42 +05:30
2026-09-21 01:44:16 -07:00
2026-09-24 15:38:22 +05:30
2026-09-24 15:38:22 +05:30
2026-09-23 06:46:02 -07:00
2026-09-13 20:46:22 -07:00
2026-09-20 10:57:35 -07:00
2026-09-20 11:49:00 -07:00
2026-09-20 11:49:00 -07:00
2026-09-21 15:02:49 -07:00
2026-09-16 00:32:15 -07:00
2026-09-24 16:04:05 +05:30
2026-09-24 03:52:03 -05:00
2026-09-19 10:44:26 -07:00
2026-09-23 21:28:38 +05:30
2026-09-19 10:16:59 -07:00
2026-09-23 18:52:49 -05:00
2026-09-20 11:20:26 -07:00
2026-09-20 11:12:48 -07:00
2026-09-23 18:29:35 -05:00
2026-09-18 09:35:16 -07:00
2026-09-22 16:16:30 +05:30
2026-09-22 12:52:49 +05:30
2026-09-22 12:52:49 +05:30
2026-09-22 12:52:49 +05:30
2026-09-19 09:20:54 -07:00
2026-09-20 16:21:37 -07:00
2026-09-22 15:59:17 +05:30
2026-09-22 15:59:17 +05:30
2026-09-20 16:00:26 -07:00
2026-09-22 15:59:17 +05:30
2026-09-15 14:15:59 +05:30
2026-09-22 15:59:17 +05:30
2026-09-20 12:58:32 -07:00
2026-09-22 15:59:17 +05:30
2026-09-16 00:32:15 -07:00
2026-09-16 17:23:44 -07:00
2026-09-15 18:33:15 -07:00
2026-09-22 17:08:30 +05:30
2026-09-19 01:29:03 -07:00
2026-09-22 16:15:34 +05:30
2026-09-18 09:54:45 -07:00
2026-09-21 15:02:49 -07:00
2026-09-18 12:49:13 -07:00
2026-09-23 17:09:54 -07:00
2026-09-15 10:48:49 +05:30
2026-09-15 02:22:22 -05:00
2026-09-23 16:58:12 -07:00
2026-09-20 11:30:03 -07:00
2026-09-18 09:59:54 -07:00
2026-09-20 10:17:04 -07:00
2026-09-22 13:57:51 +05:30
2026-09-19 10:44:26 -07:00
2026-09-22 17:54:42 +05:30
2026-09-19 10:03:11 -07:00
2026-09-23 11:54:30 +05:30
2026-09-22 13:40:29 +05:30
2026-09-19 10:12:15 -07:00
2026-09-19 10:12:15 -07:00
2026-09-15 05:36:37 -07:00
2026-09-22 13:40:29 +05:30
2026-09-20 10:50:27 -07:00
2026-09-23 18:30:12 -05:00
2026-09-24 02:39:10 -05:00
2026-09-19 10:10:29 -07:00
2026-09-20 10:50:27 -07:00
2026-09-20 10:25:30 -07:00
2026-09-20 10:57:35 -07:00
2026-09-20 15:28:59 -07:00
2026-09-19 12:22:44 -07:00
2026-09-19 09:52:18 -07:00
2026-09-19 09:56:12 -07:00
2026-09-20 10:16:27 -07:00
2026-09-19 10:54:38 -07:00
2026-09-22 01:13:23 -07:00
2026-09-20 18:26:41 -07:00
2026-09-15 18:42:38 -07:00
2026-09-15 18:43:05 -07:00
2026-09-19 03:07:47 -07:00
2026-09-20 10:14:37 -07:00
2026-09-18 09:19:04 -07:00
2026-09-19 12:22:44 -07:00