Skip to content

[PR] test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) - #5119

Open
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-29_test-xdg-sandbox
Open

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-29_test-xdg-sandbox

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #5116

What & why

Local test runs were writing into the real $HOME: bare targeted runs (node --import tsx --test tests/<file>.test.ts) skipped the preload entirely, and even the suite preload only pinned BILI_STORAGE_UNIFIED — so any test that did not pin its own XDG dirs landed sessions/index.db rows, session envelopes, and state files in the production ~/.local/.../billion-context tree.

The fix sits at the runner entry point (the preload), not per-test-file band-aids: the preload now sandboxes the four XDG base dirs to a per-process temp root. Explicit values always win, so every existing test that pins its own dirs (the large majority) is untouched; tests that delete a dir before asserting the homedir fallback still work (deletion happens after the preload).

Changes

  • tests/test-sandbox-env.mjs (new): sandboxXdgEnv(env) — unset-or-empty XDG_DATA_HOME / XDG_STATE_HOME / XDG_CACHE_HOME / XDG_CONFIG_HOME → one mkdtemp root under os.tmpdir() with data|state|cache|config subdirs; non-empty explicit values always win; root reported as BILI_TEST_XDG_ROOT; no auto-cleanup (OS tmp reaping + inspectable on failure).
  • tests/preload-storage-baseline.mjs: applies the sandbox — covers every invocation point (npm test via test-suite-lock, scripts/run-ci-tests.mjs, measure-test-durations).
  • tests/test-sandbox-env.test.ts + tests/test-sandbox-env.d.mts (new): resolver semantics matrix (unset→tmp / empty-string→tmp / set→wins / all-pinned→no-op) plus a live-process contract: bili's default path resolutions (dataDir / sessionsDir / stateDir / cacheDir / configDir / defaultLogFile) never land in the real home tree. Verified as negative control: running the test bare (no preload) fails both live assertions.
  • Docs: the canonical targeted-run form now always carries the preload (AGENTS.md §1/§3/§7.2, new "Targeted runs" section in reference/testing.md, UNIFIED_LOOP_SPEC.md); BILI_TEST_XDG_ROOT documented in reference/env-vars.md under the test-infra escape hatches.

Behavior changes (disclosure)

  1. Tests no longer read the real ~/.config/billion-context/billion-context.json. XDG_CONFIG_HOME was added to the sandbox beyond the issue's DATA/STATE/CACHE list — same mechanism family, and it closes the hermeticity hole where local runs picked up the developer's live config while CI runners never did. Old: config-unpinned tests read whatever was on the machine (non-deterministic across machines). New: tests see an empty config dir, matching CI.
  2. New test-infra env var BILI_TEST_XDG_ROOT — written by the preload, read by the contract test, tells you where a given test process's artifacts landed. Not a product knob; product code never reads it.
  3. Bare targeted runs are now documented as requiring the preload, and the contract test makes a bare run fail loudly instead of polluting silently.
  4. Test artifacts now land in os.tmpdir()/bili-test-xdg-* (one root per test-file process; not auto-cleaned).
  5. Zero product-code change — src/ untouched; no runtime behavior change for users.

Verification

  • A/B repro (scratch HOME, anthropic-cache-control.test.ts): without preload → index.db + envelopes + state files written into home (bug reproduced); with preload → 0 files under home, identical layout under .tmp/bili-test-xdg-*.
  • Negative control: contract test run bare (no preload) fails both live assertions, passes with the preload.
  • Targeted regression suites green with the preload: dumps-dir, test-suite-lock, ca-combined, doctor, storage-engine-bootstrap, update-backoff, price-profile-stamp (104 pass), launcher.test.ts (343 pass).
  • typecheck / build / check-test-import-graph / check-unused-exports green. Full-suite verdict = remote CI on the pushed head.

