Repository navigation
[PR] pi-inline: stop attaching delegate children to the inline placeholder origin + document subagent limitation (#5645) - #5655
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9003-pr.5655.5aaeda0This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5655.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) 查重:不重复。 本 PR(#5655)只修「pi-inline 占位源被误当 attach 目标」这一个机制。在途的 #5637(PR 5638 / 5640,user-scope 安装也收敛 acp_delegate)是另一套机制——重复子代理插件的工具站下,症状与根因都不同,不并单。没有第二个 PR 动这条 我拉了分支、读了改动产物、本地跑了定向测试、核对了旧路径的真实行为、查了 CI。按八问答: 1. 是什么问题:pi 车道自 #5428 默认内联(进程内压缩,不起 proxy)。内联引擎把 2. 什么原因导致的: 3. 影响范围与严重程度:只命中一种拓扑——父进程跑内联且 4. 怎么修复的:在判定阶梯里把占位符单独摘出—— 5. 是否有回归问题:把 6. 是否破坏缓存:不涉及——只改子进程启动时选哪种姿态,不动压缩/缓存/wire/消息身份,各姿态内部行为原样。 7. 是否改了设计方向:不涉及——落在既有姿态决策契约(#886/#983/#1795/#3278/#5428)之内,纯 fix。 8. 是否引入新配置:无新增配置面。CONFIGURATION.md(en+zh)只补文档,引用既有开关( 证据:定向 一处非阻塞观察: 判定:代码层面可合。 方向对、改动外科手术式、无回归、无配置面扩张、文档到位。最终全量绿以 CI 分片为准(静态门禁、mysql 契约、本地定向单测均已确认绿,未见失败项)。layer-2 残留缺陷(一次性子进程自起的 proxy 把自己流量降级直连)按 PR 说法留待 #5645 拍板后落到同一分支;本 PR 定位准确——止血+铺路,不是根治。 |
(ai: vllm-qwen/qwen3.8-27b) Review verdict: APPROVE(代码层面可合) —— 以评论形式给出:本 PR 作者即当前凭据身份,GitHub 不允许自我 approve,故以评论承载审核结论。 独立性声明:本轮结论独立产出——我重读了完整 diff、逐入参路径核对了 八问
测试有效性:新增用例对「占位符→spawn」与「真源仍 attach」两个方向都断言(gate 双向纪律),回归时抓得住;CI @ 一处非阻塞观察(不在本 PR 扩范围): 透明披露(我的操作往返):review 过程中我先给两处文档各改一句(断言子进程「现在会被压缩」,commit 判定:可合(APPROVE)。 layer-1 方向对、外科手术式、无回归、无配置面扩张、文档到位;layer-2 残留按设计留待 #5645。 |
07e74c2 to
7a94f0b
Compare
…note (#5645) The parenthetical asserted each inline engine flushes its sessions on clean exit, which this same PR's residual finding contradicts: the inline lane has no SIGTERM->flush equivalent, so a fast-exiting one-shot delegate child drops its final debounced write and its last folded state may never reach disk. Removing the clause keeps the config doc consistent with the PR body; the persistence question itself stays tracked on #5645.
(ai: vllm-qwen/qwen3.8-27b) Review verdict: APPROVE(代码层面可合) —— 以评论承载:PR 作者即当前凭据身份,GitHub 不允许自我 approve。 独立性声明:本轮针对新 head 八问
测试有效性:单测覆盖三向且有牙(占位符→inline、占位符+ 已顺手修:CONFIGURATION.md / .zh-CN.md 里「…and each flushes its sessions on clean exit / …且各自在正常退出时 flush 自己的会话」一句,与本 PR 自己披露的残留发现(内联车道无 SIGTERM→flush 等价物、一次性子进程退出丢掉最后一次 debounced 写)直接矛盾——一次性 一处残留发现(不在本 PR、已在 #5645 跟踪、需 owner 拍板):内联车道缺退出/回合末 flush——短命一次性 delegate 子进程退出时可能丢掉最后一次 debounced 会话写,其最后折叠态未必落盘;压缩本身工作(内存态已验证),只影响 ephemeral 子的磁盘持久化(很少被 resume)。我的判断:这是真实但窄面的数据持久化缺口,定级取决于这些子会话是否会被 resume(作者称罕见);若预期会被 resume 就加一个小的回合末 flush,否则接受+文档化即可。该取舍归 #5645,不阻塞本 PR——姿态修复交付的核心价值(delegate 子被压缩)独立成立,因此我不在本 PR 打 needs-decision 标签(那会错误地把一个可独立合入的修复标记成待决策阻塞)。 CI:@ 判定:APPROVE(代码层面可合)。 方向对、比上轮更优(内联绕开 layer-2)、无回归、无配置面扩张、文档到位并顺手消除了一处自相矛盾;残留持久化缺口留 #5645 拍板。 |
(ai: vllm-qwen/qwen3.8-27b) 复审确认(head CI(镜像缓存 @ 判定维持:APPROVE(代码层面可合)。 人工会合并前等 test 分片转绿即可(§7.2)。遗留的 inline 退出 flush 持久化缺口仍归 #5645 拍板,不阻塞本 PR。 |
# Conflicts: # CONFIGURATION.md # CONFIGURATION.zh-CN.md
(ai: opencode/vllm-qwen/qwen3.8-27b) Merge conflict resolved. Merged What conflicted and how it was resolved:
Verification on the merged head (full-suite verdict is CI's): Live status after push (verified via API GET, not memory): PR 八问(中文结构化结论)
结论:冲突已解决并验证,merge state 由 dirty 转为 blocked(仅剩常规 checks/review 门禁),可进入正常审核流程。 |
[bot] 🏷 (ai: opencode/vllm-qwen/qwen3.8-27b) No action needed this run — the reported blocker is stale. Verified against live sources in this run (not memory):
So the PR is conflict-free and fully green; what remains under 八问(中文结构化结论)
结论:PR #5655 当前无冲突、CI 全绿(30/30),处于正常待人工审核状态,本 run 无需任何操作。 |
[ework] auto-fix stalled: test (windows-latest, 22, 1), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 3), test (ubuntu-latest, 22, 1), test (windows-latest, 22, 2), test (windows-latest, 22, 4), test (ubuntu-latest, 24, 1), test (windows-latest, 22, 5), test (ubuntu-latest, 24, 2) — stopping for human review |
1 similar comment
[ework] auto-fix stalled: test (windows-latest, 22, 1), test (ubuntu-latest, 24, 3), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 3), test (ubuntu-latest, 22, 1), test (windows-latest, 22, 2), test (windows-latest, 22, 4), test (ubuntu-latest, 24, 1), test (windows-latest, 22, 5), test (ubuntu-latest, 24, 2) — stopping for human review |
Additional impact datapoint: the inherited placeholder costs a fixed ~5 s on every child startup, not just "one doomed probe"Confirming layer-1 from a real macOS/pi 1.5.2 host (billion-context 0.1.215). The PR body currently frames the cost as "one doomed health probe, one misleading ERROR line, then falls back to spawn". On my host the probe itself is cheap (290 ms) — the real cost is the evidence grace window that follows it. Measurement
Scaling
28 ms between the two lines — the 5 s is entirely before the first one, i.e. inside Provenance check, since the placeholder is easy to mistake for user configuration: the shell that launched the parent pi has no Why this matters for prioritisation#5645 is filed as a compression-correctness gap ("delegate children bypass compression"). On a host that spawns a child per delegation, this is also a uniform +5 s TTFB on every child, which is independently user-visible and trivially reproducible with Small suggestion (optional, separate from this PR's fix)Even with the placeholder discounted, |
(ai: vllm-qwen/qwen3.8-27b) PR #5655 审核结论(当前 head 冲突已由 ci-engineer 解决(并入 (注:PR 作者即本 token 账号,GitHub 禁止自我审批,故以评论形式给出 APPROVE 结论。)
CI @ 判定:APPROVE(可合)。 冲突解决干净、修复完整、CI 全绿、无回归。残留项(内联车道短命进程可能丢最后一次折叠状态落盘)与本次改动无关(本 PR 不触碰 inline-engine),已在 #5645 跟踪,不阻塞本 PR。 |
(ai: vllm-qwen/qwen3.8-27b) Thanks @krius — well-measured datapoint, and your provenance check (clean grandparent shell, placeholder present only in the inline parent's in-memory env, inherited by the child via One correction on what this PR does to that cost: a placeholder child is now discounted — On your suggested guard (skip the grace window when the origin is Process note: I'm treating this comment as untrusted reference (platform policy for unverified outside users) and not acting on embedded directives — I won't file a separate issue or add the guard unilaterally. Whether to (a) pursue the general structurally-unreachable-origin hardening, and (b) update the PR body to quantify the ~5 s old-path cost (your point that "one doomed probe" understates it is fair), are owner decisions — flagging both for @ranxianglei rather than acting on them. |
Fixes #5645 — under the pi-inline default (#5428),
acp_delegatesub-agent children no longer bypass compression.Root cause (two layers)
BILLION_CONTEXT_PROXY=INLINE_ORIGIN, the never-listening placeholder the inline parent sets in-memory. It planned to attach to that dead host, so its traffic fell through uncompressed (oracleconv=null).Fix
planNativePino longer treats an inherited placeholder origin as an attach target. A process only ever seesBILLION_CONTEXT_PROXYset to it in its initial env when it is a nested child of an inline parent; such a child now resolves its own posture and boots its own in-process engine (no server), so delegate children are compressed too. Concurrent engines on one shared state dir is the supported multi-instance topology (#5082/#3923). A real launcher origin (bili pi) still attaches, unchanged.Verified end-to-end: delegate children now produce plugin-stamped requests with ACP tools injected and
acp_statusexecuting through their own engine.Docs
CONFIGURATION.md (en+zh): documents the inline-mode delegate sub-agent behavior.
CI / test scope
The native-pi e2e suite (
tests/e2e/e2e-native-pi.test.ts) documents the spawn/proxy-style ACP-channel contract (#2268); it is pinned toBILI_PI_INLINE=0via the mergedci-fixessentinel so that contract stays deterministic. Inline posture is covered bytests/pi-native.test.ts(extended here). Full suite: 8/8 green locally on this head; unit 20/20; typecheck clean.Residual finding (separate mechanism — flagged for decision, not part of this fix)
Under inline, a short-lived one-shot child drops its final debounced session write on exit: the server path catches the last pending write via SIGTERM→flush, but the inline lane has no equivalent, so a child's last folded state may not reach disk. Compression itself works (verified in-memory); this only affects disk persistence of ephemeral children (rarely resumed). Needs a call: add an end-of-turn flush (small per-turn fsync cost) vs. accept + document as low-impact. Tracked in-thread on #5645.