Repository navigation
test: gate claude-native live e2e subtests behind ACP_TEST_CLAUDE_NATIVE (#1248) - #1253
Conversation
… is already gone (#1248) Run B's exact failure signature: the unguarded process.kill(claude.pid) in the finally block throws ESRCH when the spawned fake claude has already exited (e.g. OOM-killed mid-test on a loaded shared box), failing the test even though every assertion passed. Wrap it like the adjacent leaf-kill.
…IVE (#1248) The 7 process-spawning subtests in tests/claude-native.test.ts (live ps-walk, hook e2e x3, watchdog tracker, watcher route, shared-proxy survival) hang or fail non-deterministically on loaded shared multi-agent sandboxes while every pure test stays green — Run C's failing set {24,37-42} is exactly this set, reproduced again in this sandbox ({24,40,42}). Gate them opt-in behind ACP_TEST_CLAUDE_NATIVE=1, same pattern as ACP_TEST_E2E for the codex suite: local npm test skips them by default (fast deterministic signal); ci.yml + both release workflows set the var so dedicated runners keep running them unchanged.
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1253Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1253.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Review started — this is a [PR] issue, so I'm reviewing rather than re-doing the work. Pulling the branch, checking base freshness vs master, walking the diff, checking CI, and doing targeted local verification of the gate behavior. Full conclusion in a follow-up comment. |
[bot] 🏷 Review complete — mergeable. (Reviewed on head Base freshness: rebased onto current master ( ① Direction (vs #1248): the fix hits the right layer. Root cause is environmental — 7 process-spawning subtests observing real ② Regression review — existing behaviors inventoried:
③ Code review: minimal (+37/−8, 4 files), follows the established ④ Verification performed: CI on this head is all green (ubuntu 24/22 + windows 24/22 tests, e2e lanes, version-guard, artifact). Locally I reproduced both gate states: off → the exact expected skip profile above; on → the live ps-walk test actually executes and fails here with Gate verdict: touches release-workflow files + a disclosed local-default change → human merge per §7.4. Nothing blocking. 中文摘要:审查了 #1248 的修复 PR——把 claude-native 文件里 7 个真实起进程的子测试(与 Run C 失败集一一对应,已逐处核对 spawn 点无遗漏)放到 |
What & why
#1248: in shared multi-agent sandboxes,
npm testhangs >25 min or fails non-deterministically insidetests/claude-native.test.ts, while every pure subtest stays green. Verified here: Run C's failing set {24,37,38,39,40,41,42} is exactly the file's 7 process-spawning subtests (live ps-walk, hook e2e ×3, watchdog tracker, watcher route, shared-proxy survival) — they spawn real proxies/processes and observe real/proc,psoutput and network ports, which concurrent load makes unreliable.Gate that exact set behind an opt-in env var, same pattern as
ACP_TEST_E2E(codex suite):tests/claude-native.test.ts: singleLIVE_E2Eflag (ACP_TEST_CLAUDE_NATIVE === "1") + per-testskip:reasons; platform-only conditions preserved when the gate is open..github/workflows/ci.yml,release.yml,release-manual.yml: setACP_TEST_CLAUDE_NATIVE: "1"on theirnpm teststeps so dedicated runners keep running all 7 unchanged.Behavior change (disclosed)
Local
npm testdefault: the 7 claude-native live subtests now skip instead of running (old: always ran — on loaded shared boxes that meant 25+ min hangs or random failures unrelated to the diff under review). New default keeps them off for a fast deterministic signal; opt back in withACP_TEST_CLAUDE_NATIVE=1. CI/release-gate coverage is unchanged (env set there).Verification (rebased head, this sandbox = the flaky environment itself)
node --import tsx --test tests/*.test.ts→ 2440 tests, 2431 pass, 0 fail, 9 skipped (7 new gate-skips with reasons + 2 pre-existing win32 skips), ~170s, exit 0.npm run typecheck✅ ·npm run build✅ (run after rebase onto current master incl. fix: break logger EPIPE feedback loop — async stderr error re-enters uncaughtException (#1233) #1240).Incidental fix (separate commit, labeled)
test: claude-native live ps-walk — survive ESRCH when the fake claude is already gone: the unguardedprocess.kill(claude.pid)in the finally block threwkill ESRCH(Run B's exact error signature) when the spawned fake claude had already exited (e.g. OOM-killed mid-test under load), failing the test even though every assertion had passed. Wrapped like the adjacent leaf-kill.Closes #1248