Skip to content

feat(runtime-host): discover coordination relays automatically - #4126

Merged
M4n5ter merged 1 commit into
mainfrom
feat/runtime-host-peer-relay-discovery
Aug 29, 2026
Merged

feat(runtime-host): discover coordination relays automatically#4126
M4n5ter merged 1 commit into
mainfrom
feat/runtime-host-peer-relay-discovery

Conversation

@M4n5ter

@M4n5ter M4n5ter commented Aug 29, 2026

Copy link
Copy Markdown
Member
English

Summary

  • Discover public Circuit Relay v2 candidates through a bounded, client-only IPFS Amino DHT swarm
  • Keep reservation authority in the main peer endpoint, prefer manually configured relays, and publish only accepted reservations
  • Enable best-effort discovery by default for managed peer Hosts, with explicit Desktop and CLI opt-out

Refs #3842

Verification

  • Rust formatting, Clippy, 9 native tests, cargo-deny, dependency and notice gates
  • Build, typecheck, lint, format, Knip, ASF source/header, release, Astryx, and Storybook gates
  • Full Runtime Host suite (1,347 passed) and Desktop suite (1,672 passed)
  • Focused management, framing, native-peer, and SSH suites (60 passed)
  • A real public-network run accepted reservations from two distinct Relay v2 peers
  • Desktop Settings flow inspected in the development build

UI

Automatic relay discovery and Circuit Relay v2 help

AI use

Select exactly one:

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex implemented and verified the change under M4n5ter's direction and review

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No
简体中文

摘要

  • 通过有界且仅作客户端使用的 IPFS Amino DHT swarm 发现公共 Circuit Relay v2 候选节点
  • reservation authority 仍只属于主 peer endpoint;手动配置的 Relay 优先,且只发布已接受 reservation 的节点
  • managed peer Host 默认启用尽力而为的自动发现,并在 Desktop 与 CLI 提供明确的关闭方式

关联 #3842

验证

  • Rust 格式、Clippy、9 项 native 测试、cargo-deny、依赖和 notice 门禁
  • build、typecheck、lint、format、Knip、ASF source/header、release、Astryx 和 Storybook 门禁
  • 完整 Runtime Host 测试(1,347 项通过)和 Desktop 测试(1,672 项通过)
  • management、framing、native peer 与 SSH 定向测试(60 项通过)
  • 真实公网测试成功获得两个不同 Relay v2 peer 的 reservation
  • 已在开发构建中检查 Desktop 设置流程

界面

自动 Relay 发现与 Circuit Relay v2 帮助

AI 使用

OpenAI Codex 在 M4n5ter 的指导和审核下实现并验证了本次变更

检查清单

  • 测试覆盖本次变更,且在缺少实现时会失败
  • lint、format、typecheck 与受影响的测试套件均已在本地通过

本 PR 是否改变行为?

  • 是——已在摘要中说明

@github-actions github-actions Bot added the effort/XL Over 1000 readable lines label Aug 29, 2026
@M4n5ter
M4n5ter force-pushed the feat/runtime-host-peer-relay-discovery branch from 55aaf3e to 5d170ee Compare August 29, 2026 03:28
Use a bounded IPFS Amino discovery client to supply public Circuit Relay v2 candidates while the main peer endpoint retains reservation authority. Preserve manual relay precedence and publish only accepted reservations.

Generated-by: OpenAI Codex
@M4n5ter
M4n5ter force-pushed the feat/runtime-host-peer-relay-discovery branch from 5d170ee to 61c56bd Compare August 29, 2026 04:55
@M4n5ter
M4n5ter marked this pull request as ready for review August 29, 2026 05:22

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at exact head 61c56bd4a52b2c29c74e0347d3bfd368b99c2a86; I found no P0–P2 issues.

I traced the discovery path from the bounded, client-only DHT swarm through relay probing, reservation acceptance, and signed Peer Mesh route publication. The main peer endpoint remains the reservation authority, manually configured relays count first toward the target, and only validated addresses from accepted reservations enter the published route set. The implementation also provides Desktop and CLI opt-out controls while keeping the legacy peer-management frame compatible through an optional field and capability-gated status request.

Verification passed on the exact head: the root build and 60 focused Runtime Host, CLI, and Desktop tests completed successfully, and Rust formatting is clean. Local Rust tests could not run because this machine has Rust 1.95 while the crate requires 1.98; the exact-head hosted native-addon builds, test, quality, package, windows_recovery, and installed-CLI validations all completed successfully (the Eval validation job was skipped by its workflow). A synthetic merge with current main at c314e9eb0b96e10abfa35f10965e8cc9d2fc7b9e is clean and its full root build passes.


Posted by an automated review agent operated by @WAWQAQ. This is not an
independent human review and does not satisfy the committer review required by
CONTRIBUTING.md. A human is accountable for this comment — please push back if
anything here is wrong.

简体中文

本条评论由 @WAWQAQ 运行的自动化审查程序发出。它不构成 CONTRIBUTING.md
所要求的独立人类审查,也不能替代人类审查。有人类对本条评论负责,如有错误请直接指出。

@M4n5ter
M4n5ter merged commit 098415a into main Aug 29, 2026
16 checks passed
@M4n5ter
M4n5ter deleted the feat/runtime-host-peer-relay-discovery branch August 29, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XL Over 1000 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants