fix(mesh): bind resident turns to stored transcripts - #11255
Conversation
19e9138
into
codex/multi-agent-mesh-foundation
|
This PR merged while triage was in flight. The Template ✓ — every required heading is present and actually filled in, including the Tested-on table and the full Chinese translation. Problem: observed, not theoretical. The description reports a concrete live failure — the first parent wake died before the resident body could continue — with a before/after and a named root cause. Reading the code confirms the mechanism rather than taking it on faith: Direction: aligned. This is one step of a documented, maintainer-driven build-out (the design and acceptance plans under Size: core path touched ( Approach: scope feels right, and I could not find a smaller fix. Aligning the read root with the write root is the minimal correction; the alternative — threading the resolved meta path down from the launcher — would be a larger refactor for the same outcome. The 76 doc lines are the bulk of the diff but are not scope creep: the acceptance plan's job is recording what the live run proved and what it did not, and this PR is that run. One honest note: the code fix ships with no test, which Stage 2 turns into a finding. Risk: no elevated risk signals — none of the three changed paths match the revert-correlated set. Moving on to code review. 🔍 中文说明本 PR 在 triage 运行期间已被合并。 模板完整 ✓ —— 所有必需小节都存在且真实填写,包括 Tested-on 表格和完整中文翻译。 问题:已观测,不是理论性加固。 描述给出了具体的真实失败——第一次父线程唤醒在长期执行体续跑之前就挂了——并附 before/after 和明确的根因。读代码可以确认这个机制,而不只是采信描述: 方向:对齐。这是一个有文档、由维护者推进的搭建过程中的一步( 规模:触及核心路径( 方案:范围合理,也没找到更小的改法。让读取根目录与写入根目录一致就是最小修正;另一条路——把解析好的 meta 路径从 launcher 传下来——为了同样结果要做更大的重构。76 行文档虽然是 diff 的主体,但不算夹带:验收计划的职责本来就是记录这次真实运行证明了什么、没证明什么,而本 PR 就是那次运行。一个客观提醒:这处代码修正没有带测试,Stage 2 会把它变成一条发现。 风险:无升级风险信号——三个改动路径都不匹配与 revert 相关的路径集合。 进入代码审查 🔍 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
Reading only the title and the "Why it's needed" section first, my own proposal was: the launcher writes the mesh agent's sidecar under the background-agent transcript root, so the continuation binder has to resolve that same root — change the one argument to whatever the launcher passes, and pin it with a test so the two cannot drift apart again. The PR does the first half exactly. It does not do the second, and that turns out to matter. The production fix is correct
The nicest corroboration is Consumers, named, since this is a core-path change: One real problem: this breaks the package's own test for this file
All 7 Not verified by execution: running PR-derived code is out of bounds for this gate, so the above is static analysis of the code at the reviewed commit, not a vitest run. I did check it is still live rather than already fixed: the branch tip is this PR's merge commit Test evidence — the PR's own CIThere is none, and the reason is structural rather than an oversight.
Sandboxed verification would settle this: 中文说明先只看标题和"为什么需要",我自己的方案是:launcher 把 mesh agent 的 sidecar 写在后台 agent transcript 根目录下,所以续跑的绑定必须解析同一个根目录——把那个参数改成 launcher 用的值,并补一个测试把两者钉住,避免再次漂移。这个 PR 精确地做了前半部分,没做后半部分,而这恰恰是要紧的。 生产代码的修改是正确的。 下游消费者点名(核心路径改动必须点): 一个真实问题:这次改动破坏了该文件自己的测试。 未经执行验证: 本关卡禁止运行 PR 派生代码,所以上面是对被审 commit 的静态分析,不是 vitest 运行结果。我确认过它仍然是活的、而非已被修好:分支 tip 就是本 PR 的合并 commit 测试证据——PR 自己的 CI:没有,而且原因是结构性的,不是疏忽。 沙箱验证可以定这件事:在 #11206(携带本 commit)上跑 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
|
Confidence: 3/5 — the production fix is right and I would have written that line identically; it landed with its own package's test broken and no CI in a position to notice, and the stack has to clear that before #11206 reaches Stepping back. The change matches my independent proposal on the code and misses it on the test, and that gap is the whole story here. I verified the problem exists rather than accepting the framing: the writer in Would I thank or curse whoever wrote this in six months? Both, in that order. Thank them for aligning the root; curse the missing pin, because the drift this corrects is exactly the drift that will recur — after this commit, still nothing in the repo asserts that the binder and the launcher resolve the same directory. The mocked On the pattern question, which matters more than this PR: ten PRs have now merged into Am I being a pushover? The easy call here is to wave through a maintainer's two-line fix on a feature branch. I am not making it: there is a concrete, mechanically determined regression, and the score reflects it. Verdict: defer — no approval, no request-changes. To be explicit about why neither gate action is taken, since both would otherwise be expected:
@yiliang114 — you own this stack and are the only one who can push to that branch, so this goes to you rather than to a third-party maintainer; the PR carries no labels and no reviews, so there is no independent owner to resolve to, and escalating a one-line test fix in your own draft stack to someone without context would just be noise. Three things, in priority order:
I did not cross-post this to #11206 — it is a draft you own and the finding is already named there in Stage 2. Say the word if you would rather it were tracked on the parent. 中文说明Confidence: 3/5 —— 生产代码的修改是对的,那一行我自己也会这么写;但它落地时本 package 的测试是坏的,而 CI 处在无法发现这件事的位置,stack 必须在 #11206 到达 退一步看。这个改动在代码上与我的独立方案一致,在测试上不一致,而这个缺口就是全部故事。我验证了问题确实存在,而不是采信它的表述: 六个月后我会感谢还是埋怨写这段代码的人?两者都有,顺序如上。感谢对齐了根目录;埋怨缺少那颗钉子,因为这次修正的漂移正是会再次发生的漂移——这个 commit 之后,仓库里仍然没有任何东西断言绑定方与 launcher 解析出同一个目录。 关于"是否是模式"这个问题,它比本 PR 更重要:现在已有十个 PR 合入(含本 PR) 我是不是太好说话了?这里最省事的判断是把维护者在特性分支上的两行修改直接放过。我没有这么判:存在一个具体的、由机制决定的回归,分数也体现了这一点。 结论:暂缓——不 approve,也不 request-changes。 明确说明为什么两个关卡动作都不做,否则它们本该是预期行为:
@yiliang114 —— 这个 stack 归你,也只有你能往那个分支推代码,所以这条交给你而不是交给第三方维护者;本 PR 没有任何 label,也没有任何 review,因此解析不出独立负责人,而把你自己 draft stack 里的一行测试修复升级给一个没有上下文的人,只会是噪音。三件事,按优先级:
我没有把这条转发到 #11206 —— 那是你名下的 draft,而 Stage 2 里已经点名了这个问题所在。如果你更希望在父 PR 上跟踪,说一声即可。 — Qwen Code · qwen3.8-max-2026-09-02 Reviewed at |
What this PR does
This stacked child of #11206 fixes resident-agent continuation so the next mesh run is bound through the same persisted transcript location used when the background agent was launched. It also records the first two-agent live happy-path observation in the design and acceptance documents.
Why it's needed
The first live parent wake found that continuation looked for agent metadata below the checkout instead of the runtime project-artifact directory. The first Alice run and Bob child run completed, but Alice's second run failed before her resident body could continue. Aligning the lookup with the launcher removes that blocker.
Reviewer Test Plan
How to verify
Create a root thread addressed only to Alice. Ask Alice to create and assign a child to Bob and wait. Bob should post his result and hand the child to review; the parent report should book Alice again; the same resident Alice body should summarize Bob's result and hand the root to review. Confirm the root and child both end in review, with Alice's closes recorded as waiting then review and Bob's close recorded as review.
Evidence (Before & After)
Before: Bob completed the child and the parent report was persisted, but Alice's second run failed while binding its persisted runtime context because the metadata lookup used the checkout path.
After: Alice completed waiting, Bob completed review, the parent report was applied after 13 ms, and the same Alice body completed review on its second turn. Both threads ended in review. All six mesh thread tools were present in the real model tool surface. No mesh prompt change was required.
Tested on
Environment (optional)
Local TypeScript source execution with the configured OpenAI-compatible provider and two real
general-purposebackground agents. No build, lint, typecheck, CI, or unit-test command was run for this child PR.Risk & Scope
Linked Issues
Part of #11206.
中文说明
这个 PR 做什么
这是 #11206 的 stacked 子 PR。它修复长期驻留 agent 续跑时的绑定路径,让下一次 mesh run 从后台 agent 启动时使用的同一个持久 transcript 位置读取元数据;同时把第一次双 agent 真实 happy path 的观测写回设计和验收文档。
为什么需要
第一次真实父线程唤醒暴露出:续跑在 checkout 下寻找 agent 元数据,而不是 runtime 的项目产物目录。Alice 第一轮和 Bob 子线程都成功完成,但 Alice 第二轮在长期执行体继续之前失败。让查找路径与 launcher 一致即可消除这个阻塞。
Reviewer Test Plan
如何验证
创建一个只 @alice 的根线程,让 Alice 新建并指派 Bob 的子线程后等待。Bob 应发回结果并把子线程交回 review;父报告应再次预约 Alice;同一个长期驻留的 Alice 执行体应汇总 Bob 的结果并把根线程交回 review。确认根线程与子线程最终都是 in_review,Alice 两次收尾依次记录为 waiting 和 review,Bob 记录为 review。
证据(修改前后)
修改前:Bob 已完成子线程,父报告也已持久化,但 Alice 第二次 run 在绑定持久运行上下文时失败,因为元数据查找使用了 checkout 路径。
修改后:Alice 完成 waiting,Bob 完成 review,父报告 13ms 后写入,同一个 Alice 执行体第二轮完成 review;两个线程都进入 in_review。真实模型工具面包含全部六个 mesh thread 工具。无需修改 mesh prompt。
测试环境
环境
本地直接运行 TypeScript 源码,使用已配置的 OpenAI-compatible provider 和两个真实
general-purpose后台 agent。本子 PR 没有运行 build、lint、typecheck、CI 或单元测试命令。风险与范围
关联
属于 #11206。