Skip to content

[PR] fix(ci): master-CI convergence lane — persistent ci-fixes branch (sentinel protocol 2026-10-25) - #4635

Merged
ranxianglei merged 8 commits into
masterfrom
ci-fixes
Oct 25, 2026
Merged

ranxianglei merged 8 commits into
masterfrom
ci-fixes

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What this is

Per the owner strategy (2026-10-25, announced in #4599): ci-fixes is the persistent convergence point for all master-CI fixes. This PR stays open across incidents; new master-red fixes land here as labeled commits and the branch re-syncs with master each round. Other agents merge ci-fixes into their own red PR branches — they do not carry ad-hoc copies of these fixes.

Fixes on the branch right now

Gate reds (cherry-picked from #4606, byte-identical):

  1. unused-exports gate (master red) — src/agent/client-build-note.ts: ClientBuildCheck was exported but only used inside its own file (INTERNAL_ONLY). Dropped the leading export. No external references exist (repo-wide grep; no dts surface). Closes fix(ci): master unused-exports is red — ClientBuildCheck is exported but only used inside its own file #4602.
  2. LIVE_FILES tripwire (kills every test shard pre-run on any PR head) — tests/issue3890-parent-gone-confirm-drain.test.ts spawns a child process but was never registered in scripts/live-files.mjs, so the SPAWN_RE tripwire in scripts/run-ci-tests.mjs failed all shards before any test ran. Registered it. Closes fix(ci): every test shard is red — tests/issue3890-parent-gone-confirm-drain.test.ts spawns processes but is missing from LIVE_FILES #4604.
  3. Born-red test: tests/generation-boundary.test.ts:129 — the train added a 9th positional param to injectSystem (generationBoundaryActive) and updated the single src caller but missed this test call site; the trailing true landed in mcpDialectNote, leaving the boundary flag false and the "on" assertion failing. One-line fix, byte-identical to the sibling fix already on [PR] fix(pi): inline mode now intercepts codex Responses WebSocket traffic (#4526) #4559.
  4. Pages deploy stop-the-bleed (master red) — .github/workflows/pages.yml: the repo has no GitHub Pages site enabled (API 404; 75/75 historical deploy runs red with Get Pages site failed ... Not Found), yet every push touching website/** triggered a doomed deploy. Removed the push trigger (kept manual workflow_dispatch); website/README.md updated to match. Final direction (re-enable / retire / in-install serving) is an open owner decision tracked in CI: pages deploy job red on every website push — GitHub Pages never enabled (#3189 auto-enablement was reverted) #4598/CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 — this commit deliberately does NOT restore enablement: true (it was previously reverted without a recorded reason).

Born-red test cluster (the ~35-test set that fails every full test shard run on any head against this master — invisible on master's face because heavy lanes skip on master events):

  1. tests/web-i18n.test.ts (Web UI 英文翻译开关(i18n)— 社区 PR #807 (@amirzamli) #1024 dead key) — 78046a55d: The favicon.ico request in the dsh settings panel is being routed into proxy forwarding (hitting upstream and returning | dsh 设置面板里的 favicon.ico 请求掉进代理转发(打到上游 403),面板静态资源路径应全部由管理面自答 #3536's topbar rewrite dropped the #/updates anchor while the Updates tab stayed routed, leaving the catalog key nav.updates dead. Restored the anchor in src/web/page.ts.
  2. tests/web-storage-diagnostics-redaction.test.ts ([security][web] Storage diagnostics publish raw log lines and absolute paths | 存储诊断公开报告泄露本地路径和未脱敏日志 #4427, windows shards only) — e59e02060: the home-path redactor keyed off os.homedir() alone; on Windows that is %USERPROFILE% while git-bash tool output carries $HOME paths, so /home/alice/... survived unredacted. src/log-mask.ts now masks the deduped set of homedir/HOME/USERPROFILE (longest-first, anchored-flank regex); POSIX output unchanged.
  3. Golden regen: tests/golden/storage-render/*.json — 12e77531f: see justification below.
  4. tests/snapshot-render-chain.test.ts ×6 + tests/verif-snapshot-render.test.ts replay — 177bbce32: #D5-5 changed buildView to load via store.unifiedMessageIdRows / store.unifiedUncoveredRows; the test fakes only had the old tail-view methods, so buildView threw internally, degraded silently (transcript-error), and every engine-render assertion failed. Brought both fakes up to the windowed-load interface (no production change).
  5. tests/error-dump.test.ts ×4 ([diagnostics] 4xx dump files exceed dump4xxMaxBytes after UTF-8 and JSON serialization #4297) — 995e642ae, cherry-picked from [PR] fix: route codex context-only prewarms to the probe relay via the upstream proxy #4595 (952d80b57): Opt-in raw dumps (ACP_DUMP_BODY) write conversation bodies to disk unmasked with no warning — real credentials landed on disk #4482's dump banner was prepended AFTER the byte cap, so final files exceeded BILI_DUMP_4XX_MAX_BYTES by the banner length (shards failed with 0: 1111 bytes) and exact-fit bodies lost byte-equality. The banner bytes are now reserved inside both writers' budgets; the four stale assertions updated to match.
  6. tests/issue3013-refusal-terminal.test.ts ×3 (born-red at birth commit 3d39ba6) — 6bf59b964: three regexes never matched the wording that same commit shipped (terminal for the session vs shipped unconditional and terminal (bili_final); allowDshCompaction absent from the storm log whose levers are fix(dsh): profile 层 patch 其实可以关掉 web profile 的原生自动压缩(#1772 结论修正)+ 一个会静默清空整个 preset 的写法坑 #2474 + Disable dsh auto-compaction; terminal; #3013 vs shipped (terminal, bili_final; #3013)). Assertions re-pinned to the shipped wording; each keeps its semantic teeth. No production change.
  7. tests/preflight-client-abort.test.ts ×1 (broken by 30ae218) — 6843789d8: auto-fold sharp edges: a sub-floor autoFoldTargetTokens causes a fold storm, and externalSummary.* file edits do not take effect until a PUT /__bili/config #3444 added AUTO_FOLD_MIN_BENEFIT_TOKENS=4096; the fixture's 10_000 baseline vs 8192 target left a 1808-token margin, so the growth trigger silently disarmed and preflight returned before logging anything (f.logs == []). Fixture baseline raised to 20_000 (margin 11_808) to re-arm the growth fold the test exists to cancel mid-flight. No production change.

Golden regeneration justification (AGENTS.md requires stated justification)

Regenerated tests/golden/storage-render/{openai,anthropic,responses,google}.json via node --import tsx scripts/update-storage-render-goldens.ts. The ONLY divergence on all four wires was one new state-map key: state-key divergence: refLedgerAligned=74234e98afe7498f (golden undefined) — the intentional one-time ledger-restamp flag from 380ef4d (#4316 layer 3, written in kernel/src/refs.ts, persisted in src/persist.ts, hydrated in src/state-hydration.ts). Diff of the regen = that key + the stateDigest/metadata-section digests that cover it; every wire-body digest is byte-identical, i.e. no outbound message content moved. The goldens pin state shape too, so they must absorb the new key or every full-mode restart comparison fails.

Behavior change disclosure

  • Pushes touching website/** or pages.yml no longer auto-deploy to GitHub Pages (they did before, always failing). Manual dispatch unchanged.
  • Log redaction now also masks $HOME/%USERPROFILE% paths in log output (previously only os.homedir(); on POSIX the values coincide, so no visible change there).
  • Dump files (error-dump lane) can be up to ~banner-length smaller than before when the cap binds; final files now honor BILI_DUMP_4XX_MAX_BYTES exactly as documented.
  • No config surface, wire, persistence-format, or kernel changes. All other commits are test-only.

Relation to #4606

#4606 carries the identical four gate commits and remains open but is superseded by this branch as the vehicle for the master-red incident. Owner may close #4606 once this merges (or sooner); merging both would conflict.

Refs #4599 (coordination hub), #4602, #4604, #4598.

提交 12-13(#4260 born-red 家族,dc86ca839 → b06b40862,净效果仅测试修正)

tests/epoch-confirm-lifecycle.test.ts all-missing shape 与 tests/issue2915-order-centric-reconcile.test.ts 升级恢复段在 594df72/a5d1994d1(#4260) 出生即红,此后 src/fold-reconcile.ts 该区域逐字节未变。dc86ca839 先给实现加了「零幸存不落锁」carve-out,随即发现它与 #3641 教义套件(fold-anchor-doctrine :213 total collapse 必须落锁 + preflight verbatim passthrough、fold-reconcile #2202 side-request)对同一输入类(零幸存、≥10 unmatched、proxy mode)钉了相反契约——真规格冲突,任何实现只能满足一边。b06b408 裁决:#3641 教义胜(MESSAGE-IDENTITY.md 明文、已绿跑数日、暂停在零幸存场景最必要——substrate 最大程度不可证,折叠不得在 foreign 字节上静默开新 epoch):src/fold-reconcile.ts 与文档恢复 master 状态,本家族生产行为相对 master 零变化;#4260 测试 all-missing 期望改为 pass≥3 落锁(对齐教义,保留断言不动);issue2915 的保留教义修正(健康重发 = resend、块保留 length 1、id 重铸 = reanchored,取代已被 #4260 supersede 的 #2695 reap/clean-slate 断言)独立成立、保留。本地验证:epoch-confirm-lifecycle 3/3、issue2915 5/5、fold-anchor-doctrine 7/7、fold-reconcile 13/13,typecheck 干净。

master 同步(a11e170)

master 前进到 bd29924d4(PR #4596 合入:release 标签门控 + dump banner 计入 #4297 字节上限 + #4596 自带的 unused-exports/LIVE_FILES/generation-boundary 家族修复)。ci-fixes 已合并 origin/master(冲突仅 src/error-dump.ts + tests/error-dump.test.ts——双方是同一 #4297 banner 预算修复的等价实现,取 master 侧 d515aeae8 为准,本分支的 995e642 cherry-pick 被其取代)。合并树上本地验证:此前全部 born-red 修正项 193/193 绿(error-dump 14/14、golden-storage-render、snapshot-render-chain、verif-snapshot-render、epoch-confirm-lifecycle、issue2915、preflight-client-abort、issue3013、plugin-fork、web-storage-diagnostics-redaction、web-i18n、seq-ledger-pr3、fold-anchor-doctrine、fold-reconcile、storage-block-bounds-preserve);仅剩存储车道 7 红(见下节,待裁决)。

提交 14-15(CI 管道 + Windows 卫生,6ee46e018 + 12a210874)

提交 14 6ee46e018 — stale-dist 红修复(#4360×#3325):test job 用 actions/cache(#4360)恢复 kernel/dist,restore 保留保存时 mtime,比刚 checkout 的源码旧;tests/golden-storage-drive.ts 的 kernelDistStale() 是纯 mtime oracle(kernel/src 下最新 .ts vs node_modules/acp-kernel/dist/index.js)→ 每个 cache 命中 leg 上所有跑 golden drive 的测试在 ~4ms 处抛「dist is older than kernel/src」,确定性红(#4639 车道实测面 = 6 项:golden chat ×3 + full-mode chat wire ×3)。修法:HIT 路径(marker 验证通过之后)把 dist 树全部文件 mtime 重打为现在——内容不动、HIT 仍绝不重建,内容 oracle 与 mtime oracle 重新一致。回归测试端到端钉住 restore→warm 序列(marker 仍 HIT、零构建、mtime 条件消解、字节不变)。本地 ci-pretest-cache 8/8。

提交 15 12a210874 — seq-ledger-pr3 Windows EBUSY:该套件 S12a/S12b 打开的 UnifiedStore 句柄从不关闭,test.after 的 rmSync(testRoot) 在 Windows 上 EBUSY(打开中的 SQLite 文件不可 unlink)——套件落地起每个 windows leg born-red(本次 ×2)。每个测试结尾关闭句柄(与 plugin-fork 的 closeQuietly 同纪律)。本地 seq-ledger-pr3 4/4;POSIX 无法复现 EBUSY,最终证明在 CI windows leg。

存储车道 7 红——待 owner 拍板(ci-fixes 上有意留红)

tests/storage-engine-proofs.test.ts ×6 + tests/storage-orphan-recovery.test.ts ×1,bisect 钉死到 380ef4d(#4316 layer 3 PR3/3 one-time ledger restamp):full 模式冷加载把 ref re-home 到 ledger seq+1(feature 设计目的),legacy 保持原计数编号 → 「full wire == legacy wire」断言结构性失效(fixture 的 mid-history edit re-mint 之后尾部 5 条编号偏移一位,详见 #4599 裁决评论的证据表)。feature 自身三套 pin 全绿(storage-unified 15/15 含 alignedLegacyDigest oracle、seq-ledger-pr3 4/4、kernel 1438/0)。处置选项 A/B/C 见 #4599 裁决评论,拍板后我直接落地。

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: ci-fixes (12a2108)

Latest build — install this exact version

npm install -g [email protected]

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
12a2108 [email protected] build
a11e170 [email protected] build
b06b408 [email protected] build
6843789 [email protected] build
177bbce [email protected] build
945f993 [email protected] build

Download artifact

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

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(ci): master-CI convergence lane — persistent ci-fixes branch (sentinel protocol 2026-10-25) [PR] fix(ci): master-CI convergence lane — persistent ci-fixes branch (sentinel protocol 2026-10-25) Oct 25, 2026
ci-check added 5 commits October 25, 2026 10:14
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)
…tually shipped (#4599 sentinel)

The three regexes never matched: /terminal for the session/ vs shipped
'unconditional and terminal (bili_final)', /allowDshCompaction/ absent from
the storm log (its levers are #2474 + 'Disable dsh auto-compaction'), and
/terminal; #3013/ vs shipped '(terminal, bili_final; #3013)'. The source
wording is unchanged since the test's own birth commit 3d39ba6, so the
file was red from birth. Each assertion keeps its semantic teeth.
…nefit gate (#4599 sentinel)

30ae218 added AUTO_FOLD_MIN_BENEFIT_TOKENS=4096 (src/external-summary-settings.ts:99);
the fixture's 10_000 baseline vs 8192 target left a 1808-token margin, so
triggerFires silently went false and preflight returned before any log line
(f.logs == []). Raising the measured baseline to 20_000 (margin 11_808)
re-arms the growth fold the test exists to cancel mid-flight.
…till survive (#4260 born-red, #4599 sentinel)

Both failures were born red at 594df72/a5d1994d1 (the #4260 fix itself,
Oct 22) and untouched since — fold-reconcile.ts escalation region is
byte-identical from that commit to master.

- tests/epoch-confirm-lifecycle.test.ts 'all-missing' shape: its explicit
  per-shape spec says zero survivors => never latch foldEpochConfirmPending
  (nothing to align onto or offer back; latching would freeze folding
  forever over what may be a brand-new conversation on a reused session id).
  The implementation latched unconditionally. Now the PAUSE latches only when
  some covered id survives (present or claimed, anyCoveredAligned); the ONE
  error line per episode (#2193/#2297), the ESCALATED latch, the witness
  event and snapshot retention are unchanged.
- tests/issue2915-order-centric-reconcile.test.ts post-escalation section
  still asserted the SUPERSEDED pre-#4260 contract (escalation reaps =>
  clean slate => 'noop'). Under #4260 retention the block survives: healthy
  resend is a fully clean 'resend' pass, the retained block stays
  (length 1), and an id re-mint re-anchors positionally ('reanchored').
- MESSAGE-IDENTITY.md epoch-confirm bullet synced with the carve-out.
…gn the #4260 test to it instead (#4599 sentinel, supersedes dc86ca8's carve-out)

dc86ca8 gated the foldEpochConfirmPending latch on 'some covered id
still survives' to satisfy tests/epoch-confirm-lifecycle.test.ts's
all-missing shape. That broke two previously-green suites pinning the
OPPOSITE contract for the identical input class (zero survivors, >=10
unmatched, proxy mode): tests/fold-anchor-doctrine.test.ts '#3641 total
collapse asks for epoch confirmation' (:213) + 'epoch-confirm suspends
preflight compression', and tests/fold-reconcile.test.ts 'side-request
passes ... reset nothing'. No implementation can satisfy both — a genuine
spec conflict between the #3641 doctrine and the #4260 born-red test.

Resolution: the #3641 side wins. It is the documented doctrine
(MESSAGE-IDENTITY.md epoch-confirm bullet), it has been green-enforcing
for days, and its preflight-gate test shows why the pause matters most
exactly in the zero-survivor case: the substrate is maximally unprovable,
the ask is which history owns the session going forward, and folding must
not silently start a new epoch on foreign bytes ('nothing is silently
reset'). So:

- src/fold-reconcile.ts + MESSAGE-IDENTITY.md: reverted to master state
  (latch unconditional again — zero net production behavior change vs
  master from this family).
- tests/epoch-confirm-lifecycle.test.ts all-missing shape: expectation
  aligned to the doctrine (pending latches at pass >= 3 like the
  survivor shapes); retention assertions (block kept, deactivated)
  unchanged.
- The dc86ca8 update of tests/issue2915-order-centric-reconcile.test.ts
  (superseded #2695 reap contract -> #4260 retention: resend / block kept
  / reanchored) STANDS — it is independent of the latch question and was
  red at birth under master code too.

Verified locally: epoch-confirm-lifecycle 3/3, issue2915 5/5,
fold-anchor-doctrine 7/7, fold-reconcile 13/13, typecheck clean.
ci-check added 3 commits October 25, 2026 12:18
# Conflicts:
#	src/error-dump.ts
#	tests/error-dump.test.ts
…, #4599 sentinel)

actions/cache restores a verified-fresh kernel/pi-subagents dist with SAVE-TIME
mtimes, older than the just-checked-out sources; tests/golden-storage-drive.ts'
#3325 staleness guard is a pure mtime oracle (newest kernel/src vs
node_modules/acp-kernel/dist/index.js), so every cache-hit leg reds every
golden drive ~4ms in ('dist is older than kernel/src'). The marker already
proved content freshness — restamp the verified dist tree's mtimes to now so
the two oracles agree. Content untouched; HIT still never rebuilds.
Regression test pins the restore-then-warm sequence end to end.
… (windows EBUSY, #4599 sentinel)

S12a/S12b opened UnifiedStore handles that were never closed; test.after's
rmSync(testRoot) then fails on Windows with EBUSY (resource busy or locked,
unlink ...\index.db) because Windows cannot unlink an open SQLite file —
born-red on every windows leg since the suite landed. Close each handle at
the end of its test (same discipline as plugin-fork's closeQuietly).
@ranxianglei
ranxianglei merged commit 52567f1 into master Oct 25, 2026
40 of 46 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.830-master.52567f1 (rolling master tag).

npm install -g [email protected]  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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

Labels

None yet

Projects

None yet

1 participant