mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-15 00:31:58 +00:00
合并查询节点:裁判摘录的标题写明是合并查询的结果,不再写成「数据源 合并查询」
This commit is contained in:
@@ -350,7 +350,8 @@ def _query_excerpt(alias: str, entry: dict[str, Any], rows: set[int], cols: Iter
|
||||
total = len(snapshot["rows"])
|
||||
# 旧形状的台账条目没记数据源:按快照自己记的找遮罩(证据面板同一个口径)
|
||||
source = entry.get("source") or snapshot.get("source")
|
||||
head = f"【{alias}】查询结果({entry.get('tool') or '查询'} · 数据源 {source or '—'} · 共 {total} 行)"
|
||||
head = (f"【{alias}】合并查询结果(共 {total} 行)" if snapshot.get("source") == MERGE_SOURCE
|
||||
else f"【{alias}】查询结果({entry.get('tool') or '查询'} · 数据源 {source or '—'} · 共 {total} 行)")
|
||||
sql = _clean(str(snapshot.get("sql") or ""))
|
||||
lines = [head, f"SQL:{sql[:SQL_CHARS]}{'…' if len(sql) > SQL_CHARS else ''}"]
|
||||
if snapshot.get("source") == MERGE_SOURCE:
|
||||
|
||||
@@ -432,6 +432,7 @@ def test_judge_excerpt_names_the_inputs_and_masks_their_sources():
|
||||
entry = {"kind": "query", "artifact": "m" * 64, "source": MERGE_SOURCE}
|
||||
text = judge._query_excerpt("Q3", entry, {0}, ["订单数"], False, lambda _a: snap,
|
||||
{"merge_members": ["手机号"]})
|
||||
assert text.startswith("【Q3】合并查询结果(共 1 行)")
|
||||
assert "合并的输入:s(节点 q_sales,数据源 merge_stores,1 行)、v(节点 q_visits,数据源 merge_members,1 行)" in text
|
||||
assert "13800000000" not in text and "遮罩" in text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user