docs(architecture): rewrite Runtime Host and define Peer Mesh contracts - #5110
Conversation
Generated-by: OpenAI Codex
jackwener
left a comment
There was a problem hiding this comment.
APPROVE on 24193fef4b2cf19a11fbf7a104cea34d830a8513 at the explicit direction of M4n5ter. I found no unresolved P0-P2 issue in the architecture-document change.
The Runtime Host and Peer Mesh contracts consistently separate authorities, identities, durable and process-local state, transport recovery, resource limits, and unsupported future capabilities. The English and Chinese counterparts have matching structure, diagrams, tables, and valid local source/test links. Lint, formatting, ASF headers, and whitespace checks pass. The exact-head hosted checks are terminal green, and the change forms a clean synthetic merge with current main.
This approval is not a merge action; no merge was performed.
Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.
English
Summary
Rewrite the Runtime Host architecture contract and add a separate Peer Mesh contract, both in Chinese and English. The previous Host document omitted native Peer streams, Guest mounts, request-level tool composition, cooperative handoff, and distinct idle/drain residency; its transport and lifetime descriptions no longer matched the implementation.
Document authority and identity boundaries, durable versus process-local state, admission and recovery transitions, failure behavior, resource budgets, trade-offs, and source/test entry points. Include the current reconnect diagnostic and deployment-lock contracts, distinguish experimental networking from unsupported future capabilities, and link both documents from the architecture overview and documentation index.
Verified against
09c73430c, including the newer quit-admission and connection-teardown behavior. Refs #5101; that fix merged before this documentation follow-up was ready.Verification
npm run lint,npm run format:check, staged whitespace, ASF header and protocol-epoch checks passed.AI use
Tool(s) and scope: OpenAI Codex — source review, architecture writing, translation and document verification. The commit includes a
Generated-bytrailer.Checklist
Does this PR entail a change in behavior?
简体中文
Summary / 概述
彻底重写 Runtime Host 架构契约,新增独立的 Peer Mesh 架构契约,均提供中英文版本。旧 Host 文档遗漏了 native Peer stream、Guest mount、请求级工具组合、协作式 handoff 和 idle/drain 驻留区别,传输与生命周期描述已落后于实现。
文档定义 authority 与身份边界、持久/进程内状态、准入和恢复转换、失败行为、资源预算、设计取舍,以及源码和测试入口。补充当前的重连诊断与部署锁契约,区分实验性网络实现和未提供的未来能力,并更新总架构与文档索引。
核对基线为
09c73430c,包含后续合入的退出准入和连接 teardown 行为。关联 #5101;该修复在本次文档完成前已合并,因此另开后续 PR。Verification / 验证
AI use / AI 使用
工具及范围:OpenAI Codex,参与源码核对、架构写作、翻译和文档验证;提交包含
Generated-by标记。Checklist / 检查项
本 PR 是否改变行为?