mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-23 10:28:06 +00:00
fix(shm): 审核修复——arena 并发安全 + ToolCall ring 抢占 + arenaRead 校验
§13.2: arenaAlloc 改 CAS bump(修复并发覆盖);arenaRead 增加 generation + arena 边界校验 §13.3: Reserve 从 Store+Load 改 CAS-free→Reserved 状态机抢占帧(修复并发分配重复); 增加 RESERVED 中间态;SetReading/SetReady 改 CAS 返回 bool;ReleaseFrame 清零跳过 state §13.5/13.6: 注入方法接入 resolveText(从 arena 读 SharedRef);cleanerProxy 加 arenaMu 串行化+每次重置 §13.8: ContextPolicy prune topK 改为 maxContextSize-1(不再硬编码 20) tool.register 校验 context_policy 只允许 none/prune
This commit is contained in:
@ -36,6 +36,7 @@ type Host struct {
|
||||
|
||||
evtSubscriber EvtRingSubscriber
|
||||
locks *lockRegistry
|
||||
arenaMu sync.Mutex // 动态 arena 跨进程调用的生命周期锁
|
||||
stageMu sync.Mutex
|
||||
coordMu sync.Mutex
|
||||
coord *stageCoordinator
|
||||
|
||||
Reference in New Issue
Block a user