Miroslav Drbal
792b799e16
test(coding-agent/mcp): defend getter-based tool descriptions against signature regression
...
Built-in tools whose prompt-rendered metadata depends on settings
(`TaskTool`, `SearchToolBm25Tool`, `EditTool`) expose `description`/
`label` via getters that re-evaluate on every access. The skip
optimization in `#applyActiveToolsByName` is correctness-safe for these
because `#computeAppliedToolSignature` reads `tool.description` live
each call, so a settings flip mutates the rendered string and differs
the signature on the next refresh.
This contract was implicit; a future refactor that caches per-tool
description strings would silently break it. Defending it explicitly:
- Added a regression test that wires a getter onto a CustomTool's
`description`, verifies `refreshMCPTools` skips while the underlying
state is unchanged, then mutates the state (without changing tool
object identity) and verifies the rebuild fires.
- Expanded the `#computeAppliedToolSignature` docstring to document
the getter-based coverage path and the SDK-init-time closure
constants in `sdk.ts` that genuinely cannot change at runtime
(`repeatToolDescriptions`, `eagerTasks`, `intentField`,
`mcpDiscoveryEnabled`, `secretsEnabled`).
Triggered by a review question on whether the skip breaks settings-
based prompt changes. It does not, but the property is non-obvious.
2026-04-30 15:05:01 +02:00
..
2026-04-30 06:06:07 +02:00
2026-02-15 09:53:17 +01:00
2026-04-27 21:55:31 +02:00
2026-04-26 05:48:07 +02:00
2026-04-08 22:10:37 +02:00
2026-04-23 21:02:14 +02:00
2026-03-03 04:48:37 +01:00
2026-03-31 17:43:09 +02:00
2026-03-14 10:46:26 +01:00
2026-04-30 03:40:20 +02:00
2026-04-08 17:05:20 +02:00
2026-04-09 18:57:51 +02:00
2026-04-30 04:51:23 +02:00
2026-04-08 22:10:37 +02:00
2026-02-24 02:59:42 +01:00
2026-04-26 00:29:52 +02:00
2026-04-30 07:23:27 +02:00
2026-04-11 03:42:26 +02:00
2026-04-18 22:36:33 +02:00
2026-04-13 21:25:50 +02:00
2026-04-08 06:54:33 +02:00
2026-04-30 06:40:53 +02:00
2026-03-14 11:25:40 +01:00
2026-04-23 21:02:14 +02:00
2026-03-15 22:56:18 +01:00
2026-03-15 22:56:18 +01:00
2026-04-25 17:52:33 +02:00
2026-04-25 17:52:33 +02:00
2026-04-30 06:40:53 +02:00
2026-04-08 22:10:37 +02:00
2026-04-26 02:46:46 +02:00
2026-04-28 01:15:35 +02:00
2026-04-14 10:49:53 +02:00
2026-04-30 06:40:53 +02:00
2026-04-01 14:53:28 +07:00
2026-04-12 14:45:19 +02:00
2026-04-23 21:02:14 +02:00
2026-04-30 05:58:38 +02:00
2026-03-14 11:25:40 +01:00
2026-04-30 15:05:01 +02:00
2026-03-14 11:03:55 +01:00
2026-03-14 13:38:29 +01:00
2026-04-23 21:02:14 +02:00
2026-04-27 21:55:31 +02:00
2026-04-12 01:36:28 +02:00
2026-03-14 11:25:40 +01:00
2026-03-14 11:25:40 +01:00
2026-02-23 20:59:17 +01:00
2026-04-23 21:02:14 +02:00
2026-04-07 05:53:40 +02:00
2026-04-10 14:51:27 -05:00
2026-04-13 04:24:59 +02:00
2026-04-24 18:44:17 +08:00
2026-04-24 22:36:44 +02:00
2026-03-01 09:55:02 +01:00
2026-03-03 06:07:22 +01:00
2026-03-03 06:07:22 +01:00
2026-04-02 07:35:44 +02:00
2026-03-11 00:03:48 +01:00
2026-01-24 04:20:19 +01:00
2026-03-15 22:56:18 +01:00
2026-03-10 07:27:30 +01:00
2026-03-14 11:25:40 +01:00
2026-04-30 04:51:23 +02:00
2026-04-05 03:50:52 +02:00
2026-04-10 14:18:36 +02:00
2026-03-03 14:45:06 +01:00
2026-04-08 18:52:42 +02:00
2026-03-23 08:54:54 -04:00
2026-04-28 05:21:24 +02:00
2026-04-24 00:42:19 +02:00
2026-04-26 08:19:02 +02:00
2026-02-28 06:33:07 +01:00
2026-04-30 03:52:52 +02:00
2026-02-13 14:07:38 +01:00
2026-01-24 04:20:19 +01:00
2026-04-11 08:54:27 +02:00
2026-02-16 10:08:53 +01:00
2026-04-23 21:02:14 +02:00
2026-04-27 18:21:45 +01:00
2026-03-03 15:09:46 +01:00
2026-03-03 15:12:50 +01:00
2026-02-21 22:59:04 +01:00
2026-04-08 14:42:51 +02:00
2026-04-08 14:42:51 +02:00
2026-03-22 18:28:40 +01:00
2026-04-29 19:39:26 +02:00
2026-04-08 18:52:42 +02:00
2026-04-08 17:49:39 +02:00
2026-04-07 22:38:49 +02:00
2026-04-28 05:23:26 +02:00
2026-04-30 04:51:23 +02:00
2026-04-30 05:23:20 +02:00
2026-04-30 04:51:23 +02:00
2026-04-30 04:41:36 +02:00
2026-04-30 04:51:23 +02:00
2026-04-30 04:51:23 +02:00
2026-04-30 04:51:23 +02:00
2026-04-02 07:35:44 +02:00
2026-03-22 18:28:40 +01:00
2026-04-26 06:59:47 +02:00
2026-03-26 15:33:26 +01:00
2026-03-14 11:25:40 +01:00
2026-03-10 20:15:03 +01:00
2026-03-03 04:00:30 +01:00
2026-03-20 23:48:38 +01:00
2026-03-18 23:02:22 +01:00
2026-03-03 06:07:22 +01:00
2026-04-30 15:04:33 +02:00
2026-03-14 14:52:12 +01:00
2026-03-14 11:00:07 +01:00
2026-04-13 00:58:32 +02:00
2026-04-26 00:29:52 +02:00
2026-04-30 08:28:03 +02:00
2026-04-13 15:46:06 +02:00
2026-04-11 08:28:50 +02:00
2026-03-08 16:16:54 +01:00
2026-04-23 21:02:14 +02:00
2026-02-23 06:21:32 +00:00
2026-03-01 22:23:05 +01:00
2026-04-05 18:05:09 +02:00
2026-04-01 15:31:46 +02:00
2026-03-15 17:36:59 +01:00
2026-03-22 18:28:40 +01:00
2026-04-08 05:47:35 +02:00
2026-04-29 01:16:33 +02:00
2026-04-26 05:22:15 +02:00
2026-04-18 23:37:47 +02:00
2026-03-26 19:12:51 +01:00
2026-03-12 17:37:52 +01:00
2026-02-20 12:28:25 +01:00
2026-01-28 21:12:28 +01:00
2026-04-08 06:23:27 +02:00
2026-03-26 16:14:52 +07:00
2026-03-06 12:35:01 +01:00
2026-04-28 01:15:35 +02:00
2026-04-08 08:47:32 +02:00
2026-04-23 23:05:24 +02:00
2026-04-23 21:02:14 +02:00
2026-04-24 22:36:44 +02:00
2026-02-15 17:02:33 +00:00
2026-04-13 06:22:37 +02:00
2026-03-02 17:01:44 +01:00
2026-02-14 00:58:42 +01:00
2026-03-26 16:17:27 +01:00
2026-03-14 13:44:20 +01:00
2026-03-13 15:14:05 +01:00
2026-03-03 03:56:30 +01:00
2026-04-29 16:55:14 +02:00
2026-04-29 16:55:14 +02:00
2026-03-03 14:32:02 +01:00
2026-04-18 23:24:00 +02:00
2026-04-30 03:48:36 +02:00
2026-04-26 11:48:45 +02:00
2026-02-15 10:20:11 +01:00
2026-04-23 21:02:14 +02:00
2026-04-29 01:31:29 +02:00
2026-02-15 10:20:11 +01:00
2026-04-07 02:00:59 +02:00
2026-04-08 22:10:37 +02:00
2026-04-29 06:35:00 +02:00
2026-02-01 10:23:41 +01:00
2026-02-18 01:53:02 +01:00
2026-03-26 19:12:50 +01:00
2026-03-03 05:29:26 +01:00
2026-03-15 22:56:18 +01:00
2026-01-29 10:47:55 +01:00