Skip to content

[PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) - #4606

Open
Zhishulo wants to merge 4 commits into
ranxianglei:masterfrom
Zhishulo:2026-10-25_unbreak-master-ci-gates
Open

Zhishulo wants to merge 4 commits into
ranxianglei:masterfrom
Zhishulo:2026-10-25_unbreak-master-ci-gates

Conversation

@Zhishulo

@Zhishulo Zhishulo commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #4602
Fixes #4604

master head 146b34f27 目前有四条常红,任何 PR 都继承,PR 的检查矩阵因此长期没有信号。本 PR 一次把四条都修掉,四个改动各自独立、各一个提交,可分开审。(前两条为原开;后两条由 #4599 哨兵 lanes 接力补上。)

提交 1 —— unused-exports 红(Fixes #4602)

src/agent/client-build-note.ts:32 的 export type ClientBuildCheck 是全仓唯一的 INTERNAL_ONLY 命中:类型只在本文件 5 处使用(32/45/81/93/115),src/agent/dsh-native.ts:55 与 tests/client-build-note.test.ts:13 只导入值与函数;tsconfig.json 是 noEmit: true、tsup.config.ts 无 dts、package.json 无 types field ⇒ 没有任何对外 d.ts surface 依赖这个导出。

-export type ClientBuildCheck = {
+type ClientBuildCheck = {

提交 2 —— test 矩阵 11/11 全红(Fixes #4604)

tests/issue3890-parent-gone-confirm-drain.test.ts(69f3a2294 / #3890 引入)在 :98 起子进程,命中 scripts/run-ci-tests.mjs:103 的 SPAWN_RE,但不在 scripts/live-files.mjs 的 LIVE_FILES 表里 ⇒ tripwire 直接让每个分片在跑测试之前就 ##[error] 退出:

##[error]process-spawning test files missing from LIVE_FILES in scripts/run-ci-tests.mjs: tests/issue3890-parent-gone-confirm-drain.test.ts. Register them there after reviewing their concurrency assumptions (#1248).
     "tests/issue-split-brain-surface.test.ts",
+    // #3890: spawns the drain fixture; that fixture is listen(0) and reports
+    // READY <port>, so no zone band is needed — the entry is for the tripwire
+    "tests/issue3890-parent-gone-confirm-drain.test.ts",
 ];

为什么追加在表尾而不是字母序位置:scripts/live-files.mjs:53-54 自己写明 slot = index 决定每个文件的 zone 端口带,「mid-list inserts renumber every later band」⇒ 只能 append。

为什么这条其实不需要 zone band:fixture tests/fixtures/issue3890-drain-bili.mts:11 是 port: 0,:34-36 打印 READY <port>,测试 :108-114 读端口、:119 连回 ⇒ 端口 ephemeral、天然并发安全,登记只为满足 tripwire。

本地验证

npx tsc -p kernel\tsconfig.json   → KERNEL_EXIT=0
npx tsc --noEmit -p tsconfig.json → TSC_EXIT=0

用 run-ci-tests.mjs 同一段判定逻辑复算(读 tests/*.test.ts 套 SPAWN_RE 再与 LIVE_FILES 比对):

# before
test files: 939 | spawning: 48 | LIVE_FILES: 48
MISSING: tests/issue3890-parent-gone-confirm-drain.test.ts

# after
test files: 939 | spawning: 48 | LIVE_FILES: 49
MISSING: (none)  /  entries that do not exist: (none)

与已开的 #4603 / #4605 的关系

这两条之前已按单条分别提过:

问题是它们互为前提:#4603 的 11 个 test 分片会红在 #4605 那条,#4605 的 unused-exports 会红在 #4603 那条 —— 分开合的话,先合的那一个自身拿不到全绿。本 PR 把两者放进同一条分支,一次合并即让 master 的两条常红同时消失。

若你更愿意分开合,直接合 #4603 + #4605 也等价(代码逐字节相同);这两个单条 PR 我可以按你的意思关掉。

提交 3 —— generation-boundary born-red(潜伏,任何 PR head 上必显形)

tier-5 train 给 injectSystem(src/server/inject.ts:12)追加第 9 参 generationBoundaryActive 后,tests/generation-boundary.test.ts:129 的「active」用例没跟上:末尾的 true 落进了 mcpDialectNote,generationBoundaryActive 恒为默认 false,note 永不出现,断言必挂。merge commit 上 test lane 被跳过所以 master 上不显形,任何 PR head 的 test 矩阵必红。

-    const on = injectSystem({ ...parsed }, OPTS, undefined, defaultConfig(400_000), undefined, true, false, true) as string;
+    const on = injectSystem({ ...parsed }, OPTS, undefined, defaultConfig(400_000), undefined, true, false, false, true) as string;

与 PR #4559 分支的 e82ccd7 逐字节相同——任一侧先合,rebase 时丢弃重复 commit 即可。

提交 4 —— deploy(GitHub Pages)止血(#4598 选项 1)

本仓库从未启用过 GitHub Pages(Pages 站点 API 404),pages.yml 自落地以来 75/75 次运行全红:actions/configure-pages@v5 报 Get Pages site failed ... Not Found。此前的 enablement: true 自动启用(#3189)曾被 revert 且无记录原因(#3191),此处不擅自恢复。按 #4598 推荐止血:去掉 push 触发、保留手动 workflow_dispatch——website push 不再让 master 红,部署路径原样保留。最终方向(重新启用 Pages / 退役 workflow / 转安装内服务出口)待 owner 拍板(已列在 #4599)。

行为变更披露(旧→新):触碰 website/** 或 pages.yml 的 push 不再触发 Pages deploy job(此前触发但必然失败);手动 dispatch 部署不变。

@ranxianglei ranxianglei changed the title fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) [PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) Oct 24, 2026
ci-check added 2 commits October 25, 2026 01:58
…ectSystem test (master born-red, ranxianglei#4599 sentinel)

The tier-5 train added generationBoundaryActive as injectSystem's 9th parameter
and updated every caller except this test's 'active' case: its trailing true
landed in mcpDialectNote, so the note never appeared and the assertion must fail.
Identical one-line fix already committed on PR ranxianglei#4559's branch (e82ccd7); drop
that commit when rebasing whichever way merges first.
…s site (ranxianglei#4598, ranxianglei#4599 sentinel)

pages.yml has failed 75/75 runs since landing: actions/configure-pages@v5 gets
'Get Pages site failed ... Not Found' because GitHub Pages was never enabled on
this repo (the earlier enablement:true attempt was reverted without a recorded
reason — not re-applied here). Stop-the-bleed per ranxianglei#4598 option 1: drop the push
trigger, keep manual workflow_dispatch so the deploy path stays intact and no
website push red-lines master again. Final direction (re-enable Pages vs retire
the workflow vs in-install serving) awaits owner decision.
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
…orn-red list)

The updates page kept its route/loadUpdates but the topbar anchor was
removed on master, leaving nav.updates unreferenced in both locales —
the #1024 dead-key gate fails on pristine master 146b34f. Removing
the two catalog entries is the mechanical fix named in the #4599
sentinel born-red inventory (not covered by #4606).
ranxianglei pushed a commit to z0d0dOr/billion-context that referenced this pull request Oct 24, 2026
…same one-word fix as ranxianglei#4606 commit 1; duplicate in-branch per CI-coordination precedent ranxianglei#4607/ranxianglei#4595/ranxianglei#4596, drop on rebase after ranxianglei#4606 merges)
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
…-exports gate

Inherited master red (tip 146b34f): the per-lane check shape is referenced
only inside client-build-note.ts (callers use DSH_BUILD_CHECK structurally).
Same one-line fix as PR #4606 commit 1 (#4599); drop this commit when
rebased onto post-#4606 master.
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
…ter-red (#4599)

master tip 146b34f is red on unused-exports for this exact finding (the #4545 train added this type-only export; the 4d34abf de-export sweep missed it). PR #4606 carries the canonical fix; per the few-line-fix coordination rule this branch carries the identical one-line de-export so its check matrix regains signal now. Drop this commit when rebasing onto master after #4606 merges.
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
…ot this PR's

master 146b34f fails the unused-exports gate on this exact line
(INTERNAL_ONLY src/agent/client-build-note.ts: ClientBuildCheck): the
type-only export #4545 introduced was missed by the 4d34abf de-export
sweep. This PR touches none of it — every PR rebased past that master
inherits the red (#4599 storm log). Same one-word fix as #4606 commit 1
and the in-branch precedents (#4607/#4595/#4540/#4618/#4622): drop the
leading export on a symbol referenced only within its own file. Drop
this commit when rebasing after #4606 merges.
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
Same one-word de-export as #4606 commit 1 (#4599 inventory item 1):
the type is used only inside client-build-note.ts. Duplicate fix kept
on-branch per storm precedent; drop this commit when rebasing after
#4606 merges.
ranxianglei pushed a commit to El1mir/billion-context that referenced this pull request Oct 24, 2026
Inherited unused-exports red from master tip (ranxianglei#4545 train left this
type-only declaration exported with zero external references). Same
one-line de-export as PR ranxianglei#4606; the type is referenced only within
this module.
ranxianglei pushed a commit to z0d0dOr/billion-context that referenced this pull request Oct 24, 2026
…ndary flag reaches injectSystem

Born-red inherited from base cd92b0b (ranxianglei#4305 landed after ranxianglei#4344 added the 8th
param but its test only passed 8 positional args, so the 'on' case's trailing
true bound to mcpDialectNote and generationBoundaryActive stayed false).
Byte-identical to ranxianglei#4606 commit 389b815 / ranxianglei#4559 e82ccd7; drop on the
post-ranxianglei#4606 rebase.
ranxianglei pushed a commit to z0d0dOr/billion-context that referenced this pull request Oct 24, 2026
…glei#4297 byte cap

dumpRejectedBody/dumpSummaryRejection capped the body at the full cap and then
prepended DUMP_PLAINTEXT_BANNER, so every dump file exceeded
BILI_DUMP_4XX_MAX_BYTES by the banner length (~89B; shards failed with
'0: 1111 bytes'). Reserve the banner bytes in both writers' budgets so the
FINAL file honors the cap, and update the four ranxianglei#4297 assertions ranxianglei#4482 left
stale (verbatim-no-banner expectation, direct JSON.parse of banner-prefixed
files, exact-boundary sizes computed without the banner).

Behavior change: dump files that previously overflowed the cap by up to one
banner line now fit under it; bodies in (cap-banner, cap] are now truncated
with the [truncated:] marker instead of overflowing. First-landing fix for
the error-dump family listed in ranxianglei#4599's sentinel born-red cluster (not part
of ranxianglei#4606).
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
…ted red)

Unused-exports gate fails on every PR head rebased onto master tip
146b34f with the same line master itself fails on:
INTERNAL_ONLY src/agent/client-build-note.ts: ClientBuildCheck
(#4545 train left the type exported though nothing outside the file
imports it; missed by the 4d34abf de-export sweep). One-word fix,
identical to #4606 commit 1; drop this commit when rebasing after
#4606 merges.
ranxianglei pushed a commit that referenced this pull request Oct 25, 2026
The master tip (146b34f) fails the unused-exports gate on this exact
line (INTERNAL_ONLY src/agent/client-build-note.ts: ClientBuildCheck);
every PR head inherits it until #4606 lands (#4599 inventory item 1).
One-word de-export, same method as #4606 commit 1; zero external
references (type is only used inside this file). Drop this commit on
rebase after #4606 merges.
ranxianglei pushed a commit that referenced this pull request Oct 25, 2026
…ed master red, #4599 盘点 item 1; same one-liner as #4606 c1 — discard this commit on rebase after #4606 lands)
ranxianglei pushed a commit that referenced this pull request Oct 25, 2026
dumpRejectedBody/dumpSummaryRejection capped the body at the full cap and then
prepended DUMP_PLAINTEXT_BANNER, so every dump file exceeded
BILI_DUMP_4XX_MAX_BYTES by the banner length (~89B; shards failed with
'0: 1111 bytes'). Reserve the banner bytes in both writers' budgets so the
FINAL file honors the cap, and update the four #4297 assertions #4482 left
stale (verbatim-no-banner expectation, direct JSON.parse of banner-prefixed
files, exact-boundary sizes computed without the banner).

Behavior change: dump files that previously overflowed the cap by up to one
banner line now fit under it; bodies in (cap-banner, cap] are now truncated
with the [truncated:] marker instead of overflowing. First-landing fix for
the error-dump family listed in #4599's sentinel born-red cluster (not part
of #4606).

(cherry picked from commit 952d80b)
@github-actions github-actions Bot mentioned this pull request Oct 27, 2026
ranxianglei pushed a commit to z0d0dOr/billion-context that referenced this pull request Oct 29, 2026
tests/issue4982-draining-twin-ladder.test.ts: both sides independently fixed ranxianglei#5050.
Ours (858cb70+47b54b36): socket error->destroy + close() wrapper + platform-branched shutdown.
Master (0a1f534+9bbf3165): /__bili/shutdown convergence (ranxianglei#3544) + peer-abort-safe squatter fixture.
Take master's canonical version (shipped in v0.1.209); our duplicate fix drops, same
precedent as the dropped ranxianglei#4606-duplicate unused-exports commit.

# Conflicts:
#	tests/issue4982-draining-twin-ladder.test.ts
@ranxianglei ranxianglei reopened this Oct 30, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 24, 1), test (windows-latest, 22, 2), test (ubuntu-latest, 22, 3), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 4), test (windows-latest, 22, 5), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 1), test (windows-latest, 22, 1), test (ubuntu-latest, 24, 3) — stopping for human review

2 similar comments
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 24, 1), test (windows-latest, 22, 2), test (ubuntu-latest, 22, 3), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 4), test (windows-latest, 22, 5), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 1), test (windows-latest, 22, 1), test (ubuntu-latest, 24, 3) — stopping for human review

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[ework] auto-fix stalled: test (ubuntu-latest, 24, 1), test (windows-latest, 22, 2), test (ubuntu-latest, 22, 3), test (ubuntu-latest, 24, 2), test (windows-latest, 22, 4), test (windows-latest, 22, 5), test (ubuntu-latest, 22, 2), test (ubuntu-latest, 22, 1), test (windows-latest, 22, 1), test (ubuntu-latest, 24, 3) — stopping for human review

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

None yet

Projects

None yet

2 participants