test: PromptProvider 审查修复(组装缝断言/占位符约定文档与glob守护/边界注记)
- I-1: test_company_facts 捕获完整 prompt 的用例补话术池注入断言
("- EN:"/"- ZH:" 分组行在场)——守 AIService 组装缝,防 Task 9
重接提示词线时静默丢池
- I-2: seed_profiles/README.md 落档 $DEFLECTION_POOL 占位符约定
(缺失 = 话术池静默不注入);test_prompt_provider 占位符防漂移改
glob 遍历 seed_profiles/*/prompts/system.md,第三租户自动纳管
(空 glob 显性兜底,防假守护)
- Minor-1 注记: _format_deflection_pool docstring 记已知边界——条目
含引号/换行暂不转义,Phase 2 编辑器批次处理
- Minor-5: test_provider_loads_from_tenant_dir 删恒真 or 侧,改单一
明确断言;registry 加载期显性失败清单补 prompts 读取失败
(FileNotFoundError 说明);conftest build_jiancai_runtime 注明
data_dir 仅占位、从不 ensure_ready
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -82,7 +82,8 @@ def build_jiancai_runtime():
|
||||
engine/session_factory 保持 None: 直连测试自管 async_db(NullPool 跨
|
||||
循环纪律),manager.session_factory 为 None 时 lead_push_service 回退
|
||||
模块级兜底,与旧 runtime=None 行为一致。无 engine 即无句柄,无需清理;
|
||||
data_dir 仅拼 db_path 字符串(无 IO),模块级缓存单例跨测试复用。
|
||||
data_dir 仅占位(只拼 db_path 字符串,无任何 IO——从不 ensure_ready,
|
||||
不会创建 tenants/ 目录或库文件),模块级缓存单例跨测试复用。
|
||||
"""
|
||||
global _JIANCAI_RUNTIME
|
||||
if _JIANCAI_RUNTIME is None:
|
||||
|
||||
Reference in New Issue
Block a user