Skip to content

v0.8.13-alpha — human_dom 省略 profile 解析硬化(修 P6)

Pre-release
Pre-release

Choose a tag to compare

@qin-jiangli qin-jiangli released this 07 Jul 01:05
52b23ba

AgentHub #100 E2E P6 真机根因修复(接在 v0.8.12-alpha 之后,独立批)。

根因(取证四次反转锁定)

P6 轮 108 turns 填不进公众号标题 = human_dom_fill/locate 省略 profilehuman_dom_profile_id("") 硬默认 "default" → 桥严格路由找不到 default tab(operator tab 注册 op-...)→ no_tab_for_profile,死在解析步没到 DOM。不是 data-placeholder(E1,早在 59fe476/v0.8.10-alpha 实现、P1-P10 标题都填过)、不是 fill 落字。

修法

  • 主项DomBridge.active_operator_profile()(连接客户端注册表=真活跃证据,最近活跃优先,锁内 copy 消脏读)+ resolve_profile_id(显式 profile 一行不变、省略→活跃 operator、无 operator→回退 default)+ 三工具响应带 resolved_profile 可观测。
  • 有意语义收紧:operator + 日常 default 并存时「省略 profile」改指 operator(治 P6,非回归;日常 default 用显式 profile 逃生)。
  • 次项human_dom_fill_do_fill + E2 失败重试一次(re-tap 复用首次 center)。E1/E2/E3 已在 59fe476 实现、不重写。

真机验收(test-win11 复现 P6)

省略 profile 的 human_dom_fill(query="请在这里输入标题"){ok:true, verified:true, resolved_profile:"op-f218...", retried:true}(解析命中 operator、标题落字、E2 重试真机 kicked in);对照原失败 {ok:false, reason:no_tab_for_profile, profile:default} → 108 turns。

质量门禁

architect 审 + code-reviewer 审(均无 BLOCKING);22 单测(显式零回归 + 解析算法 + E2 重试)+ common 297 passed;只碰 human_dom 纯 Python(content.js/E1/E3/_os_fill/_locate 未动)。E4 iframe 后置不做。

🤖 Generated with Claude Code