Skip to content

[PR] merge: tier-1 consolidation train — 37 green PRs as one (conflicts resolved, #4294 reverted) - #4525

Merged
ranxianglei merged 86 commits into
masterfrom
2026-10-24_tier1-consolidation-train
Oct 24, 2026
Merged

ranxianglei merged 86 commits into
masterfrom
2026-10-24_tier1-consolidation-train

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

这是什么

第 1 级绿票的合并列车:37 个 CI 绿、目标 issue 开放的 PR 在一个分支上按序落位、冲突当场解决、合成一个 PR 一次合并。目的:打破「每合一个,其余全变 BEHIND/冲突」的串行卡死,一次性把第 1 级清完(合并后开放 PR 数 289→约 248,配合关单可到 ~120)。

合并方式请选 Merge commit(不要 Squash)——列车保留了每个原 PR 的提交与作者,12 位外部贡献者的提交会带着他们的 authorship 进 master,直接成为仓库贡献者。

车上清单(37 个 PR)

PR 修的 issue 作者 落位方式
#3321 #2222 #3203 ranxianglei merge 收编(分支含 merge 提交)
#3552 #3386(诊断探针,Refs 不关) ranxianglei 干净
#3648 #3647 JiewiW 手工解(见下)
#3856 #3446 aolshevskiy 干净
#3863 #3859 ranxianglei 干净
#3920 #3908 ranxianglei 干净
#3996 #3993 zhou1736948757-cpu 干净
#4053 #4043 ranxianglei 干净
#4074 #4072 ranxianglei 手工解(见下)
#4102 #4070 qiangu2020 干净
#4148 #4106 ranxianglei 干净
#4158 #4121 Y-fyan 干净
#4170 #4163 ranxianglei 干净
#4180 #4178 ranxianglei 干净
#4181 #4179 ranxianglei 干净
#4210 #4169 #4107 ranxianglei 手工解(见下)
#4217 #4186 ranxianglei 干净
#4219 #4168 ranxianglei 干净
#4220 #4164 ranxianglei 干净
#4223 #3011(Refs,家族未全修) ranxianglei 干净
#4226 #4224 ranxianglei 干净
#4235 #4204 ranxianglei 干净
#4243 #4241 ranxianglei 手工解(见下)
#4261 #4260 0XCocoa 干净
#4265 #4264 ranxianglei 干净
#4279 #4278 yanhuojiyusheng 干净
#4283 #4287 sorasoras 干净
#4299 #4297 0XCocoa 干净
#4304 #4302 overFloweee 干净
#4320 #4317 ranxianglei 干净
#4340 #4331 ranxianglei 干净
#4394 #4256 ranxianglei 干净
#4402 #4191 ranxianglei 干净
#4487 #4486 0XCocoa 手工解(见下)

手工冲突解决记录(审查重点)

  1. [PR] fix: persona-lineage follow must not redirect host calls into a fork while the parent is still active #3648 × master Compression fails in long sessions while new sessions work fine | 压缩失败.新会话反而没事 #3397/[Bug] dsh 会话反复 model/provider 切换时主对话迁移到 |sub:<fp> persona fork,宿主盖章的 compress/decompress/acp_status 仍解析在陈旧父 id —— ref 跨空间不可解析直至熔断 #2601(src/plugin.ts):取并集——候选过滤换成 PR 的出生序判别(fork.createdAt > parent.lastSeen,父会话还活着不改道),保留 master 的 Compression fails in long sessions while new sessions work fine | 压缩失败.新会话反而没事 #3397 引用边界匹配(maxCitedRefNum/highestMintedRefNum)。身份逻辑热区,请重点过目。
  2. [PR] fix: re-carry the anthropic cache_creation breakdown on the synthetic terminal #4074 × 已合 [PR] fix: anthropic lane double-counts cached tokens on OpenAI-semantics relays (#4128) #4132(src/loop/{core,adapter-anthropic}.ts):纯字段并集,declaredInclusive([Bug] anthropic lane: cache-hit % halved when the upstream relays an OpenAI-semantics backend (billing_usage.semantic=openai, input_tokens inclusive) #4128)与 cacheCreation([Bug][claude] #1315 drops usage.cache_creation (ephemeral_5m/1h breakdown) → Claude Code VS Code prompt-cache countdown icon disappears #4072)同时保留,事件类型/发射点/局部变量三处都带上了。
  3. [PR] fix: make streaming tag-echo verdicts chunk-split independent (#4169/#4107) #4210 第二提交 × 已挑 [PR] fix(loop): re-adjudicate nested openings arriving across a chunk boundary in the tag-echo bare-open swallow #4170/[PR] fix: tag-echo dead reference unit leaks across chunk boundaries — hold pending ambiguous tail (Fixes #4164) | fix: tag-echo 死引用单元跨分块边界泄漏 — hold pending ambiguous tail (Fixes #4164) #4220(src/loop/tag-echo-filter.ts):PR 的 preHeld 再裁决机制取代 [PR] fix: tag-echo dead reference unit leaks across chunk boundaries — hold pending ambiguous tail (Fixes #4164) | fix: tag-echo 死引用单元跨分块边界泄漏 — hold pending ambiguous tail (Fixes #4164) #4220 的 pendingSettle 局部结算(超集:死单元重回主循环裁决,而不是局部剥落);死掉的 pendingSettle 机器已删(独立 cleanup 提交)。证据:双族语料 tag-echo-chunking-determinism + verif-tag-echo-filter 21/21、issue4164-dead-ref-chunk-boundary + tag-echo + absorb-emission 122/122、P1 全域(去掉了 skip 行)通过。
  4. [PR] fix: egress judge render-lane tail-fidelity (snapshot-render I2 false positive) #4243 × 已挑 [PR] fix: failed-only compress rounds end the turn — ephemeral failure frames never reach upstream (#4186) #4217 的 exempt 扩展(src/invariant-judge.ts):exempt 对象保留五个计数器+ renderLane 标志;测试两族并置,40/40。
  5. [PR] fix(preflight): discard summaries when their fold targets change #4487 × master 的 lastNudge/maxFoldsPerRound(src/preflight.ts):并集,fold-target 复查前置 + 保留 maxFoldsPerRound 语义。

排除与处置

本地验证

  • typecheck 干净;零 kernel/ 碰撞(kernel-guard 不适用)
  • 定向测试:tag-echo 双族 21/21 + 122/122、invariant-judge 40/40、loop-adapters 38/38、preflight 双文件 14/14、persona 双文件 12/12、codex-sqlite-home 7/7、issue1195 4/4、issue4204 10/10,及其余家族全绿
  • 全量以 CI 为准(§7.2)

关单

Closes #2222, Closes #3203, Closes #3446, Closes #3647, Closes #3859, Closes #3908, Closes #3993, Closes #4043, Closes #4070, Closes #4072, Closes #4106, Closes #4121, Closes #4163, Closes #4164, Closes #4168, Closes #4169, Closes #4178, Closes #4179, Closes #4186, Closes #4224, Closes #4241, Closes #4260, Closes #4264, Closes #4278, Closes #4287, Closes #4297, Closes #4302, Closes #4317, Closes #4331, Closes #4256, Closes #4191, Closes #4486, Closes #4107
Refs #3386, Refs #3011

外部贡献者署名(merge commit 保留作者;squash 则靠以下 trailer)

Co-authored-by: JiewiW JiewiW@users.noreply.github.com
Co-authored-by: Artyom Olshevskiy artyom.olshevskiy@gmail.com
Co-authored-by: zhou1736948757-cpu 286324179+zhou1736948757-cpu@users.noreply.github.com
Co-authored-by: qiangu2020 57162279+qiangu2020@users.noreply.github.com
Co-authored-by: Y-fyan 195829684+Y-fyan@users.noreply.github.com
Co-authored-by: Qfeng_66 Qfeng_66@noreply.gitcode.com
Co-authored-by: wxy 2398249916@qq.com
Co-authored-by: sorasoras sorasoras@users.noreply.github.com
Co-authored-by: overFloweee 108922104+overFloweee@users.noreply.github.com

ework-agent and others added 30 commits October 16, 2026 02:44
…e via CODEX_SQLITE_HOME (#2222)

bili codex used one shadow-home overlay to solve three unrelated problems
(per-launch config injection, SQLite state isolation, everything else).
The state-isolation half dragged every WAL-mode db into the overlay per
launch and needed copy-on-launch + origin snapshots + startup fold + exit
merge-back + provenance adjudication to stay correct (#381/#1917/#1918/

Codex >= 0.147.0 honors CODEX_SQLITE_HOME (source-verified across
0.147/0.150/0.155/0.159/0.160.1/main, empirically confirmed on the
CI-pinned 0.147.0 binary). New default for such binaries: point it at the
REAL home so the live dbs stay on their single physical path where native
and bili runs coordinate through SQLite's own WAL locking. The overlay
shrinks to the generated .env/config.toml plus symlinks; leftover legacy
sets are folded back once through the existing provenance adjudication.

BILI_CODEX_STATE_MODE (auto|shared|legacy, default auto) gates the
strategy; old binaries (< 0.147.0 or unparseable version) stay on the
legacy path unchanged. A user-set CODEX_SQLITE_HOME wins over our default.

(cherry picked from commit 039c536)
…overlay slots + per-session proxy lanes (#3203)

Shared-state mode (codex >= 0.147.0, BILI_CODEX_STATE_MODE auto/shared) now
claims a per-session overlay slot from a bounded pool (<CODEX_HOME>-bili-s1..s16)
BEFORE starting the proxy, and runs that launch's proxy on its own lane
(codex-s<N>): two same-build launches sharing one lane would refuse each other
at the port layer (#3044 twin rule), so concurrent sessions need distinct
lanes. Slots persist and are reused (cold-start thread records resolve through
the slot, #43bf59fc9); a crashed session's slot is reclaimed by the next
launch. The pre-#3203 fixed-name <CODEX_HOME>-bili overlay migrates into the
real home once on first launch, and is refused while a live legacy-era launch
still holds it (dual-writer guard). Legacy mode keeps the fixed-name single
overlay + exclusive lease byte-for-byte.

Also: installation_id is seeded into the real home on first shared launch so
every slot links one canonical identity file instead of quarantining copies;
byte-identical merge-back losers are dropped silently instead of producing
<name>.bili-conflict entries (matches the mergeSqliteSet snapshot rule).
…ack unit test (#3321)

CI gate scripts/check-unused-exports.mjs flagged five launcher symbols with no
reference outside their declaring file. prepareCodexSessionSlot/codexSlotLane/
codexBinaryVersion/CodexStateMode are implementation details of runLaunch and
the #2222 capability probe — drop the leading export. mergeOverlayEntry was
meant to be exercised by the byte-identity drop test in
tests/codex-concurrent-launch.test.ts; that import + test case were lost from
the tree before the first commit, so restore them verbatim.
The SPAWN_RE tripwire in scripts/run-ci-tests.mjs (#1248) killed all 12 test
shards plus the fake-upstream lane on the previous head: the new suite spawns
child processes but was missing from LIVE_FILES. Inserted alphabetically; every
suite after it shifts one zone band up (max base stays far below the Linux
ephemeral range per the file's own docstring).
…#3321)

The test hardcoded <CODEX_HOME>-bili, which shared-mode launches (#2222/#3203)
no longer create — they use per-session slots <CODEX_HOME>-bili-s<N>. The e2e
lane pins codex 0.147.0 (shared mode active), so the fixed-name path was absent
and 'the overlay must own the generated .env' failed on CI while every
name-filtered local run skipped the test. Scan for the actual overlay beside
the real home (covers both naming shapes); the four content assertions are
unchanged.
…drop branch

The restored merge-back case covers identical-dst-newer and differing-src-newer; these two pin the other branches: an IDENTICAL slot-side copy that is NEWER than the real-home file must still be dropped silently (the src-newer identical branch added by #3203), and a DIVERGENT copy against a newer real-home edit must quarantine the slot side while the home edit wins. Also drops the unused home binding left in the adjacent test.
…on race

The concurrent pair flaked (1/4 locally, 1/1 ubuntu CI): two codex processes cold-starting milliseconds apart on a brand-new home interleave codex's non-atomic sqlx migrations; one of them aborts its whole state-runtime init ('while executing migration 2: table logs already exists' — WARN only, hidden at RUST_LOG=error), so that session's thread row is never written although its rollout JSONL survives on disk. That race lives upstream of bili (which owns neither codex's schema nor its migrations) and does not occur in #3203's real scenario — two terminals in the SAME project share an already-migrated home. One sequential warm session closes the fresh-db window so the lane deterministically tests what bili owns: slots, per-session lanes, the single live db.
…t step

The ubuntu artifact step only globbed tmp/e2e-codex-fake-*; the #1802/#1965/#2195/#2222/#3203 lanes each use their own prefix, so their logs were missing from failure artifacts (the windows workflow collects them explicitly).
…orced mtimes

The forced-mtime approach failed on the Windows CI runners: fs.utimesSync rejects future timestamps there (EINVAL), which red'd both merge-back cases on windows-latest node 22/24. Past timestamps proved equally unreliable: on at least one Linux overlay filesystem a past-value utimesSync read back as a corrupted constant mtime, silently breaking the ordering premise (observed during local triage of head de82dd5).

Recency now comes from natural write order plus a fixed 1.1s pause (the Atomics.wait idiom already used by tests/external-summary.test.ts) — portable across ext4/NTFS/APFS. The byte-identical cases need no pinning at all: identical bytes converge in BOTH recency directions, so the branch under test is unconditional.

Also strengthened the no-quarantine assertions from a root-level readdir to a recursive findConflicts() walk (quarantines land NESTED next to the dst file, so the root-level check could never see them); the divergent cases now assert the exact quarantine set.
…e via CODEX_SQLITE_HOME (#2222)

bili codex used one shadow-home overlay to solve three unrelated problems
(per-launch config injection, SQLite state isolation, everything else).
The state-isolation half dragged every WAL-mode db into the overlay per
launch and needed copy-on-launch + origin snapshots + startup fold + exit
merge-back + provenance adjudication to stay correct (#381/#1917/#1918/

Codex >= 0.147.0 honors CODEX_SQLITE_HOME (source-verified across
0.147/0.150/0.155/0.159/0.160.1/main, empirically confirmed on the
CI-pinned 0.147.0 binary). New default for such binaries: point it at the
REAL home so the live dbs stay on their single physical path where native
and bili runs coordinate through SQLite's own WAL locking. The overlay
shrinks to the generated .env/config.toml plus symlinks; leftover legacy
sets are folded back once through the existing provenance adjudication.

BILI_CODEX_STATE_MODE (auto|shared|legacy, default auto) gates the
strategy; old binaries (< 0.147.0 or unparseable version) stay on the
legacy path unchanged. A user-set CODEX_SQLITE_HOME wins over our default.

(cherry picked from commit 039c536)
(cherry picked from commit bbc5170)
…overlay slots + per-session proxy lanes (#3203)

Shared-state mode (codex >= 0.147.0, BILI_CODEX_STATE_MODE auto/shared) now
claims a per-session overlay slot from a bounded pool (<CODEX_HOME>-bili-s1..s16)
BEFORE starting the proxy, and runs that launch's proxy on its own lane
(codex-s<N>): two same-build launches sharing one lane would refuse each other
at the port layer (#3044 twin rule), so concurrent sessions need distinct
lanes. Slots persist and are reused (cold-start thread records resolve through
the slot, #43bf59fc9); a crashed session's slot is reclaimed by the next
launch. The pre-#3203 fixed-name <CODEX_HOME>-bili overlay migrates into the
real home once on first launch, and is refused while a live legacy-era launch
still holds it (dual-writer guard). Legacy mode keeps the fixed-name single
overlay + exclusive lease byte-for-byte.

Also: installation_id is seeded into the real home on first shared launch so
every slot links one canonical identity file instead of quarantining copies;
byte-identical merge-back losers are dropped silently instead of producing
<name>.bili-conflict entries (matches the mergeSqliteSet snapshot rule).

(cherry picked from commit b7400e9)
…ack unit test (#3321)

CI gate scripts/check-unused-exports.mjs flagged five launcher symbols with no
reference outside their declaring file. prepareCodexSessionSlot/codexSlotLane/
codexBinaryVersion/CodexStateMode are implementation details of runLaunch and
the #2222 capability probe — drop the leading export. mergeOverlayEntry was
meant to be exercised by the byte-identity drop test in
tests/codex-concurrent-launch.test.ts; that import + test case were lost from
the tree before the first commit, so restore them verbatim.

(cherry picked from commit c58e7e7)
The SPAWN_RE tripwire in scripts/run-ci-tests.mjs (#1248) killed all 12 test
shards plus the fake-upstream lane on the previous head: the new suite spawns
child processes but was missing from LIVE_FILES. Inserted alphabetically; every
suite after it shifts one zone band up (max base stays far below the Linux
ephemeral range per the file's own docstring).

(cherry picked from commit 752ae07)
…#3321)

The test hardcoded <CODEX_HOME>-bili, which shared-mode launches (#2222/#3203)
no longer create — they use per-session slots <CODEX_HOME>-bili-s<N>. The e2e
lane pins codex 0.147.0 (shared mode active), so the fixed-name path was absent
and 'the overlay must own the generated .env' failed on CI while every
name-filtered local run skipped the test. Scan for the actual overlay beside
the real home (covers both naming shapes); the four content assertions are
unchanged.

(cherry picked from commit 3148100)
…drop branch

The restored merge-back case covers identical-dst-newer and differing-src-newer; these two pin the other branches: an IDENTICAL slot-side copy that is NEWER than the real-home file must still be dropped silently (the src-newer identical branch added by #3203), and a DIVERGENT copy against a newer real-home edit must quarantine the slot side while the home edit wins. Also drops the unused home binding left in the adjacent test.

(cherry picked from commit 01d7aa2)
…on race

The concurrent pair flaked (1/4 locally, 1/1 ubuntu CI): two codex processes cold-starting milliseconds apart on a brand-new home interleave codex's non-atomic sqlx migrations; one of them aborts its whole state-runtime init ('while executing migration 2: table logs already exists' — WARN only, hidden at RUST_LOG=error), so that session's thread row is never written although its rollout JSONL survives on disk. That race lives upstream of bili (which owns neither codex's schema nor its migrations) and does not occur in #3203's real scenario — two terminals in the SAME project share an already-migrated home. One sequential warm session closes the fresh-db window so the lane deterministically tests what bili owns: slots, per-session lanes, the single live db.

(cherry picked from commit 20f3a7b)
…t step

The ubuntu artifact step only globbed tmp/e2e-codex-fake-*; the #1802/#1965/#2195/#2222/#3203 lanes each use their own prefix, so their logs were missing from failure artifacts (the windows workflow collects them explicitly).

(cherry picked from commit b710361)
…orced mtimes

The forced-mtime approach failed on the Windows CI runners: fs.utimesSync rejects future timestamps there (EINVAL), which red'd both merge-back cases on windows-latest node 22/24. Past timestamps proved equally unreliable: on at least one Linux overlay filesystem a past-value utimesSync read back as a corrupted constant mtime, silently breaking the ordering premise (observed during local triage of head de82dd5).

Recency now comes from natural write order plus a fixed 1.1s pause (the Atomics.wait idiom already used by tests/external-summary.test.ts) — portable across ext4/NTFS/APFS. The byte-identical cases need no pinning at all: identical bytes converge in BOTH recency directions, so the branch under test is unconditional.

Also strengthened the no-quarantine assertions from a root-level readdir to a recursive findConflicts() walk (quarantines land NESTED next to the dst file, so the root-level check could never see them); the divergent cases now assert the exact quarantine set.

(cherry picked from commit 4111453)
One oversized request aborting the whole process (#3386: 25 MiB / 1372 msgs → 4 GB heap) cannot be attributed to its allocating stage from outside. Three mem-probe samples, gated on the existing --debug flag (zero new config surface, zero behavior change when off):

- inbound-parsed: after readBody+decode+toString+JSON.parse and session identity resolution — baseline before the heavy local window work
- prepared: after runPrepare returns (both the codex-intercept and the main path) — cumulative cost of image-index build, wire→core conversion, kernel processTurn, and outbound rebuild/stringify

Each line logs heapUsed/external/rss plus the stage's payload bytes, prefixed 'mem-probe <stage>:' for grep continuity. The delta between consecutive samples is what tells the owner whether the OOM mass sits in parse materialization or in the fold/processTurn window — input for the #3386 A/B/C fix decision.

(cherry picked from commit e32d66c)
…dies

Review nit on the staged heap probes: the log line contract says
payload=<N>B (bytes) and inbound-parsed samples bodyBuffer.length
(bytes), but the prepared-stage sampled prepared.body.length — UTF-16
code units for string bodies. Identical for ASCII/base64 payloads,
under-reports multibyte text, and makes the inter-sample payload delta
(unit-mixed) misleading exactly when comparing stages. Buffer.byteLength
is allocation-free, so the debug path stays cheap.

(cherry picked from commit 982ecf2)
- claude preset emits neither `HTTPS_PROXY` nor `NODE_EXTRA_CA_CERTS`: its `/bili/` base URL is plain http on loopback, so nothing was ever tunnelled or trusted, and every child (`curl`, `git`, `npm`) issued CONNECT through bili's MITM instead of going direct.
- `/__bili/health` gains `auxProxy`/`auxProxySource`, the proxy an AUX (blind-tunnel) request resolves to — `/__bili/upstream` answers for the model upstream, where provider and fallback tiers outrank the env tier.
- the launcher hands that proxy to a claude child with no proxy env of its own and leaves a shell-configured child strictly alone; an absent field (pre-handoff build, or explicit direct mode) hands over nothing, never bili's own origin.
- CONFIGURATION told Claude Code users to set both variables, re-creating the leak; undici ignores `HTTPS_PROXY` anyway (same file, later section).
- tests: four claude env assertions flipped to absence, plus handoff unit coverage and the health wire fields.

(cherry picked from commit f45358b)
…mbstoning live refs (#3859)

The no-visible-context guard (#3126) exempted any request whose range SPAN-OVERLAPPED
an active block span. The kernel's dead-ref test (danglingMessageRefs) judges per
BOUNDARY ref, not per span overlap: a range can overlap one block while its boundary
refs sit in gaps between blocks. On an evicted/restarted session (view=0, refs mapped)
such requests passed the gate, reached applyCompression with an empty message list,
and the kernel recorded those still-live refs as DEAD — committed by the host even
when zero blocks were created.

The gate now mirrors the kernel's own test: on an empty view with mapped refs it
yields to the kernel only when every requested range's message-ref boundaries are
point-covered by some active block's effectiveMessageIds (block-ref boundaries carry
no raw id and can never be tombstoned). That set equals exactly the shapes the kernel
can serve from state alone (#403/#2748 restoredInline refold, already-compressed
warnings); everything else is refused up front with zero state writes, retryable once
the next model request restores the view.

Tests: flipped issue3126 test (e) (block-touching request on empty view is now
refused, no dead refs) and added tests/issue3859-no-visible-context-overlap.test.ts
(multi-range gap-boundary shape refused whole-batch; mixed batch refused; pure b-ref
distillation still yields to the kernel with its honest already-compressed warning;
non-empty-view negative row). refold-wiring suite (state-alone refold landing, #2748
net-shrink, negative control) stays green.

(cherry picked from commit 4af1753)
…ans (#3908)

The #3908 span floor correctly rejects sub-512-char placeholder transcripts,
but four e2e fixtures in tests/e2e-anthropic.test.ts still used them, so the
new gate forwarded them upstream and the zero-egress assertions failed on all
CI shards. They now share one KB-scale CLASSIFIER_TRANSCRIPT constant — the
same treatment the unit suite's BIG_TRANSCRIPT already got. A genuine CC
one-shot carries the entire flattened session in the wrapper; sub-KB fixtures
were never realistic shapes of this lane.

Targeted local runs green: tests/auto-mode-forge.test.ts +
tests/e2e-anthropic.test.ts (33/33); full-suite verdict via CI.

(cherry picked from commit 579329b)
…evidence

projectThinkingMass (#1320) stamps CoreMessage.thinkingTokens onto Prepared.originalMessages before noteInboundMessages fingerprints the list, and re-derives the value every turn from the previous usage report — so a byte-stable client list showed positional fingerprint divergence at every signature-only reasoning message, and detectSeam's #3023 client arm booked a bili-owned miss as host churn (prov:"client" / clientInserts).

Fingerprints are now computed over origin evidence: the message minus the host-generated metering fields (GENERATED_METERING_FIELDS, currently thinkingTokens). Signatures, raw payloads, tool ids and unknown semantic fields stay full evidence; miss accounting is untouched — the unexplained miss remains recorded and falls to the seam-suspect bucket instead of being attributed to the client or a provider without evidence. Messages without any generated field stringify byte-identically to before, so unaffected sessions keep their legacy fingerprints.

Regression tests pin both directions (#3617 gate discipline): metering drift alone does not trigger the client arm; a genuine signature or text rewrite still does.

(cherry picked from commit a9e042b)
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
… a stale use

#4491's host wiring (df3cd92) renamed the dsh AsyncLocalStorage scope
sidScope(string) -> dispatchScope(LlmDispatchScope); #4215's fork-gate
diagnostics (85af00f) landed in the same #4525 train merge still calling
sidScope.getStore() - a cross-branch leftover that broke tsc on master at
the merge (TS2304, src/agent/dsh-native.ts:1287). The broken line never
compiled or shipped. Restored via the file's own established idiom
(attributionOf, same file): dispatchScope.getStore() + scoped.sid check.
No behavior change beyond letting #4215's blind-spot log compile as
intended.

Labeled pass-by fix found while reviewing PR #4522 (a red master blocks
rebased heads from going green); kept as its own commit off the storage
change.
ranxianglei added a commit that referenced this pull request Oct 24, 2026
…ion-train

[PR] merge: tier-2 consolidation train — 15 PRs + repair of #4525's sidScope compile break
yanhuojiyusheng pushed a commit to yanhuojiyusheng/billion-context that referenced this pull request Oct 24, 2026
…the ranxianglei#4525 rename

The tier1 consolidation train renamed sidScope (AsyncLocalStorage<string>)
to dispatchScope (AsyncLocalStorage<{sid,msgIds}>) and updated the main
attribution path but missed the C10b fork-blind-spot logger, leaving master
tsc red (TS2304 sidScope, dsh-native.ts:1287; CI run 40093629255 failed on
the same break). Read dispatchScope.getStore() and test .sid — semantics
unchanged (scoped attribution active).
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
#3641 contract (#4555)

Both master-red tests after the #4525 train are expectation lag, not
implementation drift — no runtime change (src/ untouched):

- epoch-confirm-lifecycle all-missing shipped born-red in a5d1994 (train
  CI legs cancelled): it asserted foldEpochConfirmPending never latches,
  contradicting #3641 boundary 4 and MESSAGE-IDENTITY.md's epoch-confirm
  gate (total collapse latches, snapshot retained, nothing deleted).
  Expect pass >= 3 like one-interior-survivor; the kernel deactivates the
  zero-coverage block, the pause contract is shape-independent.
- issue2915 escalation-latch-recovery encoded the pre-#3641
  reap-at-escalation clean-slate contract. a5d1994 made the doctrine
  real (epochProtected gates the #2695 reap), so a healthy resend now
  yields 'resend' with the substrate retained and post-recovery id churn
  re-anchors ('reanchored') instead of rebuilding from zero.

Verified: 90/90 across the three reconcile suites on rebased head
ba5ab0b; old test ran 15/0 green on pre-train master (8ae56a0),
pinning a5d1994 as sole cause (only train commit touching the latch path).
ranxianglei pushed a commit that referenced this pull request Oct 24, 2026
#3641 contract (#4555)

Both master-red tests after the #4525 train are expectation lag, not
implementation drift — no runtime change (src/ untouched):

- epoch-confirm-lifecycle all-missing shipped born-red in a5d1994 (train
  CI legs cancelled): it asserted foldEpochConfirmPending never latches,
  contradicting #3641 boundary 4 and MESSAGE-IDENTITY.md's epoch-confirm
  gate (total collapse latches, snapshot retained, nothing deleted).
  Expect pass >= 3 like one-interior-survivor; the kernel deactivates the
  zero-coverage block, the pause contract is shape-independent.
- issue2915 escalation-latch-recovery encoded the pre-#3641
  reap-at-escalation clean-slate contract. a5d1994 made the doctrine
  real (epochProtected gates the #2695 reap), so a healthy resend now
  yields 'resend' with the substrate retained and post-recovery id churn
  re-anchors ('reanchored') instead of rebuilding from zero.

Verified: 90/90 across the three reconcile suites on rebased head
ba5ab0b; old test ran 15/0 green on pre-train master (8ae56a0),
pinning a5d1994 as sole cause (only train commit touching the latch path).
@github-actions github-actions Bot mentioned this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] no-visible-context guard is bypassed for ranges overlapping active blocks, marking refs DEAD fix: persona-lineage follow must not redirect host calls into a fork while the parent is still active [Bug] bili claude: Claude Code 2.1.301 honours HTTPS_PROXY, so the /bili/ base URL self-tunnels (403 tunnel_destination_denied: self) [Feature][Codex launcher] Support concurrently launching multiple bili codex sessions in the same directory with the same CODEX_HOME | [Feature][Codex launcher] 支持同一目录、同一 CODEX_HOME 并发启动多个 bili codex 会话 Bili Codex's startup mechanism has various issues that currently rely on band-aid patches. We need to explore a new mechanism to thoroughly resolve these problems. | bili codex 启动机制带了各种问题需要狗皮膏药打补丁,探索新机制彻底解决这些问题

10 participants