BaaRai
54ff51177d
agent: guard prompt and wrap-up override hooks against concurrent access
...
PromptOverride, WrapupOverride, WrapupMaxTurnsOverride,
WrapupTaskTimeoutOverride and WrapupTaskTimeoutTurnsOverride are wired
in server.New while restored tasks may already render prompts and build
settlement configs on other goroutines. go test -race ./server reported
races between server.New (server.go:195/207/215) and agent.renderSystem /
resolveWrapup / resolveWrapupTurns.
Same treatment as the tool hooks: unexported variables behind a
sync.RWMutex (one for the prompt hook, one shared by the four wrap-up
hooks), Set* setters and getters, and readers that copy the function
value under the lock and call it outside. A nil hook still means the
built-in default.
TestAgentHooksConcurrentSwap now covers all eight hooks.
2026-11-14 14:19:13 +01:00
..
2026-10-12 06:26:51 +02:00
2026-11-12 01:30:17 +01:00
2026-11-14 14:19:13 +01:00
2026-11-14 13:46:03 +01:00
2026-11-12 07:37:58 +01:00
2026-11-14 01:02:16 +01:00
2026-11-12 12:35:06 +01:00
2026-11-12 12:35:06 +01:00
2026-11-13 19:15:59 +01:00
2026-11-14 01:02:16 +01:00
2026-10-10 18:12:42 +02:00
2026-11-12 17:27:28 +01:00
2026-11-12 20:16:23 +01:00
2026-11-10 17:45:11 +01:00
2026-11-12 22:35:11 +01:00
2026-10-08 23:14:34 +02:00
2026-10-08 23:14:34 +02:00
2026-11-13 12:05:14 +01:00
2026-10-08 23:14:34 +02:00
2026-10-08 23:14:34 +02:00
2026-11-12 00:37:44 +01:00
2026-10-08 23:14:34 +02:00
2026-11-12 20:48:34 +01:00
2026-11-12 20:48:34 +01:00
2026-11-12 01:30:17 +01:00
2026-11-12 01:30:17 +01:00
2026-10-12 07:30:27 +02:00
2026-07-26 04:27:45 -04:00
2026-09-10 14:08:40 +08:00
2026-11-12 00:37:44 +01:00
2026-10-12 07:29:59 +02:00
2026-10-12 06:25:35 +02:00
2026-11-11 23:43:12 +01:00
2026-11-14 13:46:03 +01:00
2026-10-08 23:14:34 +02:00
2026-11-14 13:46:03 +01:00
2026-11-14 13:46:03 +01:00
2026-11-12 07:37:58 +01:00
2026-11-10 22:14:24 +01:00
2026-10-08 23:14:34 +02:00
2026-11-13 12:05:14 +01:00
2026-10-08 23:14:34 +02:00
2026-11-13 12:17:51 +01:00
2026-11-13 12:17:51 +01:00
2026-10-12 06:45:21 +02:00
2026-11-13 12:05:14 +01:00
2026-11-14 14:19:13 +01:00
2026-11-14 14:19:13 +01:00
2026-11-14 14:19:13 +01:00
2026-11-14 14:19:13 +01:00
2026-11-12 00:37:44 +01:00
2026-08-25 09:40:05 -04:00
2026-11-08 17:11:43 +01:00
2026-11-03 23:20:21 +01:00
2026-10-08 23:14:34 +02:00
2026-08-25 11:39:24 -04:00
2026-11-08 17:11:43 +01:00
2026-09-07 10:43:38 -04:00
2026-10-12 06:26:51 +02:00
2026-11-12 22:35:11 +01:00
2026-08-24 19:29:00 +08:00
2026-11-14 01:02:16 +01:00
2026-11-14 01:02:16 +01:00
2026-11-13 19:15:59 +01:00
2026-11-14 01:02:16 +01:00
2026-09-07 11:21:50 -04:00
2026-10-08 23:14:34 +02:00
2026-09-10 21:42:25 +08:00
2026-10-21 14:46:56 +02:00
2026-11-11 00:34:55 +01:00
2026-07-26 04:27:45 -04:00
2026-11-10 17:45:11 +01:00
2026-10-08 23:14:34 +02:00
2026-10-12 18:43:29 +02:00
2026-11-10 09:46:49 +01:00
2026-11-14 13:46:03 +01:00
2026-11-14 13:46:03 +01:00
2026-11-12 15:42:31 +01:00
2026-11-02 09:05:03 +03:00
2026-10-08 23:14:34 +02:00
2026-11-13 16:22:37 +01:00
2026-10-08 23:14:34 +02:00
2026-10-08 23:14:34 +02:00
2026-11-12 20:16:23 +01:00
2026-11-12 14:46:44 +01:00
2026-11-12 14:46:44 +01:00
2026-11-11 21:59:09 +01:00
2026-11-08 18:15:33 +01:00
2026-11-11 19:19:55 +01:00
2026-11-12 16:33:14 +01:00
2026-11-12 16:33:14 +01:00
2026-11-12 16:44:08 +01:00
2026-08-29 21:55:27 +08:00
2026-11-13 12:05:14 +01:00
2026-11-14 14:19:13 +01:00