mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-04 00:03:59 +00:00
fix(offload): 内核说明不能被再转投(自我循环)+ offload_owned 未接线
★ 线上实测两个缺陷: 1. **自我循环**:转投会在队列留一条 [系统] 说明(source=kernel), 而转投条件把这条说明也算进「积压够了」⇒ 每次转投都产生下一轮要转投的东西。 实测 5 秒内连续触发两次,分诊助手不断收到「N 条积压已转投」这类噪音。 修法:takeQueuedInputs 排除 isKernelNotice(source=kernel)。 2. **offload_owned 永远为 false**:我加了 ResidentInfo 字段、加了状态面映射, 却漏了在 rc.info() 里赋值 ⇒ 线上转投子明明存在,读出来是 null。 这类「加了字段但没接线」不会报错,只会让父的判断悄悄失效 (父据此决定回收策略,读到 false 就会把临时助手当成正式子)。 测试 +3:说明不转投 / 循环必须终止 / offload_owned 会被上报。 前两条已实测「禁用守卫会失败、恢复后通过」,是真回归测试。
This commit is contained in:
@ -662,6 +662,9 @@ func (rc *residentChild) info() ResidentInfo {
|
||||
// 注意它**不等于** len(table):处理表记的是"当前上下文窗口内"的轮次,
|
||||
// 压缩会清空(§8.3),所以窗口内的条数会被重置,而轮次总数不会。
|
||||
Rounds: rc.agent.roundsExecuted(),
|
||||
// OffloadOwned:让父分清"我建的子"与"内核临时拉的分诊助手"。
|
||||
// 父据此决定回收策略(临时的可以空闲时回收,正式的按需保留)。
|
||||
OffloadOwned: rc.offloadOwned,
|
||||
}
|
||||
if len(table) > 0 {
|
||||
info.Table = table
|
||||
|
||||
Reference in New Issue
Block a user