Skip to content

ClawBox v0.6.2

Latest

Choose a tag to compare

@github-actions github-actions released this 07 Sep 04:31

修复

  • Hermes scan lines_total 不递增:诊断 0.6.1 用量数据时发现 hermes adapter 漏 stats.lines_total += 1,导致 300 行真实数据 events_matched=300lines_total=0matched_ratio 计算分母为 0 时按"空文件"口径返回 1.0,UI 黄条永远不出现。其它 10 个真扫描 adapter(claude_code/codex/opencode/qoder/qwen_code/codebuddy/openclaw/gemini/kimi/pi)都已正确累计,本机无日志的 5 个 B 组 adapter(aider/cline/cursor_agent/dsh/trae_agent)scan 直接返回 Default 不需要修复。修复方式:在 row 取出后、match 前 stats.lines_total += 1
  • last_scan_at 无条件更新aggregate.refresh 里写 last_scan_at 的逻辑包在 if !providers_meta.is_empty() 里,导致调用方传空 meta 时桶里时间戳永远是上次扫描时间,UI 看到老时间戳会误判"格式可能已变更"黄条。改成 last_scan_at 无条件更新,agent_to_provider 快照仍按原条件路径处理(空 meta 时不覆盖既有绑定)。

测试

  • cargo test --lib usage:: 100 passed / 0 failed

Fixes

  • Hermes scan lines_total not incremented: 0.6.1 diagnostic found that the hermes adapter skipped stats.lines_total += 1. With 300 real rows, events_matched=300 but lines_total=0 — the matched_ratio denominator is 0 and falls into the "empty file" branch returning 1.0, so the yellow UI banner never shows. The other 10 real-scanning adapters already counted correctly; the 5 B-group adapters (aider / cline / cursor_agent / dsh / trae_agent) scan() returns Default and need no fix. Fix: stats.lines_total += 1 after row is fetched and before match.
  • last_scan_at always updates: aggregate.refresh wrapped last_scan_at write in if !providers_meta.is_empty(). When the caller passes an empty meta map, the bucket timestamp stays at the previous scan, and UI shows a stale bander. Fix: last_scan_at updates unconditionally; the agent_to_provider snapshot still follows the original conditional path (don't clobber existing bindings when meta is empty).

Tests

  • cargo test --lib usage:: 100 passed / 0 failed