Repository navigation
docs(managed-agent): Stage H4/H5/H6 slice designs - #13499
Conversation
wenshao
left a comment
There was a problem hiding this comment.
评审基于 dad188a936c0b54ece3c10c9c2d141379e4d5ce7,范围为全部六份 H4/H5/H6 双语设计文档,并对照本提交中的 TS/Java 契约及文档固定的外部参考设计。
发现 3 项 P2 设计问题,已逐行评论:H4 与已注册 Shell 正文的兼容方案缺失、前台 child 的结果接受流程与通知约束冲突、H6 定义更新缺少跨修订的调度覆盖水位。建议在据此冻结实现契约前修正;这些是设计层问题,本 PR 未修改生产逻辑。
另有一项非阻塞建议:H4 决策 1 把 child_acceptance 放在 child authority,父侧 accepted/consumed 则放进 child_run;固定参考设计 §2/§5把 child_acceptance 定义为父 authority 的接受回执与消费位置。若这是有意调整,请说明偏离及 relay ACK/资源保留的对应关系;否则建议沿用参考设计的领域归属。
验证:三对文档的标题层级一致、相对链接均可解析;全文对照未发现实质性的中英文翻译遗漏;git diff --check 通过。提交前未发现待核对的已有 Critical。仅做文档与源码静态核验,未运行构建、单元测试或运行时 E2E,也不将上述设计推演当作运行时复现。
…n, foreground/background forks, cross-revision watermark Co-authored-by: Qwen-Coder <[email protected]>
wenshao
left a comment
There was a problem hiding this comment.
复审提交 a33b30a202412fa221a6765a9112842f7b6200c8(增量 dad188a → a33b30a),已核对四份更新文档、双语上下文及固定参考设计;H5 两份文档没有变化。
| 上轮问题 | 本轮结论 |
|---|---|
| H4 与现有 Shell 正文兼容 | 已修正设计方向:保留 v1,新增 v2 kind-union,明确各 kind 的身份、任务投影及 TS/Java 版本准入矩阵。 |
| H4 前台结果误走通知输入 | 部分修正:决策 4 已禁止前台通知;但新文字把结果受理与父侧消费合并,仍有 1 项 P2,见行内评论。 |
| H6 定义更新重跑已执行时隙 | 上轮反例已修正:跨修订 latestAdmittedSlot 参与 claim/catch-up,旧修订已提交的 slot 不再被新 revision 重新点火。 |
本轮剩余 1 项 P2。上一轮关于 child_acceptance 领域归属的非阻塞建议尚未调整,仍保持建议级别,不重复新增行内问题。
验证:新改动的中英文语义对齐;三对文档标题层级匹配、相对文件链接有效;全 PR 的 git diff --check 通过。以上为设计与源码静态核验,未运行构建、单元测试或运行时 E2E。
… the answer, consumed as its own later revision Co-authored-by: Qwen-Coder <[email protected]>
wenshao
left a comment
There was a problem hiding this comment.
复审提交 2c8cfd7466bd83be3758694e4b0d197278f8d98b(增量 a33b30a → 2c8cfd7)。本轮未发现新增 P2 及以上问题;此前报告的 P2 设计问题均已修正。
已按最新正文核实上一轮问题,而非仅依据评论线程的 resolved 标记:H4 决策 4现在将原工具结果与 accepted 一起持久提交,consumed 则由父 authority 在对应消费进度成立后单独推进。两者之间崩溃时,恢复保留“已接受、待消费”;前台仍不生成 notification input 或 wake。H4b 的范围与退出门槛已同步该语义,中英文一致。
同时确认,前两轮补充的 Shell v1/v2 兼容设计与 H6 跨修订 latestAdmittedSlot 规则仍然保留,原先的反例没有回归。本次仅改动 H4 的中英文文档,H5/H6 与上轮评审版本一致。
此前关于 child_acceptance 领域归属与固定参考设计不一致的意见仍为非阻塞建议,建议在 H4 契约定稿时说明归属及 relay ACK/资源保留关系;本轮不重复新增问题。
验证:检查了完整增量及相关决策、切片门槛和验收上下文;三对文档标题层级匹配、相对文件链接有效;全 PR 的 git diff --check 通过。这是文档与契约的静态复审,未运行构建、单元测试或运行时 E2E。
|
@qwen-code /triage |
|
@qwen-code /triage |
|
Sandboxed verification: This PR changes documentation/assets only — there is no code to execute, so a sandboxed verification has nothing to verify. 中文 — 判定:
|
|
Thanks for the PR! Template looks good ✓ — every required heading is present, and the design-doc rule the template calls out (link both language versions, keep them synchronized) is satisfied: all three pairs exist with reciprocal links, and all 19 relative Problem: this isn't a bug fix, so there's no reproduction to ask for — the driver is the open tracker #12827, which assigns each Stage H capability its own admission/receipt/cancel/quota/recovery checks, and AGENTS.md requires a design doc for non-trivial work before the code lands. That's an observed, tracked need rather than theoretical hardening. Direction: aligned. Stage H is an active roadmap item (#12827 is open and carries Size: not applicable. All six files are new docs under Approach: the scope feels right, and — worth saying, because it's the less common direction — these docs actively narrow rather than expand. H4 defers independent worktrees, teams and the mailbox and admits only I did verify the factual claims rather than take them on trust, and they hold up unusually well — the registered-but-not-enabled domain state, the absent record bodies for Risk: no elevated risk signals — the Stage 1e high-risk path scan matched nothing. Moving on to code review. 🔍 中文说明感谢贡献! 模板完整 ✓ —— 所有必需标题齐备,模板点名的设计文档规则(附上双语版本链接并保持同步)也满足:三对文档均存在且互链,六个新文件里的 19 个相对 问题:这不是 bug fix,因此无需复现——驱动来源是仍开放的 tracker #12827,它要求 H 阶段每个能力各自具备准入/回执/取消/配额/恢复检查;AGENTS.md 也要求非平凡工作在落代码前先有设计文档。这是已观测、已被跟踪的需求,不是理论性加固。 方向:对齐。H 阶段是活跃路线图项(#12827 开放,带 规模:不适用。六个文件均为 方案:范围合理。更值得说的是——这批文档在主动收窄而非扩张:H4 推迟独立 worktree、team 与 mailbox,只准入 我确实核验了文中事实性断言而非直接采信,结果准确度相当高——domain "已注册但未开放"的状态、 风险:无升级风险信号——Stage 1e 高风险路径扫描无命中。 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
Code reviewDocs-only, so the review is about whether the documents are correct and self-consistent rather than whether code behaves. I read all six files at the head commit and checked the factual claims against the tree instead of taking them on trust — about twenty of them, including the ones that are easiest to get subtly wrong. They hold up remarkably well, and in a few places better than I expected: the email state store's bounds are quoted exactly right ( One thing did turn up, and it's worth fixing before merge because of where it sits. H4's current-state section is stale on That would be a harmless inconsistency in most sections, but the current-state section is precisely the part whose stated job is to stop later slices re-investigating — and the registered shell body is the single most consequential constraint on H4a. It is the whole reason H4a must define body version 2 as a kind-union with Two smaller items of the same kind:
The cheapest honest fix is to keep the pinned baseline and add a short note where the doc already speaks about "main" unscoped, so current state and the record-body section agree. Re-verifying and refreshing the baseline wholesale would also work but is more churn than the problem needs. None of this blocks: there is no runtime surface here, every document is explicitly marked proposed-design with nothing implemented and no domain enabled, and the H4a body-version-2 design that the stale line obscures is itself correct and well reasoned. Structural requirements are all met — eleven sections per pair in identical order and heading levels across all three pairs, reciprocal language links, and all nineteen relative links resolving. The byte volumes also confirm the Chinese versions are full translations rather than summaries (17.5 KB against 19.9 KB, 17.9 against 20.2, 21.2 against 24.9 — the lopsided line counts are just the English being hard-wrapped at ~76 columns while the Chinese runs one line per paragraph), which is what the design README requires. Testing evidenceThis is an unattended CI run, so per the gate rules I did not build or execute anything from the PR — the evidence below is the PR's own CI, read through the API for the reviewed commit. Nothing in this diff is user-visible (six new Markdown files, no code, no TUI surface), so real-scenario terminal testing is N/A, and there is no behavioural claim for a sandboxed lane to settle — The PR's
中文说明代码审查纯文档,因此审查重点是文档是否正确、是否自洽,而非代码行为。我在 head 提交上读完六个文件,并把事实性断言逐条对照代码树核验,而不是直接采信——大约二十条,包含最容易出细微错误的几条。结果准确度很高,某些地方甚至超出预期:email 状态存储的上限引用完全正确( 但确实查出一处,且因为它所在的位置而值得在合入前修掉。 H4 现状小节关于 放在别的小节这只是一处无害的不一致,但现状小节恰恰是其声明职责为"让后续切片不必重复调查"的那部分——而已注册的 shell 正文正是 H4a 最关键的一条约束。它就是 H4a 必须把正文版本 2 定义成 kind-union、并让 另有两处同类小问题:
最省事的诚实修法是保留钉住的基线,只在文档已经不限定地说"main"的地方补一句短说明,让现状小节与记录正文小节一致。整体重新核验并刷新基线也可行,但对这个问题的规模来说是多余的改动。 这些都不构成阻塞:这里没有运行时面,每篇文档都明确标注为设计提案、无实现、无 domain 开放;而被那句过期陈述遮住的 H4a 正文版本 2 设计本身是正确且论证充分的。结构性要求全部满足——三对文档每对十一节、顺序与标题层级完全一致,互链齐备,十九个相对链接全部可解析。字节量也证明中文版是完整翻译而非摘要(17.5 KB 对 19.9 KB、17.9 对 20.2、21.2 对 24.9——行数悬殊只是因为英文按约 76 列硬折行,而中文一段一行),这正是设计文档 README 的要求。 测试证据这是无人值守的 CI 运行,因此按 gate 规则我没有构建或执行 PR 里的任何内容——下面的证据是 PR 自己的 CI,通过 API 针对被审提交读取。本 diff 没有任何用户可见面(六个新 Markdown 文件,无代码、无 TUI),因此真实场景终端测试为 N/A;也没有需要沙箱通道来判定的行为性断言—— PR 的 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
Confidence: 4/5 — accurate, well-scoped design groundwork that meets every structural requirement; the one real defect is a stale current-state line that is non-blocking and cheap to fix. Before reading the diff I wrote down what I'd expect from a tracker-driven design slice: one document per capability, bilingual twins, a current-state section pinned to a named commit so nobody re-investigates, a slice plan with exit gates that actually gate, and non-goals that say what's being deferred. This PR matches all of that, and it exceeds my baseline in one respect I would not have anticipated — the H4a body-version-2 kind-union. Discovering that The scope discipline is what I'd point at as the reason this doesn't read as volume. Three capabilities could easily have become three speculative platform designs; instead H4 admits only My reservation is the one I wrote up in the review: H4's current-state bullet still says On the questions I'm supposed to ask myself: this is groundwork for an open, labelled roadmap tracker, so the "does anyone want this" test is answered by #12827 existing. In six months the pinned baselines are what will make these documents trustworthy rather than archaeological, which is exactly why the one stale line is worth naming. I checked whether I was being worn down by volume or approving for want of objections — I found a genuine defect, traced it to the commit where it became wrong, and it doesn't block, so the approval is a judgement rather than a shrug. CI is green on the reviewed commit with nothing pending. Approving. The three staleness items above are non-blocking follow-ups, not conditions. 中文说明Confidence: 4/5 —— 准确、范围克制的设计前置工作,满足全部结构性要求;唯一的实质缺陷是一处过期的现状陈述,不阻塞且修复成本很低。 在读 diff 之前我先写下了自己对"tracker 驱动的设计切片"的预期:每个能力一篇文档、双语孪生、现状小节钉在具体提交上以免后人重复调查、带真正能拦住的退出门槛的切片计划,以及说明推迟了什么 non-goals。这个 PR 全部符合,并且在一点上超出我的基线——H4a 的正文版本 2 kind-union。发现 范围克制正是它读起来不像"堆量"的原因。三个能力很容易写成三份投机的平台设计;但 H4 只准入 我的保留意见就是审查里写的那条:H4 现状那条仍说 关于我该自问的那些问题:这是一个开放且带标签的路线图 tracker 的前置工作,所以"有没有人要"由 #12827 的存在回答。六个月后,正是这些钉住的基线会让文档可信而非变成考古材料——这也正是要点名那一处过期陈述的原因。我也检查了自己是否被数量磨平、或是否因为找不出反对意见就放行——我发现了一个真实缺陷,追到了它开始出错的那个提交,而它不构成阻塞,所以这次放行是判断而非敷衍。被审提交上 CI 为绿,无待决检查。 予以批准。上述三项过期问题是非阻塞的后续项,不是合入条件。 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
qwen-code-review-bot
left a comment
There was a problem hiding this comment.
LGTM, looks ready to ship. ✅
qqqys
left a comment
There was a problem hiding this comment.
Reviewed head: 5001174978b55388ca52cc408051ee18d32013b6 (base main).
Approve. No historical blocking finding exists on this PR, and the Critical-only scan found nothing blocking. For a docs-only change the only Critical class that applies is mis-certification — a document asserting that current code behaves a way it does not — so that is what I checked, against live main rather than against the PR's own prose.
Historical blocking findings
None to re-verify. The PR carries eight reviews: seven COMMENTED author notes across the intermediate commits and one qwen-code-review-bot APPROVE filed against this exact head. All four review threads are resolved, there is no review ledger and no [Critical] inline comment anywhere on the PR, and reviewDecision is REVIEW_REQUIRED — no CHANGES_REQUESTED was ever filed. The bot's approval was not substituted for verification; the claims below were checked independently.
Critical-only scan
The diff is six new files under docs/design/ (+1210/−0): three English documents and their Chinese twins. No production code, no contract, no schema, no migration, no workflow — so there is no runtime surface that could regress, and the reviewable question is whether the documents are accurate about the code they describe.
The structural claim holds exactly. The PR asserts the twins have "identical section structure (11 sections per pair, verified)". At this head all six files carry one H1 and ten H2 headings, and the ten correspond one-to-one in order across every pair: Problem/问题, Current state/现状, Goals/目标, Non-goals/非目标, Decisions/决策, Record bodies (H4a/H5a/H6a contract direction)/记录正文, Slice plan/切片计划, Validation plan/验证计划, Acceptance criteria/验收标准, Open questions/未决问题. The reciprocal language link sits on line 3 of all six files and points at both twins. The three-way size asymmetry (283/294/337 English lines against 92/101/103 Chinese) is a summarising twin, not a divergent one — the section structure the claim is about is identical.
The "verified on main" claims check out against live main. These are the load-bearing facts, because a later slice is meant to stop re-investigating by trusting them:
monitor_runis already in the v1 domain index. Confirmed — it is inMANAGED_SESSION_DOMAINSinpackages/core/src/managed-runtime/managed-session-records.ts, and that file's own header comment records it as parsing in readers since #12837. The document's correction to the tracker's older snapshot is right.- H1/H2 bodies are already enabled. Confirmed —
MANAGED_SESSION_ENABLED_DOMAINScontainsmcp_configuration,mcp_operation,hook_registrationandhook_execution. - No H4/H5/H6 domain is enabled for submission. Confirmed —
child_run,child_acceptance,team_state,team_task,team_message,team_plan,channel_route,channel_delivery,scheduleandautomation_runare all present in the closed registry and all absent from the enabled set. This is enforced, not merely conventional:assertManagedSessionDomainEnabledthrowsdomain … is registered but not enabled for submission, and the source comment states the distinction the documents rely on ("recognising a name never means the capability is implemented or admitted, so submission is gated separately"). So the documents' repeated "proposed-design, nothing implemented, no domain enabled" status line is accurate. - Cited paths exist.
packages/cli/src/runtime/scheduled-task-run.tsandpackages/core/src/managed-runtime/managed-session-inbox.tsboth resolve onmain. - No WakeIntent record. Confirmed — no such name appears in the records module, matching the document's statement that there is none by design.
One incidental note that is not a finding and does not affect this approval: the automation_run string also appears in MANAGED_SESSION_ACTION_SOURCES, a separate list of action sources. It is not a second enabled-domain entry, and nothing in the documents conflates the two.
Nothing in the documents could mis-certify shipped behaviour, because each one states its own status line as proposed-design and scopes its non-goals explicitly. The risk this class of PR usually carries — a design document describing a planned capability in the present tense, so a reader believes it ships — is avoided here by the status lines and by the fact that the registry/enabled split in code independently enforces the inertness the documents claim.
Not scanned — disclosed, not asserted clean
I verified the structural claim across all six files and the factual claims about main listed above. I did not read all 1,210 lines line by line, did not verify the acceptance criteria against §14 of the reference design, and did not fetch the pinned external reference-design commit the documents cite, so I am not attesting that the section mapping to that reference is complete or that the pinned link resolves. I did not audit the slice-plan exit gates for achievability — that is a planning judgement, not a correctness one. I report no Critical in those areas because I found none where I looked, not because I proved absence.
CI
No failing checks at this head: 12 pass, 27 skipped, 1 pending. The passing set includes Test (ubuntu-latest, Node 22.x), Lint & Static, Integration Tests (no-AK, No Sandbox) and Desktop Shell on both ubuntu and windows. The single pending job is the automatic review-pr, which per this channel's rules is summarised and never treated as a gate. Nothing to attribute to this PR.
Scope note
Approval is bound to commit 50011749. It covers the documents as documentation: their internal consistency, their twin parity, and the accuracy of the current-state facts they assert about main. It is not a judgement that the proposed H4/H5/H6 designs are the right decomposition, and it does not pre-approve any contract or implementation slice that follows from them.
What this PR does
This PR adds the Stage H4/H5/H6 slice design documents (English + Chinese twins):
2026-10-04-managed-child-agents.{md,zh-CN.md}(H4 child agents/workflows/teams),2026-10-04-managed-channels.{md,zh-CN.md}(H5 Channels), and2026-10-04-managed-automation.{md,zh-CN.md}(H6 automation), following the house design-doc format of the H0a/H0b/H0c pairs. Each document states its slice plan (a/b/c with explicit exit gates), record-body direction, validation plan (fixture parity, mutation checks, fault-injection E2E), acceptance criteria mapped to the reference design's §14 items, and its open questions — all marked proposed-design with nothing implemented and no domain enabled for submission.Why it's needed
The Stage H tracker (#12827) assigns each capability its own admission/receipt/cancel/quota/recovery checks, and the pinned extension-runtime design defines the target semantics for children, channels, and automation. These documents turn those into sliceable work: each records verified current-state facts (against
main@5ddfacc9d4, with naming corrections to the tracker's older snapshot —monitor_runalready in the v1 domain index, H1/H2 bodies already enabled, no WakeIntent record by design) so later slices stop re-investigating, and narrows the first vertical slice explicitly (H4: read-only snapshot workspace only, deferring independent worktree/teams/mailbox; H5: email as the reference adapter; H6: scanner lease single-claim, delivery without model rerun).Reviewer Test Plan
How to verify
Docs-only. The English and Chinese twins have identical section structure (11 sections per pair, verified), reciprocal language links, date conventions matching the house design dirs, and every factual claim about current code is cited with a verified path/source (no claim presented as existing unless it reads out of main). The
readme-style pair check in the review guides covers whether both language versions stay in sync per the design-doc README.Evidence (Before & After)
N/A (documentation). The documents distinguish "verified on main" content from "designed, not yet implemented" content in their status lines and non-goals; factual corrections to the tracker/current snapshot are documented inline (four-part ingress identity records; attachment staging; occurrenceKey shapes).
Tested on
N/A (documentation).
Risk & Scope
child_runwith the H3-registered shell body on main).Linked Issues
Part of #12827 (Stage H design slices) · Refs #12380
中文说明
本 PR 做了什么
本 PR 新增 Stage H4/H5/H6 的双语设计文档:
2026-10-04-managed-child-agents.{md,zh-CN.md}(H4 子 Agent/workflow/team)、2026-10-04-managed-channels.{md,zh-CN.md}(H5 Channels)、2026-10-04-managed-automation.{md,zh-CN.md}(H6 自动化),沿用 H0a/H0b/H0c 的格式——切片计划带退出门槛、记录体方向、验证计划、对照参考设计 §14 的验收、以及 open questions;全部标注 proposed-design、无实现、无 domain 放开。为什么需要
#12827 要求各能力各自具备准入/回执/取消/配额/恢复检查;文档把 pinned 设计落成可拆工作,并记录按
main@5ddfacc9d4核验过的现状纠正(monitor_run 已在 v1 索引、H1/H2 body 已开、无 WakeIntent 记录),首个垂直切片显式收窄(H4 只读 snapshot、推迟 worktree/team/mailbox;H5 email 参照 adapter;H6 扫描者单 claim、交付不重跑模型)。评审者验证计划
如何验证
纯文档。每对标题结构 11 节逐一对齐、互链存在、日期符合仓惯例,每项关于现状代码的断言都有已核验出处,未实现项明确标注。
证据(前后对照)
N/A(纯文档)。现状纠正内嵌记录。
已测试
N/A。
风险与范围
关联 Issue
#12827(阶段 H 设计切片)· #12380