…iting real $HOME (#5116)

- tests/test-sandbox-env.mjs: unset/empty XDG_DATA/STATE/CACHE/CONFIG_HOME ->
  per-process mkdtemp root (data/state/cache/config subdirs); an explicitly
  set non-empty value always wins; root reported as BILI_TEST_XDG_ROOT
- preload-storage-baseline.mjs applies it, covering every invocation point
  (npm test via test-suite-lock, scripts/run-ci-tests.mjs, measure-test-durations)
- tests/test-sandbox-env.test.ts: resolver semantics matrix + live-process
  contract (bili default path resolutions never land in the real home tree;
  fails on a bare run that skipped the preload)
- docs: canonical targeted-run form always carries the preload
  (AGENTS.md, reference/testing.md, UNIFIED_LOOP_SPEC.md);
  BILI_TEST_XDG_ROOT documented in reference/env-vars.md
@ranxianglei ranxianglei changed the title test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) [PR] test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) Oct 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-29_test-xdg-sandbox (eb30668)

Latest build — install this exact version

npm install -g billion-context@0.0.6740-pr.5119.4a9905e

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
eb30668 billion-context@0.0.6740-pr.5119.4a9905e build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr5119.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 同家族但非一模一样 —— 与在途 PR #5115 相关,是取代关系。 同一问题(#5116:本地测试写脏真实 $HOME)今天有另一个更早开的 PR:#5115。

按政策我不关闭任何条目:#5115 已打 duplicate 标签,我会在两个线程各留一条说明取代关系的评论。建议 owner:合并 #5119、关闭 #5115(#5115 的实质内容被 #5119 完全覆盖)。

