Skip to content

fix: register issue2752 suite in CI LIVE_FILES tripwire - #2900

Closed
ranxianglei wants to merge 1 commit into
masterfrom
2026-10-12_ci-tripwire-register-2752
Closed

ranxianglei wants to merge 1 commit into
masterfrom
2026-10-12_ci-tripwire-register-2752

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

One-line registration: tests/issue2752-forward-partial-outcome.test.ts added to LIVE_FILES in scripts/run-ci-tests.mjs.

Why

The tripwire introduced with the two-phase CI scheduler (c2914c3, #2816) requires every process-spawning suite to be registered in LIVE_FILES. The suite from #2752 (c81be81) spawns the MCP shim over stdio (spawn(process.execPath, ["--import", "tsx", "src/mcp.ts"], …)) so it matches SPAWN_RE, but was never registered — on master c60c2d1 the guard therefore exits 1 before any test runs, killing all four test legs (ubuntu/windows × node 22/24). Every PR merged onto that tree goes red for no reason of its own (instance: #2893).

Concurrency review (required by the tripwire contract, #1248)

  • All HTTP servers in the suite bind listen(0) → unique ephemeral ports per process; no fixed-port contention (the fix: emit /acp panel as persistent custom message and strip it from the proxy model context (#359) #360 discipline).
  • The single child spawn receives its own env copy with BILI_MCP_PROXY pinned to its own canned loopback origin — no cross-test or cross-file env leakage (each test file is already a separate process under node --test).
  • src/mcp.ts is stdio-only: no listen port, no state/cache/config-dir writes, and with BILI_MCP_PROXY explicitly set it never touches the shared live-instance record.
  • Parent-process env save/restore (MCP-shim describe block) is confined to this file's process and restored in afterEach; node:test runs tests within a file serially by default.

Conclusion: the suite legitimately needs its spawn (it is the wire-level lane — the real shim over stdio JSON-RPC), and it is safe at c=4. Register, don't de-spawn.

Verification

  • Tripwire guard logic replicated against the fixed tree: 33 LIVE_FILES entries, 622 test files, zero missing entries, zero unregistered spawners.
  • Directed run of the registered suite alone: node --import tsx --test tests/issue2752-forward-partial-outcome.test.ts → 22 tests / 4 suites, all pass (~8s), after the same npm run pretest build CI performs first.

No behavior change beyond re-enabling the CI gate: same tests, same assertions, same scheduler — the guard now passes instead of dying. Existing red PRs need no code change; re-run/rebase turns them green.

Closes #2899

tests/issue2752-forward-partial-outcome.test.ts (c81be81, #2752) matches
SPAWN_RE (it spawns the MCP shim over stdio) but was never registered in
LIVE_FILES when the two-phase scheduler landed (c2914c3, #2816), so the
tripwire dies every test leg before any test runs on master c60c2d1 (#2899).

Concurrency review per the tripwire contract (#1248): all HTTP servers bind
listen(0) ephemeral ports; the single child spawn receives its own env copy
with BILI_MCP_PROXY pinned to its own canned loopback origin; src/mcp.ts is
stdio-only (no listen port, no state/cache/config writes); parent-env save/
restore stays inside this file's process. Safe at c=4.
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-12_ci-tripwire-register-2752 (fc06624)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.3221-pr.2900.d64d60e

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

Option B — Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

Duplicate of #2898 — byte-identical one-line registration (tests/issue2752-forward-partial-outcome.test.ts in LIVE_FILES), opened 6 minutes earlier by an external contributor and already fully green in CI (all four test legs ubuntu/windows × node 22/24 + every static gate).

Per repo policy an external contribution is not replaced by an agent-owned PR — #2898 stays the merge vehicle; this one closes as its duplicate.

Independently verified before closing:

  • Tripwire guard replicated against the fixed tree: 33 LIVE_FILES entries / 622 test files, zero missing entries, zero unregistered spawners.
  • Concurrency claims spot-checked in tests/issue2752-forward-partial-outcome.test.ts: only server.listen(0, "127.0.0.1") (:45, :283); the child spawn takes an explicit env copy with BILI_MCP_PROXY pinned to the test's own origin (:443); parent-process env save/restore in before/after hooks (:167–172). Register, don't de-spawn — confirmed.

Issue lifecycle: #2896 auto-closes via #2898's reference; Closes #2899 has been appended to #2898's description so both reports of this single mechanism close atomically when #2898 merges.

@ranxianglei ranxianglei added the duplicate This issue or pull request already exists label Oct 12, 2026
@ranxianglei
ranxianglei deleted the 2026-10-12_ci-tripwire-register-2752 branch October 12, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: run-ci-tests.mjs LIVE_FILES tripwire kills every test leg — tests/issue2752-forward-partial-outcome.test.ts never registered (#1248)

1 participant