diff --git a/backend/app/tools/builtin/analysis.py b/backend/app/tools/builtin/analysis.py index 43efd152..5f58b1d0 100644 --- a/backend/app/tools/builtin/analysis.py +++ b/backend/app/tools/builtin/analysis.py @@ -230,7 +230,7 @@ async def analysis_baseline(ctx: ToolContext, **kwargs: Any) -> dict[str, Any]: @register( name=contract.TOOL_NAMES["trend"], category=CATEGORY, - description="趋势:判断一条按期次排的序列是在持续上升、持续下降,还是没有明显趋势(只是一次波动)。", + description="趋势判断:判断一条按期次排的序列是在持续上升、持续下降,还是没有明显趋势(只是一次波动)。", args_schema=TrendArgs, guide=METHOD_GUIDE, ) diff --git a/backend/tests/test_analysis_tools.py b/backend/tests/test_analysis_tools.py index 96513247..5e676e3d 100644 --- a/backend/tests/test_analysis_tools.py +++ b/backend/tests/test_analysis_tools.py @@ -156,6 +156,8 @@ def test_the_five_tools_take_no_thresholds_and_share_one_method(): props = spec.args_schema.model_json_schema()["properties"] assert not set(props) & set(contract.DEFAULTS), f"{name} 的参数里有阈值:{set(props) & set(contract.DEFAULTS)}" assert spec.args_schema is ARGS[op] and spec.category == "分析" and spec.description + # 说明开头是契约里这种分析的叫法(「趋势判断:……」),助手的工具清单、证据面板、评测写的是同一种说法 + assert spec.description.startswith(f"{contract.OP_LABELS[op]}:"), spec.description[:12] assert spec.guide is METHOD_GUIDE and not spec.dangerous and not spec.writes_state # 不查库:能力登记、出处链都不把它的结果当查询快照 assert not is_platform_query(name)