Repository navigation
test: guard log-mask #255 dead-upstream ports with holder+assertPortDead (#2889) - #2890
Merged
ranxianglei merged 3 commits intoOct 12, 2026
Merged
Conversation
Owner
|
依然红 |
…2816) tests/issue2752-forward-partial-outcome.test.ts (added by c81be81, merged via ranxianglei#2782) spawns the real MCP shim over stdio but was never registered in the ranxianglei#2816 tripwire, so every test job died at startup before running a single test since 467b0f6. Concurrency review for c=4: all HTTP servers bind listen(0) dynamic ports; the spawned shim is killed in afterEach; BILI_MCP_PROXY/BILI_CONVERSATION_ID are passed in the child env at spawn time; src/mcp.ts itself binds no port and writes no state. Registered after review per the tripwire contract.
This was referenced Oct 12, 2026
Contributor
Author
3 tasks
Owner
红已转绿。结论先行:这个 PR 的红不是你的改动造成的——是 master 侧 CI 基础设施自 按八问:
你原本的改动状态:log-mask 的动态 dead-port(holder + assertPortDead)在四个 leg 上全部通过——含 Windows,说明 #2889 的修法跨平台成立,无需再动。 CI 现态: |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.320-master.66e5658 # this exact build
npm install -g billion-context@master # always the newest merged build
|
YunzhouLi-hub
pushed a commit
to YunzhouLi-hub/billion-context
that referenced
this pull request
Oct 12, 2026
… load (ranxianglei#2908) ranxianglei#2816's c=4 concurrent test scheduling raised per-runner load so a transient Windows AV/indexer lock on sessions/index.db can outlast the old ~3.2s rmrf window (win-latest leg of PR ranxianglei#2890: EBUSY unlink index.db). A probe confirmed the golden harness holds no self-handle at rmrf time (flushAllSessions closes the store's shadow first), so this re-sizes the external-lock budget rather than masking an in-process leak. Ladder 25..1600ms (~3.2s/8 attempts) -> 25..3200ms (~7.6s/10 attempts); only paid when a race actually happens.
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.
Closes #2889
什么问题
tests/log-mask.test.ts的proxy error log: connection failure to non-public upstream leaks nothing (#255)用例(:386 起)把路由硬编码到http://127.0.0.1:59999,依赖"该端口无人监听 → 连接拒绝 → 代理回 502"这一前提;websocket upgrade required用例(:539 起)同样硬编码 59999。#2878 的 windows-24 腿实测:并行进程短暂占用 59999 → fetch 建连成功、对端回 403 → 断言假红(run 38218031665 / job 114707404422)。与 #1689(同用例拿到 200)同族,是 #2548 动态端口改造的漏网点(当时只改了 MITM 隧道用例)。怎么修的
复用同文件 MITM 用例已确立、#2548 引入的 holder+assertPortDead 模式:
http.createServerholder 监听随机端口,取deadPort后关闭 holder;deadPort;await assertPortDead(deadPort)(拨号瞬间证明端口确死,占领者会把预期拒绝变成 403/200);文件内已无 59999 硬编码(grep 仅剩注释)。
回归
tests/log-mask.test.ts19/19 pass;Windows 本地连跑 3 次全绿(共 4 绿);行为变更
无产品行为变更。测试可观测差异:两用例的上游死端口从固定 59999 变为每次运行随机分配,泄漏断言随端口动态化。