Repository navigation
fix: 修掉 #3088/#3112 引入的两个测试回归(#3166 合并树 CI 暴露) - #3172
Closed
ranxianglei wants to merge 2 commits into
Closed
ranxianglei wants to merge 2 commits into
ranxianglei wants to merge 2 commits into
Conversation
added 2 commits
October 14, 2026 19:53
#3088 wired wireToolGuardrails unconditionally into createBiliPlugin, and its input/session_shutdown/tool_call handlers read ctx.sessionManager without guarding ctx itself. The #2185 factory test fires session_shutdown with ctx=undefined (harness contract), so every pi plugin instance crashed the moment that event fired — deterministic red across all four OS/node legs of any merge-tree CI run. Null-safe reads change nothing when a context IS present (the real host always passes one); they only stop the crash.
…in32 (#3166 review) #3112's resolveLockPath does path.resolve(XDG_CACHE_HOME) exactly like paths.ts xdg() does — the mirror is correct. But the test computed its expectation with join(), which only agrees on Linux: on win32 a POSIX-style value resolves against the current drive, so the assertion failed on every Windows leg. Expect via resolve() so the mirror is pinned cross-platform; the implementation (and thus the lock file location) is unchanged.
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3635-pr.3172.a52d740This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3172.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
(ai: vllm-qwen/qwen3.8-27b) 判定:与 #3170 完全重复,本 issue 关闭。 共同点一句话:#3172 与 #3170 报告的是同两个 master 侧测试缺陷、同一组根因、同一套修法——唯一差异是发现入口(本 issue 出自 #3166 review,#3170 出自 #3163 review),缺陷清单无新增项。 独立核验(非照抄 issue 结论):
处置: 本 issue 打 |
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.
(ai: vllm-qwen/qwen3.8-27b)
来源: #3166 review 时发现(master 侧缺陷,与 #3166 的存储改动无关——#3166 未触碰本 PR 涉及的任何文件)
是什么问题
master 今天合入的 #3088(guardrails 迁移)和 #3112(test-suite-lock)各自带坏了一个既有测试。master 自己的 push-CI 按 #2637 分层设计跳过 test 车道(skipped 视为 satisfied),全量套件只在 PR 合并树上跑——所以这两个回归在 master 上是「绿灯不可见」,直到 #3166 的合并树运行把它们顶出来:
#2185: factory wiring确定性崩溃(ubuntu/windows × node22/24 四腿全红):Migrate pi tool-output guardrails from billion-context-pi (#3066) #3088 把wireToolGuardrails(pi)无条件接进createBiliPlugin,其input/session_shutdown/tool_callhandler 读ctx.sessionManager?.…却没防ctx本身为 undefined;而 factory 测试按 harness 约定用ctx=undefined触发 session_shutdown →TypeError: Cannot read properties of undefined (reading 'sessionManager')(src/agent/tool-guardrails.ts:292)。纯 master 本地复现同样失败。resolveLockPath mirrors paths.ts cacheDir()Windows 断言失败(win 腿):实现里path.resolve(XDG_CACHE_HOME)与 paths.tsxdg()完全一致(mirror 是对的),但测试期望值用join()计算——Linux 上两者恰好相等,Windows 上 POSIX 风格路径会解析到当前盘符(D:\tmp\x\…vs\tmp\x\…)→ 每个 Windows 腿必挂。怎么修的(两个独立 commit)
ctx?./!ctx ||);bash timeout 注入不依赖 ctx,保持先行。ctx 存在时行为零变化(真实宿主永远传 ctx),只消灭崩溃路径。resolve()计算,跨平台钉住 mirror 语义;实现与锁文件位置不变,纯测试修正。验证
本地定向:pi-subagent-registry 10/10、tool-guardrails-pi 35/35、test-suite-lock 16/16(共 61/61);typecheck 0 错。全量交给 CI。
行为变更披露
仅一处且属修复而非漂移:事件不带 context 时,guardrail 从「抛 TypeError」变为「该事件 no-op」。ctx 存在的路径无任何变化。无 config/kernel/wire/version 变更。
对 #3166 的意义
此 PR 合入 master 后,#3166 下一次 CI(新 push 或 re-run 都会重算合并树)即可转绿;在此之前 #3166 的 test 车道红是这两个 master 回归,不是它的存储改动。
记录 issue:#3173(带 [no-dispatch],owner 直接合并本 PR 即可)。