greatmengqi
a934a822df
refactor(config): simplify runtime context access in middlewares and tools
...
- title_middleware: drop the _resolve_title_config() try/except wrapper and the
optional title_config=None fallback on every helper. after_model/aafter_model
read runtime.context.app_config.title directly; helpers take TitleConfig as a
required parameter. Matches the typed Runtime[DeerFlowContext] signature.
- memory_middleware: drop resolve_context() call; use runtime.context directly
since the type is already declared.
- sandbox/tools.py: drop three layers of try/except Exception around
resolve_context(runtime).app_config.sandbox. If the config can't be resolved
that's a real bug that should surface, not be swallowed with a default.
- task_tool.py: same — drop the try/except around resolve_context().
- client.py: drop the set_override() call in __init__ and _reload_config().
It was leaking overrides across test boundaries and the leak-free path
(init() alone) is enough for the single-Client case.
- conftest: autouse fixture that initializes a minimal AppConfig for every
test so AppConfig.current() doesn't try to auto-load config.yaml.
- test_title_middleware_core_logic: pass TitleConfig explicitly to helpers
instead of patching AppConfig.current globally.
2026-04-16 13:30:10 +08:00
..
2026-04-12 11:08:31 +08:00
2026-04-16 13:30:10 +08:00
2026-04-15 21:28:15 +08:00
2026-04-01 11:42:12 +08:00
2026-04-12 20:04:32 +08:00
2026-04-02 15:39:41 +08:00
2026-04-15 21:28:15 +08:00
2026-04-11 11:25:38 +08:00
2026-04-11 11:25:38 +08:00
2026-04-11 11:25:38 +08:00
2026-04-11 11:25:38 +08:00
2026-04-11 11:25:38 +08:00
2026-04-11 11:25:38 +08:00
2026-04-12 20:04:32 +08:00
2026-04-06 22:14:12 +08:00
2026-04-15 21:28:15 +08:00
2026-04-15 21:28:15 +08:00
2026-04-08 21:04:20 +08:00
2026-03-30 07:41:18 +08:00
2026-04-07 18:21:22 +08:00
2026-04-15 21:54:52 +08:00
2026-03-29 21:03:58 +08:00
2026-04-15 21:28:15 +08:00
2026-04-09 16:07:16 +08:00
2026-04-15 21:28:15 +08:00
2026-03-14 22:55:52 +08:00
2026-04-11 11:23:39 +08:00
2026-03-29 15:31:18 +08:00
2026-04-06 16:47:19 +08:00
2026-03-22 22:39:50 +08:00
2026-04-15 21:28:15 +08:00
2026-03-26 00:20:08 +08:00
2026-04-15 21:28:15 +08:00
2026-03-31 22:19:27 +08:00
2026-04-10 17:43:39 +08:00
2026-04-12 12:05:38 +08:00
2026-04-15 21:28:15 +08:00
2026-04-12 11:08:31 +08:00
2026-04-06 22:14:12 +08:00
2026-04-04 14:25:08 +08:00
2026-04-15 21:28:15 +08:00
2026-04-01 23:21:32 +08:00
2026-04-15 21:28:15 +08:00
2026-03-14 22:55:52 +08:00
2026-04-15 21:28:15 +08:00
2026-04-12 12:05:38 +08:00
2026-04-15 21:28:15 +08:00
2026-04-15 21:28:15 +08:00
2026-04-12 11:08:31 +08:00
2026-04-15 21:28:15 +08:00
2026-04-15 21:28:15 +08:00
2026-04-15 21:28:15 +08:00
2026-04-02 10:12:17 +08:00
2026-04-15 21:28:15 +08:00
2026-03-29 21:31:29 +08:00
2026-04-15 21:28:15 +08:00
2026-04-15 21:28:15 +08:00
2026-03-14 22:55:52 +08:00
2026-03-14 22:55:52 +08:00
2026-03-26 14:20:18 +08:00
2026-04-03 11:21:58 +08:00
2026-04-16 11:22:00 +08:00
2026-04-15 21:28:15 +08:00
2026-04-12 20:04:32 +08:00
2026-04-15 21:54:52 +08:00
2026-04-15 21:28:15 +08:00
2026-04-12 11:08:31 +08:00
2026-04-12 20:04:32 +08:00
2026-04-15 21:28:15 +08:00
2026-04-05 16:23:00 +08:00
2026-04-12 20:04:32 +08:00
2026-03-22 20:39:26 +08:00
2026-04-15 21:54:52 +08:00
2026-04-12 11:08:31 +08:00
2026-04-09 16:07:16 +08:00
2026-03-20 17:18:59 +08:00
2026-03-26 15:07:05 +08:00
2026-04-12 20:04:32 +08:00
2026-04-12 11:08:31 +08:00
2026-04-15 21:28:15 +08:00
2026-04-10 20:40:30 +08:00
2026-04-10 20:40:30 +08:00
2026-03-14 22:55:52 +08:00
2026-03-14 22:55:52 +08:00
2026-04-12 20:04:32 +08:00
2026-04-11 11:23:39 +08:00
2026-04-12 11:08:31 +08:00
2026-03-31 22:22:30 +08:00
2026-04-12 11:08:31 +08:00
2026-04-09 17:56:36 +08:00
2026-04-12 20:04:32 +08:00
2026-04-07 17:15:24 +08:00
2026-04-09 17:21:23 +08:00
2026-04-09 17:21:23 +08:00
2026-04-15 21:28:15 +08:00
2026-04-16 12:09:41 +08:00
2026-04-15 21:28:15 +08:00
2026-03-30 16:02:23 +08:00
2026-03-26 14:20:18 +08:00
2026-04-10 17:43:39 +08:00
2026-04-15 21:28:15 +08:00
2026-03-25 16:28:33 +08:00
2026-04-15 21:28:15 +08:00
2026-03-26 17:39:16 +08:00
2026-04-06 22:07:11 +08:00
2026-04-01 23:08:30 +08:00
2026-03-27 20:20:31 +08:00
2026-03-30 16:02:23 +08:00
2026-04-06 14:51:10 +08:00
2026-04-08 11:46:06 +08:00
2026-03-25 10:20:16 +08:00
2026-04-09 16:12:34 +08:00
2026-04-15 21:28:15 +08:00
2026-04-12 11:08:31 +08:00
2026-04-16 12:09:41 +08:00
2026-04-15 21:28:15 +08:00
2026-04-12 11:08:31 +08:00
2026-04-12 20:04:32 +08:00
2026-04-12 20:04:32 +08:00
2026-04-15 21:28:15 +08:00
2026-04-16 13:30:10 +08:00
2026-03-26 00:20:50 +08:00
2026-04-15 21:28:15 +08:00
2026-03-14 22:55:52 +08:00
2026-04-06 15:09:57 +08:00
2026-04-15 21:28:15 +08:00
2026-04-02 13:06:10 +08:00
2026-04-02 13:06:10 +08:00
2026-03-26 17:39:16 +08:00
2026-04-15 21:28:15 +08:00
2026-04-11 11:25:38 +08:00
2026-04-12 20:04:32 +08:00
2026-04-06 15:18:34 +08:00
2026-04-10 20:49:28 +08:00