标签: bug、scope/ci、p2(测试基建缺陷:本地跑污染生产目录,有绕行=手动钉目录;严重度沿用 #5116 已定的 p2)

审核进行中:diff 审阅已完成(机制定位 / 回归面清点 / 测试有效性),正在做本地负向控制验证并把分支 rebase 到最新 master,结论按八问随后给出。

@ranxianglei ranxianglei added bug Something isn't working p2 scope/ci labels Oct 29, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b)

Heads-up — overlapping PR: PR #5120 (issue #5107, opened earlier, same mechanism: test runs resolving the real XDG defaults instead of sandboxed roots) also lands a preload that redirects the four XDG roots. Both preloads cannot merge as-is — they'd fight over the same env vars.

Comparison + recommendation (keep #5120 as the base for its leak guard — the explicit acceptance item of #5107 — plus e2e/CI wiring; optionally absorb this PR's ||= semantics and BILI_TEST_XDG_ROOT observability) is in the #5116 thread. Owner to decide which one converges; flagging here so the review isn't done twice against two parallel trees.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重结论更新(修正我首条回复「合并 #5119」的建议):我首轮扫描后 #5120 才开出来(08:16Z,对应 #5107 —— 三个 issue 里最早的一个,#5107 < #5116,同症状同机制)。三方关系:

对 #5119 本身的独立审核结论(我逐行读了代码,不复述他处结论):机制成立——修在 runner 入口层(疏不堵);四个 XDG key 清单完整覆盖 src/paths.ts 的全部默认解析面;全局套锁仍在 wrapper 进程真实 cache 目录解析、语义不变;测试有牙。本地独立验证:带预载 6/6 绿;裸跑恰好失败两个 live 契约测试(负向控制成立);已 rebase 到最新 master,顺带一个有标注小修(UNIFIED_LOOP_SPEC.md:163 去掉机器特定路径)。GitHub 出站通道当前故障(TLS 连接被重置,多次重试),push 未出,本地 head 就绪、网络恢复即推。

但横向对比的判定与 #5116 线程一致:#5120 是更强的主体,三条独立理由:

  1. 泄漏守卫是 Running the test suite locally writes test sessions into the production sessions directory. | 本地跑测试套件会把测试会话写进生产 sessions 目录 #5107 的硬性验收项(issue 原文「补一条断言生产 sessions 目录未被写入的守卫」);[PR] test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) #5119 无等价兜底——未来若有人拆掉预载接线,没有任何东西会红;
  2. 入口覆盖:364 行污染树的主源是 codex e2e 家族;[PR] fix: keep test suite off the production sessions dir (#5107) #5120 把三个 test:e2e* npm script 本身接上了沙箱,[PR] test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) #5119 的覆盖面止于既有预载链,e2e script 仍裸跑(只能靠文档劝人手动加预载);
  3. 语义:[PR] fix: keep test suite off the production sessions dir (#5107) #5120 无条件重定向堵住了 [PR] test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) #5119 ||= 留的洞——shell profile 里设过 XDG_DATA_HOME 之类的机器上,||= 只是把污染搬到另一个真实数据区;测试内显式自钉在两种语义下都不受影响(覆写发生在预载之后)。

#5119 值得吸收进 #5120 的独有贡献:① BILI_TEST_XDG_ROOT 观测(报告产物落点,与守卫 banner 互补);② live 契约测试(bili 默认路径解析永不落真实 home 树,可直接移植为 #5120 预载的回归钉);③ AGENTS.md §1/§3/§7.2 + UNIFIED_LOOP_SPEC 的 targeted-run 文档更新(#5120 是否同等覆盖待其 diff 确认)。

诚实边界:我对 #5120 的评估基于其 PR 描述 + #5107 线程的详细披露(机制级),逐行 diff 审核因出站网络故障暂做不了——#5120 合并前应有一份完整 diff review,网络恢复后我来补或另派。两 issue 严重度标注不一致(#5107 p3 / #5116 p2),同一机制,终局由你定。

八问(决策请求)

  1. 是什么问题:同一缺陷(本地测试写穿生产目录)有三条并行修复线,预载互相冲突,只能收敛出一条。
  2. 什么原因导致:根因相同(runner 入口无数据根沙箱);三个会话在重叠时间窗各自接单各自实现,缺少跨会话的立项去重闸口。
  3. 影响范围与严重程度(按选项):A/B/C 均不涉及终端用户,只影响跑测试的开发机;差异在残留暴露面——A:无残留(守卫兜底+全入口);B:e2e script 入口仍裸奔、无守卫兜底;C:双预载互相打架、观测变量指向失效根。
  4. 怎么修(推荐 A):以 [PR] fix: keep test suite off the production sessions dir (#5107) #5120 为主体合并;随后一个 follow-up 小 PR 把 ①②③ 吸收进去(或你指示先吸收再合);[PR] test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) #5119/[PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115 退役。
  5. 回归风险(按选项):A:[PR] fix: keep test suite off the production sessions dir (#5107) #5120 自身披露的两项行为变更(ambient 数据根重定向、守卫误报场景=同机活实例并发开新会话)是唯一行为面,已有逃生口 BILI_TEST_LEAK_GUARD=0;吸收 ①②③ ≈ 纯测试基建加法,风险近零。B:丢验收项 + e2e 残留洞。C:env 变量双写竞争,维护成本翻倍。
  6. 是否破坏缓存:均否——三个选项产品侧零改动(src/ 未动)。
  7. 是否改设计方向:无架构转向;都是把既有预载链职责从「钉 storage 模式」扩为「+沙箱数据根」;A 额外新增套件级泄漏断言(新机制但在测试基建边界内)。
  8. 是否引入新配置:A 引入 BILI_TEST_LEAK_GUARD(test-infra 逃生口,unset=启用);吸收项引入 BILI_TEST_XDG_ROOT(同类,产品代码不读)——均已/将按 reference/env-vars.md 纪律文档化,不进产品配置面。

选项对比:A(推荐)= #5120 主体 + 吸收 #5119 的 ①②③,退役 #5119/#5115;B = 合 #5119,#5120 的守卫与 e2e 接线作废(#5107 验收项落空);C = 都合(预载冲突,不建议);D = 全部 hold(污染持续累积)。

我的建议:A。所有关闭动作等你一句话——我不自行关闭任何条目。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

局势更新(取代我此前的选项建议):裁决期间 #5115 已合入 master(9628bb5,08:28Z)——止血版先行落地。我已按 9628bb5 逐项核对它实际带来的内容:

master 现已覆盖:预载 ||= 沙箱(DATA/STATE/CACHE 三目录 → per-run bili-test-dirs-* 临时根)、契约测试、live-files CI tripwire、reference/testing.md。
剩余缺口(均已在本地验证):
① XDG_CONFIG_HOME 未进沙箱(#5115 明确不动)→ 未钉 config 的测试仍读开发者 live config,跨机器不确定;
② 泄漏守卫缺失(#5107 的硬性验收项「补一条断言」);
③ 三个 test:e2e* npm script 仍裸跑(codex e2e 家族正是原始污染树的主源);
④ AGENTS.md §1/§3/§7.2 + UNIFIED_LOOP_SPEC 的 targeted-run 规范式仍是裸 node --import tsx --test …——#5115 合并后裸跑同时跳过 storage 基线与目录沙箱,每个照 AGENTS.md 执行的后续会话都会踩这个过期配方,文档与现实脱节在扩大。

#5120 对照(open,base 仍是旧的 885b948):文件清单已核——覆盖 ①②③(无条件重定向四个根 + BILI_SESSIONS_DIR/BILI_CONFIG_FILE、守卫、e2e 接线),不覆盖 ④(不碰 AGENTS.md/UNIFIED_LOOP_SPEC),也不碰 preload-storage-baseline.mjs(与 #5115 的内联沙箱共存;||= 语义保证不互覆,加载顺序收敛性需在其 review 中复核)。#5120 合并前需 rebase 到 9628bb5 + 一次完整 diff review(尚未做过,我可以在出站恢复后补)。

对本 PR 的影响:我的 rebase head 若推出,会与 #5115 的内联代码对同一组 env var 双重沙箱——冲突的重复机制,因此不再推送(更正我之前「网络恢复即推」的说法)。本 PR 的独有贡献现在只剩:④ 文档(修法已备好,四处改动)与 BILI_TEST_XDG_ROOT 观测(可选,#5115 的临时根可用 bili-test-dirs-* glob 定位,价值有限)。

已执行动作:本 PR 打 duplicate 标签;本地清理完毕;未推送任何新 head。

八问(决策请求)

  1. 是什么问题:同一缺陷的三条并行修复线已收敛其一([PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115 止血先合),待决的是残留缺口 ①–④ 的归属与两个在途条目的退役方式。
  2. 什么原因导致:根因相同(runner 入口无数据根沙箱);三个会话在重叠时间窗各自接单实现,止血优先的合入又先到一步。
  3. 影响范围与严重程度:终端用户不受影响;开发机 data/state/cache 污染已止住,残留 = ①config 读取洞 + ②无守卫兜底 + ③e2e 入口暴露 + ④文档脱节(影响面是全体后续 agent 会话)。严重度随止血下修:p2→p3。
  4. 怎么修(推荐 A):[PR] fix: keep test suite off the production sessions dir (#5107) #5120 rebase + 完整 review 后合并(覆盖 ①②③);④ 文档小修二选一——并入 [PR] fix: keep test suite off the production sessions dir (#5107) #5120 分支(一个闭环)或独立小 follow-up PR;本 PR 退役。
  5. 回归风险:A = [PR] fix: keep test suite off the production sessions dir (#5107) #5120 自身披露的行为面(ambient 数据根重定向、守卫误报场景、有逃生口)+ 双预载共存顺序复核(review 内做);④ 文档 ≈ 零风险。B = 只留 [PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115 止血,②③ 验收项长期悬空。C = 保活本 PR = 双机制打架,不建议。
  6. 是否破坏缓存:所有选项均否(产品侧零改动)。
  7. 是否改设计方向:无——预载链职责扩展;A 新增套件级泄漏断言(测试基建边界内)。
  8. 是否引入新配置:A 带 BILI_TEST_LEAK_GUARD(test-infra 逃生口,已文档化);我这边无新增。

选项:A(推荐)= #5120 rebase+review+合并 + ④ 文档修入(并入或独立,你选)+ 退役本 PR;B = 只留止血,放弃守卫/e2e;C = 保活本 PR 与 #5120 竞争语义。

等你一句话:A/B/C + 本 PR 关闭确认。选 A 的话我立即执行 ④ 文档修(四处改动的 diff 已在我手上)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 重复 #5115(已合入 master 9628bb5)——沿用 floor 3/6/7 的结论:同症状同机制,#5115 止血版先合,本 PR 已打 duplicate;独有剩余贡献只剩 ① targeted-run 文档规范式更新(AGENTS.md §1/§3/§7.2 + UNIFIED_LOOP_SPEC,四处)与 ② BILI_TEST_XDG_ROOT 观测变量。

本轮冲突处理(attempt 1/2):非机械冲突,不硬救。

查证结果:

已执行动作:按 owner policy 2026-10-25(禁止静默等待),把 floor 7 的 A/B/C 选项升级为可跟踪的 p1 决策项 → decision request #5126(p1、scope/ci):A(推荐)= 以 #5120 为主体(rebase + 完整 diff review + 合并,覆盖 CONFIG 洞 / 泄漏守卫 / e2e 入口)+ 本 PR 文档修并入或独立小 follow-up + 退役本 PR;B = 只留 #5115 止血(#5107 验收项悬空);C = 双预载保活竞争(不建议)。未推送新 head,未关闭任何条目(关闭权在你)。

八问

  1. 是什么问题:本 PR 与 master 冲突,冲突实质是同一缺陷的两套沙箱机制在同一 preload 文件打架——留哪套尚未拍板。
  2. 什么原因导致:三个会话在重叠时间窗各自接单实现(Running the test suite locally writes test sessions into the production sessions directory. | 本地跑测试套件会把测试会话写进生产 sessions 目录 #5107→[PR] fix: keep test suite off the production sessions dir (#5107) #5120、[bug][plugin] hermes native lane never routes a plain-http provider base_url (only HTTPS_PROXY is set) #5116→本 PR、另有 [PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115);[PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115 止血先合后,本 PR 的任何 rebase 必与其内联代码相撞。
  3. 影响范围与严重程度:终端用户零影响(纯测试基建,src/ 未动);开发机 data/state/cache 污染已被 [PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115 止住,残留 = CONFIG 读取洞 + 无守卫兜底 + e2e 入口裸奔(待裁决收敛)。严重度随止血下修:p2→p3。
  4. 怎么修的(本轮动作):不做机械解冲、不引入双重沙箱 head;把收敛决策升级立项([PR] fix(#5122): degrade fork adoption when zero fold state inherited #5126)等拍板,拍板后按所选选项执行。
  5. 是否有回归问题:无——本轮只做了状态核对、rebase 演练(已 abort 还原)与决策升级,未改任何代码与行为,master 既有行为(止血沙箱、storage 基线)未触碰。
  6. 是否破坏缓存:不涉及(产品侧零改动)。
  7. 是否改了设计方向:无——三线都是预载链职责扩展,方向已收敛为「runner 入口数据根沙箱」,剩实现主体选择。
  8. 是否引入了新的配置:本轮无新增;选项涉及的 BILI_TEST_LEAK_GUARD(A,[PR] fix: keep test suite off the production sessions dir (#5107) #5120 披露)与 BILI_TEST_XDG_ROOT(吸收项②)均为 test-infra 逃生口/观测变量,按 reference/env-vars.md 纪律文档化,不进产品配置面。

判定:本轮冲突处理到此为止——不推、不关;决策项 #5126 等你 A/B/C 拍板(含本 PR 关闭确认)。拍板后我立即按所选选项执行。

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b)

Merge-guard outcome: stopped before pushing — this conflict needs an owner design decision, not a mechanical merge.

Merging origin/master into this branch conflicts in tests/preload-storage-baseline.mjs, reference/testing.md, and reference/env-vars.md. The core conflict is NOT stale-base drift: master independently shipped two overlapping XDG test-sandbox fixes while this PR was in flight — #5082 (f53028c6e, an inline 3-dir block in this very preload) and #5107 (tests/preload-test-env.mjs, an unconditional 4-dir layer loaded last in the full-suite chain). Resolving the conflict therefore forces choosing which of three competing mechanisms is canonical, whether to delete already-merged code, and whether to ship the new BILI_TEST_XDG_ROOT env var.

Opened decision request #5194 (p1) with options A/B/C plus a recommendation (Option B: adopt this PR\u0027s 4-dir module as the bare-run layer, keep #5107 for the full suite, drop the now-redundant #5082 inline block). Holding this PR until that is decided — no push made.

@ranxianglei

Copy link
Copy Markdown
Owner Author

(ai: vllm-qwen/qwen3.8-27b)

Merge-guard re-trigger: still held, no push. Updated decision request #5194 — both competing PRs (#5115, #5120) have since merged to master (44067a5bc), so the only open item is what to do with this PR: keep-&-rebase for bare-run XDG_CONFIG_HOME coverage + BILI_TEST_XDG_ROOT, or close as superseded. Waiting on owner call in #5194.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

5 similar comments
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)

PR #5119's conflict is not mechanical — it needs your call on which XDG test-sandbox mechanism is canonical. I re-verified everything live this run before touching anything: no push made, branch left at eb30668, working tree clean.

What's new this run:

The core conflict (one axis drives all 5 files):

Options:

Recommendation: A (consistent with every prior analysis; the bare-run CONFIG gap is real).
Default if undecided: HOLD — I will not unilaterally supplant merged code or ship a new knob, and I can't close the PR. Branch stays at eb30668 until you pick A/B/C (plus close confirmation for B/C).


八问(本轮 CI 处置)

  1. 是什么问题:PR [PR] test: sandbox XDG base dirs in the suite preload so bare runs stop writing real $HOME (#5116) #5119 与 master 冲突;冲突核心是同一 XDG 测试沙箱缺陷的三套机制([PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115 内联三目录 / [PR] fix: keep test suite off the production sessions dir (#5107) #5120 全量四目录+泄漏守卫 / 本 PR 四目录模块)在同一 preload 文件正面相撞,留哪套需 owner 拍板。
  2. 什么原因导致:三个会话在重叠时间窗各自实现(Running the test suite locally writes test sessions into the production sessions directory. | 本地跑测试套件会把测试会话写进生产 sessions 目录 #5107→[PR] fix: keep test suite off the production sessions dir (#5107) #5120、Running tests locally writes test sessions into the real ~/.local/billion-context (polluting the production index.db | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context(污染生产 index.db 和 sessions 目录) #5114→[PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115、[bug][plugin] hermes native lane never routes a plain-http provider base_url (only HTTPS_PROXY is set) #5116→本 PR);[PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115/[PR] fix: keep test suite off the production sessions dir (#5107) #5120 已先后合入,本 PR 任何 rebase 必与其内联代码相撞;决策项 decision request: reconcile three overlapping XDG test-sandbox layers blocking PR #5119 #5194 已被关闭但线程内无 owner 明确二选一记录。
  3. 影响范围与严重程度:纯测试基建(src/ 未动),终端用户零影响;开发机 data/state/cache 污染已被 [PR] Running tests locally writes test sessions into the real ~/.local/billion-context — preload sandboxes the default direct | 本地跑测试会把测试会话写进真实的 ~/.local/billion-context——预载把默认目录沙箱化(Fixes #5114) #5115 止住,残留 = 裸跑仍可读开发者 live config(XDG_CONFIG_HOME 缺口)。严重度 p3(卫生瑕疵,有绕行)。
  4. 怎么修的(本轮动作):不做机械解冲。实况复核——master 已前进至 c26c31a,重跑 trial merge 确认冲突仍是同一非机械机制选择(非 stale drift);发现 decision request: reconcile three overlapping XDG test-sandbox layers blocking PR #5119 #5194 已关闭且无明确结论;据此在本线程升级 🔶 需要决策(列 A/B/C+推荐+默认),不另开 issue。
  5. 是否有回归问题:无——本轮只读不改,未推任何 head,master 既有行为(止血沙箱 / storage 基线 / 泄漏守卫)零触碰;工作树已还原干净。
  6. 是否破坏缓存:不涉及(产品侧零改动)。
  7. 是否改了设计方向:无——方向早已收敛为「runner 入口数据根沙箱」,剩实现主体选择。
  8. 是否引入新配置:本轮无新增;选项 A 涉及 BILI_TEST_XDG_ROOT(test-infra 观测变量,产品代码不读,按 env-vars.md 纪律文档化,不进产品配置面)。

判定:本轮到此为止——不推、不关、不立项;等你在 A/B/C 里拍板(含本 PR 关闭确认)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

🔶 需要决策
(ai: vllm-qwen/qwen3.8-27b)

No change since my 🔶 需要决策 above — still holding for your A/B/C call. Re-verified live this run:

The conflict is still the same non-mechanical mechanism choice (PR's 4-dir sandboxXdgEnv() module vs #5115's inline 3-dir block in tests/preload-storage-baseline.mjs) — nothing to fix on the auto-fix lane. This run: no push, no close, no new issue. Awaiting your pick (A keep-&-rebase / B close-as-superseded / C docs-only salvage). If nothing changes I'll keep further re-fires to a one-line status rather than re-posting the full analysis.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Status — PR #5119 CI lane (attempt 1/3), holding on a decision. (ai: vllm-qwen/qwen3.8-27b)

What I did this run:

Current state: blocked awaiting your A/B/C — nothing to fix mechanically on the auto-fix lane. This run: no push, no close, no new issue. Once you pick, I'll execute (A = rebase resolving toward the 4-dir module + union the docs, force-push; B/C = report only, you close). Live re-check moments ago confirms still no owner decision posted after my escalation.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Still holding — no owner decision yet. (ai: vllm-qwen/qwen3.8-27b)

Re-verified live this run:

No push, no close, no new issue. Awaiting your call: A keep-&-rebase (adopt the 4-dir module, supplant #5115, ship BILI_TEST_XDG_ROOT) / B close-as-superseded / C docs-only salvage. I'll keep these re-fire updates to a short status line until the state actually changes.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

1 similar comment
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Still blocked on your A/B/C call — a full day with no decision yet. (ai: vllm-qwen/qwen3.8-27b)

Re-verified live this run:

The conflict stays a design decision, not a mechanical fix: PR's 4-dir sandboxXdgEnv() module + new BILI_TEST_XDG_ROOT knob vs #5115's merged inline 3-dir block. Picking either supplants merged code or ships a new config surface → needs your ok.

Need your pick: A keep-&-rebase (adopt 4-dir, supplant #5115, ship the knob) / B close-as-superseded / C docs-only salvage. I'll act immediately on whichever you choose. No push, no close, no new issue meanwhile.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

1 similar comment
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Still blocked on your A/B/C call — two days, no decision yet. (ai: vllm-qwen/qwen3.8-27b)

Re-verified live this run:

The conflict is a design decision, not a mechanical fix: PR's 4-dir sandboxXdgEnv() module + new BILI_TEST_XDG_ROOT knob vs #5115's merged inline 3-dir block. Picking either supplants merged code or ships a new env surface → needs your ok.

Need your pick: A keep-&-rebase (adopt 4-dir, supplant #5115, ship the knob) / B close-as-superseded / C docs-only salvage. I'll act immediately on whichever you choose. No push, no close, no new issue meanwhile.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Still blocked on your A/B/C call — three days, no decision yet. (ai: vllm-qwen/qwen3.8-27b)

Re-verified live this run:

The conflict is a design decision, not a mechanical fix: PR's 4-dir sandboxXdgEnv() module + new BILI_TEST_XDG_ROOT knob vs #5115's merged inline 3-dir block. Picking either supplants merged code or ships a new env surface → needs your ok.

Need your pick: A keep-&-rebase (adopt 4-dir, supplant #5115, ship the knob) / B close-as-superseded / C docs-only salvage. I'll act immediately on whichever you choose. No push, no close, no new issue meanwhile.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master 301e1a5459a7, no decision posted). Holding; I'll act the moment you pick.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

2 similar comments
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master a259e0b8fabf, no decision posted). Holding.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master 548e396022b9, no decision posted, needs-decision label in place). Holding.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

2 similar comments
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master a446a3c1c817, no decision posted, needs-decision label in place). Holding.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master 6453feeeb842, no decision posted, needs-decision label in place). Holding.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master 6453feeeb842, no decision posted, needs-decision label in place). Holding.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

1 similar comment
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master b10c1a0d4ee5, no decision posted, needs-decision label in place). Holding.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 No change — still blocked on your A/B/C (PR open / non-mergeable at eb30668, master 0a133d91463b, no decision posted, needs-decision label in place). Holding.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[ework] CI fix verified green ✓

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working duplicate This issue or pull request already exists needs-decision p2 scope/ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug][plugin] hermes native lane never routes a plain-http provider base_url (only HTTPS_PROXY is set)

1 participant