Repository navigation
docs(design): 基于 Codex harness 的企业级 Agent 设计基线 - #280
Merged
1 commit merged intoSep 24, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
新增 docs/zuno-enterprise-agent.md(含 zh-CN),作为在 Zuno 上构建企业级 Agent 的 设计来源:以 OpenAI《Unlocking the Codex harness》对 harness 与 App Server 的定义为 起点,逐项对照本仓库 crate 记录 harness 已有原语(thread/turn、工具路由、沙箱、 execpolicy、requirements.toml、hooks、插件、code mode、guardian、身份、OTel), 列出 Zuno 已补齐的能力(单二进制、原生 ACP、严格审批、agent backends、工作流、 上游同步),再按身份/授权/审计/密钥/出口/隔离/模型路由/成本/可观测/多租户/部署/ 升级/合规十三项给出缺口与归属,最后是"网关层 + harness 唯一执行权威"的目标架构、 五条设计规则和按依赖排序的五个阶段。 明确的非目标:不内嵌业务工作流与默认模型路由,不重写 agent 循环与沙箱,不依赖 ChatGPT 工作区能力。DESIGN_SOURCES.toml 登记该文章为 design-reference-only 来源, README 增加入口链接。
sunerpy
pushed a commit
that referenced
this pull request
Sep 24, 2026
对抗式复审(对 #278/#279/#280 集成分支)确认的缺陷与本轮处理: ACP(codex-rs/zuno-acp) - 桥接把 App Server 的审批/提问请求放在事件循环的 select! 分支内同步等待 客户端应答,而应答帧只能由同一循环轮询的传输层读到,因此任何一次 session/request_permission 或 elicitation/create 都会让桥接永久挂起。 现在每个 App Server 请求在 JoinSet 任务里等待,事件循环继续读取传输层 与投影通知,完成后再 resolve/reject。新增端到端回归测试 native_acp_completes_a_turn_after_the_client_answers_a_permission_request (mock 模型发出需审批的 shell 调用,客户端回答 allow_once 后 prompt 必须以 end_turn 结束):修复前 94 秒超时失败,修复后 5 秒通过。 上游同步 workflow(.github/workflows/zuno-upstream-sync.yml) - 默认 GITHUB_TOKEN 排下的 auto-merge 被 GitHub 合并后产生的 pull_request: closed 事件不会启动任何 workflow,zuno-release.yml 永远不会晋升,发布会 静默缺失。现在只有配置了 ZUNO_UPSTREAM_SYNC_TOKEN 才排队,否则留言说明。 - 队列绑定巡检推送的精确 head:PR 正文新增 Zuno-Candidate-Commit trailer, state 步在每一轮(含 skip 路径)发现 head 不等于该提交且 auto-merge 仍启用 时撤回并留言,协作者向候选分支推送后不再会被免人工合入。 - 撤回旧队列提前到 PR 步与冲突步的最前面,失败即中止(不再 || true), 避免后续命令失败留下过期队列。 - issue 的关闭改用默认 token(自动化 PAT 不再需要 issues 权限),关闭 被取代 PR/issue 失败只告警不中止;PR 正文的重叠路径列表截断到 200 条。 - 边界脚本钉住以上守卫:USING_DEFAULT_TOKEN 分支、pr_number 撤回、 Zuno-Candidate-Commit、撤回先于关闭、禁止吞掉撤回失败、禁止 --trust-local-tags。 同步脚本(scripts/zuno_upstream.py、scripts/zuno_rebrand.py) - 所选 rust-v* 标签必须与 openai/codex 远端发布的提交一致 (verify_tag_on_remote,git ls-remote 取 peeled 提交),只存在于 origin 的 伪造标签被拒绝;--trust-local-tags 仅供离线演练,巡检永不传。 - 源码永不改名:.rs 文件里上游新增的行只在字符串字面量与 // 注释内改名 (rust_text_spans / rebrand_new_text),基线已有的行按谓词结果完整改名; 受影响文件以 guarded 列入报告与 PR 正文。 文档与契约 - docs/zuno-upstream-sync*.md:免人工三项前置条件(secret、Allow auto-merge、 无人工评审)、暂停自动化须先关 automatic_merge 或撤回队列、标签来源校验、 Cargo.toml 版本行例外、--reuse 遇规则变化的行为、token 暴露的残余风险。 - FORK_REBRAND.toml 不再声称门禁快照测试会兜底 [[added]];FORK_DELTA.toml 与 UPSTREAM_CODEX.toml 的契约/注释同步;ZUNO_ARCHITECTURE.md 示例注释改为 policy next;docs/zuno-acp*.md 说明审批/提问不再阻塞传输层。 本地验证:check_zuno_update_boundaries.py OK、actionlint OK、ruff OK、 test_zuno_upstream.py + test_zuno_rebrand.py 48 个测试通过、 cargo test -p codex-cli --test acp(2)与 cargo test -p zuno-acp(12)通过、 cargo clippy -p zuno-acp -p codex-cli --all-targets -- -D warnings 通过、 cargo fmt --check 干净。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
新增
docs/zuno-enterprise-agent.md(含 zh-CN),作为在 Zuno 上构建企业级 Agent 的设计基线:requirements.toml、hooks、插件、code mode、guardian、身份、OTel),并引用上游文档中两条决定设计走向的约束(app-server 标为实验性、命令级代理不覆盖 MCP/模型流量)。DESIGN_SOURCES.toml登记该文章为 design-reference-only 来源,README 增加入口链接。纯文档,不改变任何行为。