Teknium
92fec1607b
fix(tools): processes.json writers keep the worker handoffs they do not track
...
Mechanism: _write_checkpoint rebuilt the profile's processes.json from the
writer's own _running table (+ extra_entries) and atomic-replaced it, with no
read-merge and no lock. This PR made that file the only handoff of a managed
worker's background process to the next interpreter (recover_from_checkpoint
adopts the entry's output_log and tails it), and the always-running owner is
now a routine writer: the owner's next own process start/exit/kill (or a
second concurrent worker) dropped the worker's entry. The process kept
running and logging, but nobody tailed it: notify_on_complete never fired and
process poll/kill could not see it. (The generic CLI-vs-gateway overwrite race
stays pre-existing per round-12 N58; this fixes the PR's own handoff.)
Fix: read-merge-write under an exclusive file lock (processes.json.lock, the
active_sessions _FileLock: fcntl / msvcrt). A writer keeps on-disk entries it
neither runs nor has finished, but only worker handoffs whose output log
still decides an outcome: the log exists and either its recorded .exit is
waiting or the pid is alive with the same start time. Dead, recycled or
non-handoff foreign entries are still dropped.
Red on r13-base2: tests/tools/test_process_checkpoint_worker_handoff.py (real
live process, real checkpoint file): the owner's write dropped proc_worker;
after the fix it is kept, a dead handoff is dropped, and the successor
registry adopts the worker's process.
Review: ahrazzle B2-04
2026-10-11 19:31:36 -07:00
..
2026-10-10 15:20:13 +02:00
2026-10-10 15:20:13 +02:00
2026-10-11 17:21:07 +05:30
2026-10-10 15:20:13 +02:00
2026-10-08 19:00:45 -07:00
2026-09-29 12:25:29 -05:00
2026-09-28 10:21:41 -07:00
2026-10-09 10:24:04 -07:00
2026-10-06 14:22:13 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-07 06:48:09 -07:00
2026-10-08 12:07:00 -07:00
2026-10-08 04:19:43 -07:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:13 +02:00
2026-10-11 11:24:19 -07:00
2026-10-08 19:54:07 +02:00
2026-10-01 16:18:46 +05:30
2026-10-10 17:59:08 -07:00
2026-10-09 10:24:04 -07:00
2026-10-08 12:09:24 -07:00
2026-10-09 10:24:04 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:31:52 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:13 +02:00
2026-10-09 02:04:29 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-06 14:24:24 -07:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 23:42:04 -07:00
2026-10-10 23:51:59 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 13:29:32 -07:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:13 +02:00
2026-10-09 17:31:26 -07:00
2026-10-08 17:22:54 +02:00
2026-09-28 10:21:41 -07:00
2026-10-10 15:20:13 +02:00
2026-10-09 17:31:52 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:54:07 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:31:52 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 12:09:24 -07:00
2026-10-08 21:29:48 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:14 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 10:24:04 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-09-29 12:25:29 -05:00
2026-10-05 16:46:53 -05:00
2026-09-28 10:21:41 -07:00
2026-10-09 17:31:52 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:13 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 19:54:07 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 21:29:48 +02:00
2026-10-08 21:38:54 -07:00
2026-10-08 21:29:48 +02:00
2026-09-28 10:21:41 -07:00
2026-10-02 01:15:39 +05:30
2026-10-08 19:54:07 +02:00
2026-10-05 01:15:16 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 15:36:14 -04:00
2026-10-08 17:22:54 +02:00
2026-10-07 11:19:10 +05:30
2026-10-02 20:24:01 -05:00
2026-09-29 15:08:07 +05:30
2026-10-09 17:34:36 +02:00
2026-10-08 21:38:05 +02:00
2026-10-03 10:26:12 -07:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 14:25:07 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-09-28 02:03:42 +05:30
2026-10-09 10:24:04 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 12:09:24 -07:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 14:25:07 -07:00
2026-10-09 17:31:52 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 10:24:04 -07:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-09-28 10:21:41 -07:00
2026-10-08 17:22:54 +02:00
2026-09-28 10:21:41 -07:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:31:52 +02:00
2026-09-28 10:21:41 -07:00
2026-10-11 04:37:57 -07:00
2026-10-11 04:37:57 -07:00
2026-09-28 10:21:41 -07:00
2026-10-11 19:31:36 -07:00
2026-10-06 00:00:57 -04:00
2026-10-11 19:27:06 +02:00
2026-10-08 19:08:59 -07:00
2026-10-10 15:20:13 +02:00
2026-10-07 10:57:33 -07:00
2026-10-11 11:24:19 -07:00
2026-09-28 10:21:41 -07:00
2026-10-10 15:20:13 +02:00
2026-09-29 12:25:29 -05:00
2026-09-29 12:25:29 -05:00
2026-09-28 10:21:41 -07:00
2026-10-08 21:38:54 -07:00
2026-10-07 01:03:03 +05:30
2026-10-10 15:20:14 +02:00
2026-10-04 00:08:20 -07:00
2026-10-08 17:22:54 +02:00
2026-10-09 10:24:04 -07:00
2026-10-08 00:41:21 +05:30
2026-10-09 17:34:36 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 21:29:48 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 17:34:36 +02:00
2026-10-10 15:20:13 +02:00
2026-10-08 17:22:54 +02:00
2026-10-11 04:37:57 -07:00
2026-10-08 17:22:54 +02:00
2026-10-09 13:58:16 -07:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:31:52 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:34:36 +02:00
2026-10-09 13:58:16 -07:00
2026-10-09 17:34:36 +02:00
2026-10-09 14:25:07 -07:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 21:38:54 -07:00
2026-10-08 17:22:54 +02:00
2026-09-30 12:00:50 +05:30
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:13 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 10:24:04 -07:00
2026-10-10 15:20:13 +02:00
2026-10-08 17:22:54 +02:00
2026-09-26 18:27:10 -05:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-02 22:42:55 -05:00
2026-10-08 19:42:29 +02:00
2026-10-05 20:08:11 +05:30
2026-10-08 17:22:54 +02:00
2026-10-08 19:54:07 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-11 17:21:07 +05:30
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:31:52 +02:00
2026-10-09 17:34:38 +02:00
2026-10-07 01:02:34 +05:30
2026-10-07 01:02:34 +05:30
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-05 12:37:46 -04:00
2026-10-10 15:20:13 +02:00
2026-10-09 17:34:38 +02:00
2026-09-30 23:02:33 -05:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:13 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-09 02:34:03 -07:00
2026-09-28 10:21:41 -07:00
2026-10-08 17:22:54 +02:00
2026-10-01 01:50:16 -05:00
2026-10-08 21:29:48 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:14 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:38 +02:00
2026-10-08 21:29:48 +02:00
2026-10-08 17:22:54 +02:00
2026-10-10 15:20:13 +02:00
2026-10-08 17:22:54 +02:00
2026-10-09 17:34:36 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00
2026-10-08 17:22:54 +02:00