mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-11-05 01:50:36 +00:00
docs: replace dead pull/5224 links with squash-merge commit permalinks in subagents reference (en/zh) (#7849)
* docs: replace dead pull/5224 links with squash-merge commit permalinks in subagents reference (en/zh) The "Related changes" list in harness/subagents/reference.mdx cites PR #5224 ("tool assembly off the event loop"), but the PR and its issue counterpart were deleted by repository administrators, so both URLs return 404. The PR itself was merged: squash commit 5727449 matches the cited description verbatim. Same approach as #7689 (changelog deleted-PR references): keep the [#5224] text and entry description, replace the URL with the squash-merge commit permalink. 1 line changed in each of the en and zh pages. * test(deermem): keep eviction fixtures fresh --------- Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
parent
4ac811b2ba
commit
58fc5bd5b8
@ -15,6 +15,7 @@ from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
@ -732,7 +733,13 @@ def test_default_confidence_policy_does_not_collect_hybrid_usage(deermem_data_di
|
||||
assert dm._storage.get_fact_usage(agent_name="__default__", user_id="u1") == {}
|
||||
|
||||
|
||||
def test_hybrid_capacity_keeps_recent_confirmation_over_stale_confidence(deermem_data_dir):
|
||||
@pytest.fixture
|
||||
def recent_fact_timestamp():
|
||||
"""Keep recent facts fresh regardless of when the eviction tests run."""
|
||||
return datetime.now(UTC).isoformat().replace("+00:00", "Z")
|
||||
|
||||
|
||||
def test_hybrid_capacity_keeps_recent_confirmation_over_stale_confidence(deermem_data_dir, recent_fact_timestamp):
|
||||
dm = DeerMem(
|
||||
backend_config={
|
||||
"storage_path": str(deermem_data_dir),
|
||||
@ -752,7 +759,7 @@ def test_hybrid_capacity_keeps_recent_confirmation_over_stale_confidence(deermem
|
||||
"content": f"high {index}",
|
||||
"category": "preference",
|
||||
"confidence": 0.99,
|
||||
"createdAt": "2026-08-12T00:00:00Z",
|
||||
"createdAt": recent_fact_timestamp,
|
||||
}
|
||||
for index in range(8)
|
||||
],
|
||||
@ -769,7 +776,7 @@ def test_hybrid_capacity_keeps_recent_confirmation_over_stale_confidence(deermem
|
||||
"category": "preference",
|
||||
"confidence": 0.7,
|
||||
"createdAt": "2025-01-01T00:00:00Z",
|
||||
"lastConfirmedAt": "2026-08-12T00:00:00Z",
|
||||
"lastConfirmedAt": recent_fact_timestamp,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -789,7 +796,7 @@ def test_hybrid_capacity_keeps_recent_confirmation_over_stale_confidence(deermem
|
||||
assert "stale_high" not in kept_ids
|
||||
|
||||
|
||||
def test_hybrid_import_applies_same_capacity_policy(deermem_data_dir):
|
||||
def test_hybrid_import_applies_same_capacity_policy(deermem_data_dir, recent_fact_timestamp):
|
||||
dm = DeerMem(
|
||||
backend_config={
|
||||
"storage_path": str(deermem_data_dir),
|
||||
@ -809,7 +816,7 @@ def test_hybrid_import_applies_same_capacity_policy(deermem_data_dir):
|
||||
"content": f"high {index}",
|
||||
"category": "preference",
|
||||
"confidence": 0.99,
|
||||
"createdAt": "2026-08-12T00:00:00Z",
|
||||
"createdAt": recent_fact_timestamp,
|
||||
}
|
||||
for index in range(8)
|
||||
],
|
||||
@ -826,14 +833,14 @@ def test_hybrid_import_applies_same_capacity_policy(deermem_data_dir):
|
||||
"category": "preference",
|
||||
"confidence": 0.7,
|
||||
"createdAt": "2025-01-01T00:00:00Z",
|
||||
"lastConfirmedAt": "2026-08-12T00:00:00Z",
|
||||
"lastConfirmedAt": recent_fact_timestamp,
|
||||
},
|
||||
{
|
||||
"id": "new_context",
|
||||
"content": "new useful context",
|
||||
"category": "context",
|
||||
"confidence": 0.8,
|
||||
"createdAt": "2026-08-12T00:00:00Z",
|
||||
"createdAt": recent_fact_timestamp,
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -841,11 +848,12 @@ def test_hybrid_import_applies_same_capacity_policy(deermem_data_dir):
|
||||
)
|
||||
|
||||
kept_ids = {fact["id"] for fact in memory["facts"]}
|
||||
assert len(kept_ids) == 10
|
||||
assert "confirmed_recently" in kept_ids
|
||||
assert "stale_high" not in kept_ids
|
||||
|
||||
|
||||
def test_hybrid_capacity_reserves_correction_and_writes_audit(deermem_data_dir):
|
||||
def test_hybrid_capacity_reserves_correction_and_writes_audit(deermem_data_dir, recent_fact_timestamp):
|
||||
dm = DeerMem(
|
||||
backend_config={
|
||||
"storage_path": str(deermem_data_dir),
|
||||
@ -864,7 +872,7 @@ def test_hybrid_capacity_reserves_correction_and_writes_audit(deermem_data_dir):
|
||||
"content": f"preference {index}",
|
||||
"category": "preference",
|
||||
"confidence": 0.99,
|
||||
"createdAt": "2026-08-12T00:00:00Z",
|
||||
"createdAt": recent_fact_timestamp,
|
||||
}
|
||||
for index in range(10)
|
||||
],
|
||||
@ -887,7 +895,7 @@ def test_hybrid_capacity_reserves_correction_and_writes_audit(deermem_data_dir):
|
||||
assert "Never repeat this corrected behavior" not in audit_path.read_text()
|
||||
|
||||
|
||||
def test_confidence_policy_shadow_does_not_change_actual_selection(deermem_data_dir):
|
||||
def test_confidence_policy_shadow_does_not_change_actual_selection(deermem_data_dir, recent_fact_timestamp):
|
||||
dm = DeerMem(
|
||||
backend_config={
|
||||
"storage_path": str(deermem_data_dir),
|
||||
@ -903,7 +911,7 @@ def test_confidence_policy_shadow_does_not_change_actual_selection(deermem_data_
|
||||
"content": f"high {index}",
|
||||
"category": "preference",
|
||||
"confidence": 0.99,
|
||||
"createdAt": "2026-08-12T00:00:00Z",
|
||||
"createdAt": recent_fact_timestamp,
|
||||
}
|
||||
for index in range(8)
|
||||
],
|
||||
@ -920,7 +928,7 @@ def test_confidence_policy_shadow_does_not_change_actual_selection(deermem_data_
|
||||
"category": "preference",
|
||||
"confidence": 0.7,
|
||||
"createdAt": "2025-01-01T00:00:00Z",
|
||||
"lastConfirmedAt": "2026-08-12T00:00:00Z",
|
||||
"lastConfirmedAt": recent_fact_timestamp,
|
||||
},
|
||||
]
|
||||
dm.import_memory({"user": {}, "history": {}, "facts": facts}, user_id="u1")
|
||||
|
||||
@ -180,4 +180,4 @@ Pull requests merged to the main branch between June 1 and September 22, 2026 wh
|
||||
|
||||
### Related changes
|
||||
|
||||
Titles without "subagent" that changed subagent paths: [#4659](https://github.com/bytedance/deer-flow/pull/4659) tool receipts (RFC #4651, layer 1), [#3887](https://github.com/bytedance/deer-flow/pull/3887) and [#3906](https://github.com/bytedance/deer-flow/pull/3906) durable context, [#4407](https://github.com/bytedance/deer-flow/pull/4407) subgraph stream frames, [#4432](https://github.com/bytedance/deer-flow/pull/4432) card ordering, [#5436](https://github.com/bytedance/deer-flow/pull/5436) token budget signals without a `run_id`, [#5447](https://github.com/bytedance/deer-flow/pull/5447) provider blocks after guards strip calls, [#5563](https://github.com/bytedance/deer-flow/pull/5563) content-less terminal messages, [#3658](https://github.com/bytedance/deer-flow/pull/3658) per-model token attribution, [#5127](https://github.com/bytedance/deer-flow/pull/5127) loop detection events, [#4636](https://github.com/bytedance/deer-flow/pull/4636) and [#4684](https://github.com/bytedance/deer-flow/pull/4684) extension contribution points, [#3926](https://github.com/bytedance/deer-flow/pull/3926) channel user id propagation, [#5224](https://github.com/bytedance/deer-flow/pull/5224) tool assembly off the event loop, [#5214](https://github.com/bytedance/deer-flow/pull/5214) tool-progress event attribution, [#4361](https://github.com/bytedance/deer-flow/pull/4361) summarizing with the subagent's own model, [#5154](https://github.com/bytedance/deer-flow/pull/5154) date timezone, and [#4155](https://github.com/bytedance/deer-flow/pull/4155), [#4128](https://github.com/bytedance/deer-flow/pull/4128), [#4002](https://github.com/bytedance/deer-flow/pull/4002) input and tool-result sanitization.
|
||||
Titles without "subagent" that changed subagent paths: [#4659](https://github.com/bytedance/deer-flow/pull/4659) tool receipts (RFC #4651, layer 1), [#3887](https://github.com/bytedance/deer-flow/pull/3887) and [#3906](https://github.com/bytedance/deer-flow/pull/3906) durable context, [#4407](https://github.com/bytedance/deer-flow/pull/4407) subgraph stream frames, [#4432](https://github.com/bytedance/deer-flow/pull/4432) card ordering, [#5436](https://github.com/bytedance/deer-flow/pull/5436) token budget signals without a `run_id`, [#5447](https://github.com/bytedance/deer-flow/pull/5447) provider blocks after guards strip calls, [#5563](https://github.com/bytedance/deer-flow/pull/5563) content-less terminal messages, [#3658](https://github.com/bytedance/deer-flow/pull/3658) per-model token attribution, [#5127](https://github.com/bytedance/deer-flow/pull/5127) loop detection events, [#4636](https://github.com/bytedance/deer-flow/pull/4636) and [#4684](https://github.com/bytedance/deer-flow/pull/4684) extension contribution points, [#3926](https://github.com/bytedance/deer-flow/pull/3926) channel user id propagation, [#5224](https://github.com/bytedance/deer-flow/commit/572744975d369fda88168aaa7b481282f939affe) tool assembly off the event loop, [#5214](https://github.com/bytedance/deer-flow/pull/5214) tool-progress event attribution, [#4361](https://github.com/bytedance/deer-flow/pull/4361) summarizing with the subagent's own model, [#5154](https://github.com/bytedance/deer-flow/pull/5154) date timezone, and [#4155](https://github.com/bytedance/deer-flow/pull/4155), [#4128](https://github.com/bytedance/deer-flow/pull/4128), [#4002](https://github.com/bytedance/deer-flow/pull/4002) input and tool-result sanitization.
|
||||
|
||||
@ -180,4 +180,4 @@ invoke_acp_agent(...) # 外部 ACP Agent,见子 Agent 目录
|
||||
|
||||
### 相关变更
|
||||
|
||||
标题不含子 Agent 但改动了子 Agent 路径:[#4659](https://github.com/bytedance/deer-flow/pull/4659) 工具回执(RFC #4651 第 1 层)、[#3887](https://github.com/bytedance/deer-flow/pull/3887) 与 [#3906](https://github.com/bytedance/deer-flow/pull/3906) 持久上下文、[#4407](https://github.com/bytedance/deer-flow/pull/4407) 子图流帧、[#4432](https://github.com/bytedance/deer-flow/pull/4432) 卡片顺序、[#5436](https://github.com/bytedance/deer-flow/pull/5436) 无 `run_id` 时的 token 预算信号、[#5447](https://github.com/bytedance/deer-flow/pull/5447) 守卫剥离调用后的供应商块、[#5563](https://github.com/bytedance/deer-flow/pull/5563) 无内容终态消息、[#3658](https://github.com/bytedance/deer-flow/pull/3658) 按模型归属 token、[#5127](https://github.com/bytedance/deer-flow/pull/5127) 循环检测事件、[#4636](https://github.com/bytedance/deer-flow/pull/4636) 与 [#4684](https://github.com/bytedance/deer-flow/pull/4684) 扩展贡献点、[#3926](https://github.com/bytedance/deer-flow/pull/3926) 渠道用户 id 传播、[#5224](https://github.com/bytedance/deer-flow/pull/5224) 工具装配移出事件循环、[#5214](https://github.com/bytedance/deer-flow/pull/5214) 工具进度事件归属、[#4361](https://github.com/bytedance/deer-flow/pull/4361) 摘要使用子 Agent 自己的模型、[#5154](https://github.com/bytedance/deer-flow/pull/5154) 日期时区、[#4155](https://github.com/bytedance/deer-flow/pull/4155)、[#4128](https://github.com/bytedance/deer-flow/pull/4128)、[#4002](https://github.com/bytedance/deer-flow/pull/4002) 输入与工具结果净化。
|
||||
标题不含子 Agent 但改动了子 Agent 路径:[#4659](https://github.com/bytedance/deer-flow/pull/4659) 工具回执(RFC #4651 第 1 层)、[#3887](https://github.com/bytedance/deer-flow/pull/3887) 与 [#3906](https://github.com/bytedance/deer-flow/pull/3906) 持久上下文、[#4407](https://github.com/bytedance/deer-flow/pull/4407) 子图流帧、[#4432](https://github.com/bytedance/deer-flow/pull/4432) 卡片顺序、[#5436](https://github.com/bytedance/deer-flow/pull/5436) 无 `run_id` 时的 token 预算信号、[#5447](https://github.com/bytedance/deer-flow/pull/5447) 守卫剥离调用后的供应商块、[#5563](https://github.com/bytedance/deer-flow/pull/5563) 无内容终态消息、[#3658](https://github.com/bytedance/deer-flow/pull/3658) 按模型归属 token、[#5127](https://github.com/bytedance/deer-flow/pull/5127) 循环检测事件、[#4636](https://github.com/bytedance/deer-flow/pull/4636) 与 [#4684](https://github.com/bytedance/deer-flow/pull/4684) 扩展贡献点、[#3926](https://github.com/bytedance/deer-flow/pull/3926) 渠道用户 id 传播、[#5224](https://github.com/bytedance/deer-flow/commit/572744975d369fda88168aaa7b481282f939affe) 工具装配移出事件循环、[#5214](https://github.com/bytedance/deer-flow/pull/5214) 工具进度事件归属、[#4361](https://github.com/bytedance/deer-flow/pull/4361) 摘要使用子 Agent 自己的模型、[#5154](https://github.com/bytedance/deer-flow/pull/5154) 日期时区、[#4155](https://github.com/bytedance/deer-flow/pull/4155)、[#4128](https://github.com/bytedance/deer-flow/pull/4128)、[#4002](https://github.com/bytedance/deer-flow/pull/4002) 输入与工具结果净化。
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user