Skip to content

refactor(remote): rename remote-node probe and tunnel telemetry fields #549

Description

@AptS-1547

背景

远端节点当前把两组不同生命周期的状态都命名成 last_*,容易把节点探测结果和 reverse tunnel 运行态混用:

  • 节点探测:last_errorlast_checked_at
  • tunnel 遥测:tunnel.last_errortunnel.last_seen_at
  • 数据库对应列:managed_followers.last_errorlast_checked_attunnel_last_errortunnel_last_seen_at

当前已确认的语义:

  • last_error:最近一次显式 capability probe / connection test 的结果
  • last_checked_at:上述 probe 的执行时间
  • tunnel.last_error:reverse tunnel 运行态的暂时错误;下一次成功 poll / stream handshake 会清空,不是历史错误日志
  • tunnel.last_seen_at:primary 最近一次成功 poll / stream handshake 的时间
  • tunnel.status:根据最近活动和 online TTL 推导的在线状态

后续重命名建议

候选名称,实施前以最终 API 设计为准:

  • last_error -> last_probe_errorprobe_error
  • last_checked_at -> last_probe_at
  • tunnel.last_error -> tunnel.runtime_errortunnel.last_runtime_error
  • tunnel.last_seen_at -> tunnel.last_handshake_at
  • 数据库列、Rust entity、service DTO、OpenAPI、generated SDK、frontend 类型和 i18n 一次性迁移

验收边界

  • 不改变字段当前运行语义,只改善名称
  • 明确 API 是公开管理契约,是否需要兼容旧字段、兼容周期和删除条件
  • 如果数据库列一起迁移,覆盖 SQLite / PostgreSQL / MySQL
  • 更新管理端显示、测试、开发文档和 OpenAPI 生成产物
  • 增加边界测试,证明 probe 状态与 tunnel 运行态不会互相覆盖
  • 清理旧名称、旧 alias 和误导性注释,避免长期双轨

本 issue 只跟踪命名和契约迁移;本次 CI 修复保留现有字段语义。

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or requestPriority: MediumMedium priority issueRustPull requests that update Rust codeScope: Admin UIAdministrator-facing frontend workflows and management interfacesScope: Remote NodesPrimary/follower nodes, remote storage targets, and internal routingStatus: In ProgressActive implementation exists and should have a branch, PR, or progress evidence

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions