Turtle
c7c1b97501
fix(agent-loop): address second-round review — disposal discard, injection validation, frozen payloads
...
Address the review bot's five genuinely-new findings on the current code:
- disposal now discards any still-pending inbox items before the loop
exits, so every enqueued id gets a terminal lifecycle event.
- injection (next-step/no-wakeup) validates its payload up front, before
opening the idle one-shot turn, honoring 'invalid input throws before
any append'; and rejects attached contexts (which belong only to inbox
messages) rather than silently dropping them.
- agentMessage() freezes the agent/inbox/* payload so a listener cannot
mutate the shared correlation object mid-dispatch.
- refresh the package READMEs (compact, goal, guard, hook-protocol,
plan-mode, time-context, workspace-context) that still referenced the
removed context/message event, with the source-based user/message
distinction.
The up-front injection validation makes two finally branches unreachable
(v8-ignored as the turn-enclosure backstop). Adds regression tests for
disposal discard, context rejection, up-front validation, and the frozen
payload; per-file coverage stays 100%.
2026-07-24 12:05:57 +08:00
..
2026-07-20 16:22:20 +08:00
2026-07-21 01:11:55 +08:00
2026-07-20 00:35:06 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-21 01:11:55 +08:00
2026-07-20 00:25:31 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-21 14:50:06 +08:00
2026-07-20 00:35:06 +08:00
2026-07-21 03:22:14 +08:00
2026-07-21 12:48:46 +08:00
2026-07-20 19:42:41 +08:00
2026-07-23 21:33:28 +08:00
2026-07-19 22:52:03 +08:00
2026-07-23 20:35:09 +08:00
2026-07-23 20:50:45 +08:00
2026-07-23 03:59:35 +08:00
2026-07-20 18:38:22 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-21 20:49:14 +08:00
2026-07-21 03:22:14 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-20 19:26:04 +08:00
2026-07-21 21:11:32 +08:00
2026-07-19 22:52:03 +08:00
2026-07-20 20:39:13 +08:00
2026-07-20 20:39:13 +08:00
2026-07-20 03:34:19 +08:00
2026-07-21 03:22:14 +08:00
2026-07-21 23:39:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-21 03:22:14 +08:00
2026-07-21 10:17:55 +08:00
2026-07-21 10:17:55 +08:00
2026-07-21 10:17:55 +08:00
2026-07-22 16:37:20 +08:00
2026-07-22 16:37:20 +08:00
2026-07-22 16:37:20 +08:00
2026-07-23 03:15:15 +08:00
2026-07-22 12:06:42 +08:00
2026-07-22 12:06:42 +08:00
2026-07-22 12:06:42 +08:00
2026-07-20 03:34:19 +08:00
2026-07-20 03:34:19 +08:00
2026-07-20 03:34:19 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-19 22:52:03 +08:00
2026-07-21 13:52:15 +08:00
2026-07-21 13:52:15 +08:00
2026-07-21 13:52:15 +08:00
2026-07-21 21:11:32 +08:00
2026-07-21 21:11:32 +08:00
2026-07-21 21:11:32 +08:00
2026-07-21 12:48:46 +08:00
2026-07-21 12:48:46 +08:00
2026-07-21 12:48:46 +08:00
2026-07-23 03:15:15 +08:00
2026-07-23 03:15:15 +08:00
2026-07-23 03:15:15 +08:00
2026-07-23 03:59:35 +08:00
2026-07-23 03:59:35 +08:00
2026-07-23 03:59:35 +08:00
2026-07-23 17:49:47 +08:00
2026-07-23 17:49:47 +08:00
2026-07-23 17:49:47 +08:00
2026-07-21 20:15:09 +08:00
2026-07-21 20:15:09 +08:00
2026-07-21 20:15:09 +08:00
2026-07-21 01:13:28 +08:00
2026-07-21 01:13:28 +08:00
2026-07-21 01:13:28 +08:00
2026-07-23 15:54:10 +08:00
2026-07-23 15:54:10 +08:00
2026-07-23 15:54:10 +08:00
2026-07-23 01:38:52 +08:00
2026-07-23 01:38:52 +08:00
2026-07-23 01:38:52 +08:00
2026-07-20 15:34:00 +08:00
2026-07-20 15:34:00 +08:00
2026-07-20 15:34:00 +08:00
2026-07-23 02:12:47 +08:00
2026-07-23 02:12:47 +08:00
2026-07-23 02:12:47 +08:00
2026-07-23 18:19:07 +08:00
2026-07-23 18:19:07 +08:00
2026-07-23 18:19:07 +08:00
2026-07-22 21:30:17 -07:00
2026-07-22 21:30:17 -07:00
2026-07-22 21:30:17 -07:00
2026-07-24 12:05:57 +08:00
2026-07-24 12:05:57 +08:00
2026-07-24 12:05:57 +08:00
2026-07-23 17:49:47 +08:00
2026-07-23 17:49:47 +08:00
2026-07-23 17:49:47 +08:00
2026-07-23 20:18:05 +08:00
2026-07-23 20:18:05 +08:00
2026-07-23 20:18:05 +08:00
2026-07-21 15:57:17 +08:00
2026-07-21 15:57:17 +08:00
2026-07-21 15:57:17 +08:00