趋势判断工具的说明开头改成契约的叫法「趋势判断:」(原来写「趋势:」,另外四个工具都以 OP_LABELS 的叫法开头);测试补一条:五个分析工具的说明都以契约里这种分析的叫法加「:」开头,助手的工具清单、证据面板、评测写的是同一种说法

This commit is contained in:
ThearchyHelios
2026-10-21 20:02:41 +08:00
parent 03cedbaf1d
commit 28c538a72f
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -230,7 +230,7 @@ async def analysis_baseline(ctx: ToolContext, **kwargs: Any) -> dict[str, Any]:
@register( @register(
name=contract.TOOL_NAMES["trend"], name=contract.TOOL_NAMES["trend"],
category=CATEGORY, category=CATEGORY,
description="趋势:判断一条按期次排的序列是在持续上升、持续下降,还是没有明显趋势(只是一次波动)。", description="趋势判断:判断一条按期次排的序列是在持续上升、持续下降,还是没有明显趋势(只是一次波动)。",
args_schema=TrendArgs, args_schema=TrendArgs,
guide=METHOD_GUIDE, guide=METHOD_GUIDE,
) )
+2
View File
@@ -156,6 +156,8 @@ def test_the_five_tools_take_no_thresholds_and_share_one_method():
props = spec.args_schema.model_json_schema()["properties"] props = spec.args_schema.model_json_schema()["properties"]
assert not set(props) & set(contract.DEFAULTS), f"{name} 的参数里有阈值:{set(props) & set(contract.DEFAULTS)}" 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.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 spec.guide is METHOD_GUIDE and not spec.dangerous and not spec.writes_state
# 不查库:能力登记、出处链都不把它的结果当查询快照 # 不查库:能力登记、出处链都不把它的结果当查询快照
assert not is_platform_query(name) assert not is_platform_query(name)