Skip to content

🔴 P0 Dashboard Servers 面板数据完全不正确 (Vincent 5560) #157

@s2agi

Description

@s2agi

🔴 P0 Dashboard Servers 面板数据完全不正确 (Vincent 5560 实测截图)

Vincent telegram 5560 (2026-05-17 15:10 北京):
"这个看各个服务器的水位和负载的根本就不正确"

🩹 现象 (Vincent paste 截图)

dashboard Overview 页面右侧 Servers (2/6) 面板, 6 个服务器 entries 全部显示:

[Server name]                       N agents
disk metric pending hub ≥ 0.8.2-preview
agent: telco pending hub ≥ 0.8.2-preview
CPU n/a · RAM n/a · offline

具体 server:

  • iZrj93pzrzcf5z2y9ueloyZ 16 agents
  • 192.168.1.4 5 agents
  • iZrj93pzrzcf5z2y9ueloyZ 6 agents (重复 hostname?)
  • iZ8jJoB1oy0jxztOZuoSBZ 3 agents
  • unknown 1 agents
  • elaine-System-Product-Na... 1 agents

🩹 矛盾点

  • ✅ Hub version 实际是 commhub-server@0.8.2 LIVE on npm latest (v0.10.1 ship, 2026-05-17 ~10:00 北京)
  • ✅ Dashboard 自己说 "40 Online · 78% of fleet"
  • ❌ Servers 面板说所有 6 server 都 offline + 都需要 ≥ 0.8.2-preview

明显 data 显示 / version compare 逻辑 broken。

🩹 Root cause 候选 (N站马 调研)

  1. Dashboard frontend version compare bug: 比较逻辑可能误把 0.8.2-preview 写死成 minimum (应该用 0.8.1-preview.5 当 telemetry 入 hub 的实际 minimum, 或动态读 hub.version 直接判断 vs threshold)
  2. Hero 1 telemetry endpoint URL 错 — 调用了不存在的路径 (404), 然后 fallback message 是 "pending hub ≥ X.Y.Z-preview"
  3. commhub-server@0.8.2 实际没 telemetry endpoint — Hero 1 [feature][P1] Dashboard 服务器侧边栏 — 显示 hub 接入的服务器 + CPU/RAM 负载 #119 ship 时 endpoint 是 0.8.1-preview.5 阶段加的, 后来 0.8.2 release 时被忘记 carry through (但 npm view 显示 0.8.2 LIVE)
  4. Server identity 错位iZrj93pzrzcf5z2y9ueloyZ 显示 2 次 (16 agents + 6 agents), 但 hostname 一样, 说明 dashboard 在 dedup / agg 时出问题

🩹 Scope (N站马 P0, ~30-45min)

  1. Repro: 访问 dm.vansin.top:3000 (本机 dashboard) 或 prod, 打开 DevTools Network 看 Servers panel data fetch 实际 URL + response
  2. Verify hub version detect logic: dashboard 怎么读 hub.version? /api/health or /api/info? curl 试一遍真返什么
  3. Fix version compare: 改用动态读 hub.version + 标准 semver compare, 不要 hard-code 0.8.2-preview
  4. Fix telemetry display: 如果 endpoint 仍不存在, fallback 文案改 "telemetry not supported on this hub version" 而不是 "pending hub ≥ 0.8.2-preview" (避免误导)
  5. Dedup server entries: 同 hostname 应合并展示, 而不是显示两次
  6. Cross-check: 40 nodes Online with 0 Working — 说明 nodes 是 registered + heartbeat OK, 但 telemetry 没数据。N站马 deep dive 1h 应能搞清

🎯 v0.10.8 lean patch target

只动 dashboard (0.5.2 → 0.5.3):

  • agent-network / agent-node / commhub-server 都不需要动
  • 只动 frontend logic + 文案

如果发现 commhub-server actually 缺 endpoint, escalate 通信牛 + RFC-013 (server hardening) 范围。

📎 Related

Author-Agent: 通信龙 (Vincent 5560 实测 P0 第 1 次 hit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions