Skip to content

[PR] fix: explicit plugin host identity outranks Codex UA guessing for host-side policy (#3686) - #3696

Merged
ranxianglei merged 2 commits into
masterfrom
2026-10-18_pi-codex-ua-host-policy
Oct 20, 2026
Merged

ranxianglei merged 2 commits into
masterfrom
2026-10-18_pi-codex-ua-host-policy

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #3686

查重: 不重复。相关条目: #2733 (strict-relay summary wire shape — this PR keeps it UA-driven and extends its fixture to the declared-pi case); #3663 (author-stated separate reporting problem, untouched); #3270/#3266/#3272 (origin of the CCR/image-rescale codex-lane disarm now narrowed to true codex hosts); #150/#1106 (instructions-fingerprint allowlist whose codex entry gains the explicit-marker exclusion). No existing issue/PR implements the host-vs-wire identity split.

Root cause

isCodexClient(headers) (UA sniffing) was serving TWO different decisions at once:

  1. Host identity — "the requesting client IS the codex CLI" → drives codex-only compaction policy: the 0.9 preflight health bar (REQ: codex 压缩预算协调 + 匿名代理模式拦截伪造(根本解决方案) #321), growth-fold nudge caps, forge/reconcile lanes, compaction-trigger dispatch, /responses/compact interception, CCR + image-rescale disarming, instructions-fingerprint session keying.
  2. Wire profile — "this request presents a codex-shaped wire to the relay" → drives the shape of bili's OWN side-channel requests so strict relays accept them (192版本缓存命中率低codex #2733: typed message items + include:["reasoning.encrypted_content"]).

For headerless clients the UA is the only evidence for both — fine. For an explicit plugin host (x-bili-plugin), the marker IS the authoritative identity, and a codex-shaped UA on that traffic is user-chosen relay compatibility. A native Pi request marked x-bili-plugin: pi with a Codex UA therefore inherited every codex-only policy: most visibly the preflight bar at 90% of the window (issue repro: 272000 − 68000 output reservation = 204000 budget, compression starting near 183600) although pi has no native auto-compaction to race against — so every early fold was pure cost, amplified when summaries failed.

Fix — one predicate split, sites re-pointed

src/codex-compact.ts:

  • isCodexHost(headers) — explicit x-bili-plugin marker declares the host and outranks UA guessing (agent === "codex"; no marker → UA detection byte-identical to before). The marker name is read as a local literal — importing plugin.js back would close an ESM cycle (plugin.ts → loop/tag-echo-filter.ts top-level read of CODEX_FORGED_HANDOFF_HEADER) and crash in the TDZ; same literal-read discipline as session-id.ts / anon-provenance.ts.
  • codexHealthBarApplies(headers) = isCodexHost && BILI_CODEX_COMPACT === "intercept" — the single gate behind both lowered-bar sites.

Site checklist (host policy → isCodexHost, wire profile stays isCodexClient):

Site Old New
server.ts preflight overflow target isCodexClient && mode==intercept codexHealthBarApplies
prepare-responses.ts codexLane (local-compaction reconcile + nudge caps) isCodexClient isCodexHost
prepare-responses.ts forge gate isCodexClient isCodexHost
prepare-responses.ts /responses/compact gate isCodexClient isCodexHost
handle.ts CCR arming !isCodexClient !isCodexHost
handle.ts image-rescale arming !isCodexClient !isCodexHost
handle.ts compaction-trigger dispatch isCodexClient isCodexHost
lane-decisions.ts wire-client registry codex entry (instructions-fingerprint keying) matches any codex UA additionally requires NO x-bili-plugin marker
prepare-responses.ts sys/dev position preservation (`pluginMode isCodexClient`)
preflight.ts summary payload shape (#2733) isCodexClient UNCHANGED — wire follows presented UA
codex-models.ts codexAlignedWindow isCodexClient UNCHANGED — see open item below

Behavior changes (old → new)

Only requests carrying BOTH an explicit x-bili-plugin marker AND a codex-shaped User-Agent change behavior (today: pi over strict codex relays):

Headerless clients (genuine codex CLI, all other clients): byte-identical behavior — no marker means the UA fallback path, which is the old code. Wire shape of preflight summary payloads: unchanged (still UA-driven; #2733 strict relays keep accepting them — covered by the extended e2e).

Open item (owner decision, NOT changed here)

codexAlignedWindow (src/codex-models.ts) still gates on the raw UA: a declared pi host with a codex UA still gets its effective window aligned against codex's model table when it stamps no context-window header. Left as-is deliberately: the issue author scoped it out ("native model window … not changed as the solution") and tests/codex-window-align.test.ts pins the current contract under #321 PR-E1 (declared marker + codex UA → clamp). If the owner wants declared-host windows to skip codex-table alignment too, it is a one-line swap to isCodexHost + updating those five e2e expectations — tracked here rather than filed separately (same mechanism family).

Verification (local, targeted — full verdict is remote CI)

New suite tests/issue3686-pi-codex-ua-host-policy.test.ts (7/7 green), including loopback e2e through a strict #2733-style relay at LIMIT=20_000 (bars 18_000/20_000, measured hermetic totals ≈19.7K genuine codex vs ≈18.2K declared pi):

  • predicate matrix: string/array UAs, token fallback, blank-marker fallthrough, hypothetical declared-codex marker;
  • control: genuine codex at straddle size folds (≥1 summary call, all codex-shaped, block active);
  • bug pin: declared pi at the SAME size → exactly one upstream request, zero summary calls, no fold;
  • 192版本缓存命中率低codex #2733 preserved: declared pi past the FULL window folds, and every summary call still carries the codex CLI signature accepted by the strict fake relay.

Adjacent targeted suites green: issue2733-preflight-codex-shape, codex-compact(-e2e), codex-window-align, codex-models, codex-live-window, lane-decisions-matrix, issue3272-ccr-codex-lane-gate, preflight-compress-responses, codex-local-compaction*, codex-turn-isolation*. npm run typecheck clean, npm run build OK.

No kernel/ changes, no config-surface additions, no persistence-format or signed-reasoning changes. Human review required (identity/session-binding logic ⇒ auto-merge gate fails by design).

@ranxianglei ranxianglei changed the title fix: explicit plugin host identity outranks Codex UA guessing for host-side policy (#3686) [PR] fix: explicit plugin host identity outranks Codex UA guessing for host-side policy (#3686) Oct 18, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重: 不重复。 按失败签名(host 身份判定 vs wire profile 分离、isCodexClient 双职责拆分)检索 open+closed issue/PR,无已有条目实现或覆盖此修复。相关条目仅机制相邻:#2733(strict-relay summary wire shape)、#150/#1106(instructions-fingerprint allowlist)、#3270/#3266/#3272(CCR/image-rescale disarm 来源)——均非同一机制,不构成重复。

标签: bug pi codex scope/wiring p2 — 缺陷类;受影响客户端为 pi(以 Codex UA 过 relay)与 codex 检测路径;缺陷位于客户端接入层的宿主身份判定;可用但有真实成本浪费(提前折叠+特性被误禁),故 p2。

独立审查进行中:方向/回归/代码/测试有效性/diff 逐项核对,CI 当前 pending。结论稍后按八问给出。

@ranxianglei
ranxianglei force-pushed the 2026-10-18_pi-codex-ua-host-policy branch from 9527233 to f37c820 Compare October 18, 2026 10:59
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-18_pi-codex-ua-host-policy (eea847c)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4718-pr.3696.61fc2a3

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-pr3696.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

Rebase 完成,冲突已解。分支 2026-10-18_pi-codex-ua-host-policy 现为单 commit f37c82036,直接落在当前 master(6d9620faa)上;PR 状态已从 dirty 转回可合并(当前 blocked 仅因 CI 在跑)。

八问:

  1. 是什么问题:本 PR 分支落后于 master(分叉后 master 前进了约 30 个 commit,含 v0.1.200 发版、feat(#3546): settings-panel toggles (imageRescale, absorb) + acp_ rename for read_original_image #3565 图片工具改名、根本原因立项:按 lane 名的大面积特判拷贝在 4 张 wire 适配器里各自漂移(#3293/#3401 同形 bug 家族),需要抽象重构 #3417/lane 统一决策点收尾:还剩四处按客户端名字自算的旁路要搬进来(#3417 待做) #3482 lane-decisions 注册表改造等),GitHub 判定 merge conflict。
  2. 什么原因导致的:双方都改了 src/server/handle.ts 的 CCR arming 区域——本 PR 把谓词从 isCodexClient 换成 isCodexHost(host policy),master 侧同期把注释里的工具名从 read_original_image 改成了改名后的 acp_read_original_image(feat(#3546): settings-panel toggles (imageRescale, absorb) + acp_ rename for read_original_image #3565)。纯文本级一行冲突,无跨分支语义抵消。
  3. 影响范围与严重程度:仅冲突解决本身;不引入任何超出 PR 原描述的行为变更。无用户面影响。
  4. 怎么修复的:rebase 到当前 master,按「意图并集」解决唯一冲突(src/server/handle.ts:1725-1732):保留 PR 侧的 isCodexHost 谓词与 [Pi] Codex-compatible User-Agent activates Codex-only compaction policy despite explicit native host identity #3686 注释(host 策略),保留 master 侧改名后的工具名 acp_read_original_image(PR 侧注释里的旧名是过期的,不保留)。其余文件(server.ts / prepare-responses.ts / lane-decisions.ts / codex-compact.ts / 新测试)自动合并后逐项核对过 diff,与 PR 原意图逐位一致——wire-profile 站点(preflight summary shape、sys/dev position preservation)仍走 isCodexClient,未误伤。
  5. 是否有回归问题:本地定向验证全绿——npm run typecheck clean;129 个定向测试通过:本 PR 新套件 tests/issue3686-pi-codex-ua-host-policy.test.ts(含 loopback e2e)+ lane-decisions-matrix / lane-decisions-b-class(master 新加的矩阵行与本 PR 的注册表改动共存无误,没有断言「plugin marker 下仍按 codex UA 匹配」的行)+ issue2733-preflight-codex-shape / codex-window-align / codex-models / issue3272-ccr-codex-lane-gate / preflight-compress-responses / codex-compact(+e2e)。高危模式逐项过:无阈值/时序/输出格式漂移,无 fail-fast 变吞错。全量回归以推送 head 上的远程 CI 为准。
  6. 是否破坏缓存:不涉及(rebase 未触碰缓存/重试/游标/去重键逻辑)。
  7. 是否改了设计方向:不涉及,PR 原方案(一个谓词拆分,站点重指向)原样保留。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已清除,等 CI 绿即可进入人工审核(identity/session-binding 类,按设计不走 auto-merge)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

独立审查结论:可合(待 CI 绿);需人工合并(触碰 identity/session-binding,auto-merge gate 按设计不通过)。

审查方式(独立于作者描述重做):全 diff 逐段通读;枚举全仓 isCodexClient/新谓词的全部使用点逐一归类(含作者清单外的 3 处);实际复现 ESM 循环声明(plugin.ts:21 → tag-echo-filter.ts:2 顶层读 CODEX_FORGED_HANDOFF_HEADER,循环成立);本地定向验证:新套件 7/7、相邻 7 套件 75/75(codex-compact / codex-window-align / issue2733-preflight-codex-shape / issue3272-ccr-codex-lane-gate / preflight-codex-headroom / codex-models / lane-decisions-matrix)、typecheck clean、build OK。head 9527233 的远程 CI 仍 pending,最终判定以 CI test lanes 为准。

① 方向(审原 issue):正确,打到根因。根因是一个谓词同时承担两种语义不同的决策(宿主身份 vs wire profile),修复是拆谓词+逐点重指,不是在某层过滤症状。拆分边界划对了:wire shape 跟随呈现的字节(#2733 relay 验证的是 presented bytes),host policy 跟随声明身份。作者未动的两处相邻点我独立核过:conflict-watch.ts:93 与 thirdparty-scan.ts:140 均先取 pluginAgent 优先、声明宿主根本走不到 UA 分支——不动是对的,不是遗漏。

结构化八问:

  1. 是什么问题:pi 插件宿主带着 Codex 形 UA 过严格 relay 时,bili 把它误判为 codex 宿主,套用整套 codex-only 压缩策略——最可见的是 preflight 在窗口 90% 就开始折叠(pi 没有原生 auto-compaction 可抢跑,每次提前折叠都是纯成本),CCR/image-rescale 还被误禁。
  2. 什么原因导致的:isCodexClient(UA sniffing)同时服务「谁在发」(宿主身份)与「呈现什么 wire 形状」(wire profile)两个决策;对带显式 x-bili-plugin marker 的请求,marker 才是权威身份,UA 只是 relay 兼容装饰,旧代码把二者等同。
  3. 影响范围与严重程度:仅影响同时带显式 marker 与 codex 形 UA 的请求(现实即 pi 过严格 codex relay);headerless 客户端(真 codex CLI 及所有其他)行为字节级不变。p2:可用,但该配置下持续成本浪费(提前折叠+特性误禁)。
  4. 怎么修复的:谓词拆分——isCodexHost(marker 优先,无 marker 回落 UA 检测)+ codexHealthBarApplies(host ∧ intercept 模式);7 个 host-policy 站点重指新谓词,lane-decisions wire-client 注册表 codex 条目加「无显式 marker」条件;2 个 wire-profile 站点(preflight summary shape、codexAlignedWindow)保持 UA 驱动。marker 名以本地字面量读取避免 ESM 环(环已证实存在,与 session-id.ts 同纪律)。
  5. 是否有回归问题:未发现回归。既有行为清单逐项:headerless 真 codex → 全部站点回落 UA 检测不变(control e2e 钉住);headerless 非 codex → 不变;声明非 codex 宿主且无 codex UA(正常插件流量主体)→ 新旧谓词皆 false,不变;preflight summary wire shape(192版本缓存命中率低codex #2733)→ 不变,strict relay 接受性由测试 7 钉住;sys/dev position preservation(pluginMode || isCodexClient)→ 被 pluginMode 覆盖,不变;codex-window-align 的 REQ: codex 压缩预算协调 + 匿名代理模式拦截伪造(根本解决方案) #321 PR-E1 契约(marker+codex UA → clamp)→ 不变,8/8 绿。有意变更(PR 正文均已披露):目标人群 preflight bar 0.9×limit → limit、forge/reconcile/compaction_trigger 特派//responses/compact 拦截不再适用、CCR+image-rescale 恢复武装、instructions-fingerprint keying 降为 verbatim。
  6. 是否破坏缓存:唯一影响——受影响会话(marker+codex UA)下次请求时从 fingerprint key 一次性重绑到 verbatim key,丢失该会话已积累 blocks 一次;这是 Responses instructions fingerprint should be an allowlist (codex/claude only), not a default — generic relay clients fork on every system-prompt change #1106 的文档化意图(plugin conversation id 本就该 verbatim keying),PR 正文已披露。重试/增量游标不受影响;headerless 客户端无线形状漂移、prefix cache 不受波及。
  7. 是否改了设计方向:无转向——既有「声明优先于观察」纪律(fix(responses): keep persona-scoped sessions stable across instruction drift #1104/fix: invert the Responses instructions fingerprint into a codex/claude-only allowlist #1107/Responses instructions fingerprint should be an allowlist (codex/claude only), not a default — generic relay clients fork on every system-prompt change #1106、根本原因立项:按 lane 名的大面积特判拷贝在 4 张 wire 适配器里各自漂移(#3293/#3401 同形 bug 家族),需要抽象重构 #3417 lane-decisions ①/② 分层)的一次纠偏实例,把一处混淆归位。
  8. 是否引入新配置:无。无新 env/config/CLI 面。

④ 测试有效性:新套件是真测试——谓词矩阵(含 array UA、token fallback、空 marker fallthrough、假设性 declared-codex)、control(真 codex 在两 bar 之间折叠:≥1 summary call 且全部 codex-shaped、block active)、bug pin(declared pi 同尺寸 → 恰好 1 次上游请求、零 summary call、无 fold)、#2733 pin(超满窗折叠且 summary call 保留 codex 签名,否则 strict fake relay 400)。band 算术确定(listen(0)、defaultCountTokens、实测 19.7K/18.2K 夹在 18K/20K 之间),本地复现 7/7。一个非阻塞缺口:preflight bar 之外重指的站点(CCR/image arming、compact-trigger dispatch、forge gate、/responses/compact gate)没有各自的行为级 pin——目前靠共享谓词单测+相邻套件(issue3272 钉的是 headerless codex 侧)兜底,未来若单点回退只能靠 code review 抓住;可在合并前后补,不影响本次判定。

⑤/⑤b diff 与代码整洁:单 commit、6 文件 +362/−11,每行都与 PR 目的相关,无无关改动/空白噪音;命名达意(isCodexHost/codexHealthBarApplies/declaredPluginAgent/BILI_PLUGIN_MARKER);import 列表同步整理(server.ts 移除不再用的 isCodexClient,prepare-responses.ts 因 :173 仍在用而保留两者);注释讲 why(拆分理由、ESM 环成因)且符合仓库风格。硬标准逐项通过。

Open item(codexAlignedWindow 保持 UA gating):同意作者的 defer 处理。我的建议:本 PR 内不改——它有自己钉死的契约(#321 PR-E1,五个 e2e 期望),窗口对齐语义是与身份修复分离的产品决策;若要改,单开小 PR(一行换谓词+更新期望)并在那里讨论取舍,不混入本修复。

收工判定:方向正确、根因修复、回归清单全过、测试有效、diff 干净——可合;等 CI test lanes 绿后由人工合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

补充(rebase 复核 + CI 状态 + gate-plugins 红叉说明):

1. 分支已 rebase 到最新 master,修复内容未变。 10:59Z head 从 9527233 变为 f37c820(父提交现为 master tip 6d9620f)。我逐行对比了两个 head 的 fix diff:6 个文件的改动逐字节一致,仅 hunk 行号平移,外加一行上下文是 master 自身在 handle.ts 注释里把 read_original_image 改名成 acp_read_original_image(非本 PR 改动)。上面的审核结论对新 head 全部继续有效。

2. CI 状态(新 head f37c820): 13 条侧车道全绿(real codex / codex-persona / pi-ws / dsh native+plugin / opencode / fake-codex / image / theorem / windows codex overlay / local-registry / artifact);主 CI 矩阵 18 腿中 17 腿绿,仅剩 test (ubuntu-latest, 24) 在跑;静态门禁与 guard 门全绿(kernel-guard、version-guard、config-surface-guard、lane-guard 等)。最后一腿绿即 CI 全绿。

3. ci-gate-plugins.yml 的红叉不是本 PR 造成的。 这是全仓已知现象:自 #3416 的 gate 工作流进 master 起,每次 push(含 master)都会多出一条「幽灵 run」——零 job、秒失败、annotations 404、run 名显示为原始文件路径。今天 master 自己的两次 push(runs 39119866740 / 39118844763)同样失败。该现象已有跟踪项 #3532(closed),我在那里补了最新证据并请求处置决定(重开,或注明「可接受噪声」)。它不在 required checks 里,不实际阻塞合并。

结论不变:CI 全绿后可合;需人工合并(identity/session-binding 类变更,auto-merge 门按设计不适用)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

CI 终局:主 CI(run 39121394573)completed/success——test / static-gates / guard 矩阵全绿(唯一非绿项 red-signal 是条件 job,无红信号时按设计跳过);加上此前已绿的 13 条侧车道,head f37c820 的 CI 全部绿。

最终判定:可合。本变更属 identity/session-binding 类,auto-merge 门按设计不适用,需人工合并;合并后 #3686 由 Closes 自动关闭。

PR 内遗留的唯一待决项(不阻塞合并):codexAlignedWindow 是否也改走 declared-host 判定——建议保持现状留待 owner 单独拍板,若要改另开小 PR。

@ranxianglei

Copy link
Copy Markdown
Owner Author

冲突

isCodexClient conflated two signals: which HOST is sending (codex-only
compaction policy) and what WIRE PROFILE it presents to the relay
(#2733 summary payload shape). A native Pi request that deliberately
carries a codex-shaped User-Agent for relay compatibility was read as
"host is codex" and inherited every codex-only policy — most visibly
the 0.9 preflight health bar, which starts compressing at 90% of the
window although pi has no native auto-compaction to race against.

Split the predicates in src/codex-compact.ts:
- isCodexHost: an explicit x-bili-plugin marker declares the host
  identity and outranks UA guessing; absent -> UA detection unchanged.
  The marker name is read directly (no plugin.js import: plugin.ts
  reaches this module's top-level constants through
  loop/tag-echo-filter.ts, so importing it back closes an ESM cycle
  and crashes on the TDZ of CODEX_FORGED_HANDOFF_HEADER; same
  literal-read discipline as session-id.ts / anon-provenance.ts).
- codexHealthBarApplies = isCodexHost && BILI_CODEX_COMPACT=intercept.

Host-policy sites now use isCodexHost: preflight overflow target
(server.ts), codexLane local-compaction reconcile + growth-fold nudge
caps, forge gate, /responses/compact gate (prepare-responses.ts), CCR
+ image-rescale arming + compaction-trigger dispatch (handle.ts), and
the lane-decisions wire-client registry's codex entry (explicit
markers are declared identities, not observed headerless clients).
Wire-profile sites stay UA-based (preflight summary shape, #2733);
codexAlignedWindow stays UA-gated per the #321 PR-E1 contract.

Tests: tests/issue3686-pi-codex-ua-host-policy.test.ts — predicate
matrix (string/array UAs, token fallback, blank markers, declared
codex), plus loopback e2e through a strict #2733-style relay: genuine
codex still folds at the lowered bar; declared pi at the same size
makes zero summary calls (the bug pin); declared pi past the full
window folds with every summary call keeping the codex wire shape.
@ranxianglei
ranxianglei force-pushed the 2026-10-18_pi-codex-ua-host-policy branch from f37c820 to c0ae98d Compare October 20, 2026 08:36
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

上游冲突已解决:分支已 rebase 到当前 master(1cec7add9)并 force-push 新 head c0ae98d9a,merge state 已转干净(mergeable=true,现等 CI)。这是本 PR(#3696)自身的维护操作,无新立项,查重不涉及。

冲突点(唯一一处):src/server.ts 的 preflightCompressIfNeeded —— master 侧的 #3450×#3738 完成量预留逻辑重写了 limit 的计算行,本 PR 恰好改其紧邻下一行的 codex 健康条阈值谓词(isCodexClient(...) && codexCompactMode()==="intercept" → codexHealthBarApplies(...)),两侧文本重叠。其余文件(codex-compact.ts / handle.ts / lane-decisions.ts / prepare-responses.ts)自动合并干净,已逐文件对照 master 复核 diff:全部是本 PR 原始意图的逐字叠加,无漂移;整支 diff stat 与原 PR 完全一致(6 文件,+362/−11)。

解法取双方意图的并集:保留 master 的 #3450 statedWall/completionReserve/min() 预留计算原样不动,在其下应用本 PR 的 codexHealthBarApplies 谓词与 #321/#3686 注释——两个机制各管各的量(预留管 wall、谓词管 host 身份),互不干涉。

本地定向验证(全量回归以远程 CI 为准):typecheck 干净;tests/issue3686-pi-codex-ua-host-policy.test.ts 7/7 + codex-compact / codex-compact-e2e / codex-local-compaction / lane-decisions-matrix / lane-decisions-b-class / fix-arm-headroom-clamp(#3450 的锚定测试)合计 116/116 通过。

八问:

  1. 是什么问题:本 PR 分支与 master 产生文本级合并冲突,PR 无法合入。
  2. 什么原因导致的:master 在 [Bug][dsh native] preflight fold target sits ABOVE the engine's own denominator (1048576 vs 1000000) and the upstream-stated window from a 400 never feeds it — 'deficit 0' forwards an over-window payload → context_length_exceeded kills the turn #3450 中改写了 preflight 里 limit 的计算,与本 PR 改动的相邻行(健康条谓词)在同一段代码上重叠。
  3. 影响范围与严重程度:仅阻塞本 PR 合入;对用户行为零影响。
  4. 怎么修复的:rebase 到最新 master,冲突处按「双方意图并集」手工解决(见上),force-push。
  5. 是否有回归问题:无。高危模式逐项过:[Bug][dsh native] preflight fold target sits ABOVE the engine's own denominator (1048576 vs 1000000) and the upstream-stated window from a 400 never feeds it — 'deficit 0' forwards an over-window payload → context_length_exceeded kills the turn #3450 预留计算逐字保留(fail-fast/阈值未动)、[Pi] Codex-compatible User-Agent activates Codex-only compaction policy despite explicit native host identity #3686 谓词语义不变、注释与代码事实一致;定向测试含 [Bug][dsh native] preflight fold target sits ABOVE the engine's own denominator (1048576 vs 1000000) and the upstream-stated window from a 400 never feeds it — 'deficit 0' forwards an over-window payload → context_length_exceeded kills the turn #3450 与 [Pi] Codex-compatible User-Agent activates Codex-only compaction policy despite explicit native host identity #3686 双方锚定套件全绿。最终判定以 CI 全量为准。
  6. 是否破坏缓存:不涉及——未触碰任何缓存/重试/游标/去重键。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

收工判定:冲突已清除,等 CI 绿后可合。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

刚用 API 复核过当前状态:冲突已不存在——

  • PR head c0ae98d9a 已 rebase 在最新 master 上(base 1cec7add9 == 当前 master tip,分支只领先这 1 个提交);
  • GitHub 判定 mergeable=true,mergeable_state=blocked(blocked 是「等 CI 检查」,不是冲突);
  • 新 head 的 CI:26 项 success、6 项进行中、15 项 skip,零失败。

如果你那边面板仍显示 dirty,是镜像同步滞后,GitHub 侧已是干净状态。现在只剩 CI 跑完变绿,之后由你合入即可。若你指的是别的冲突(比如某个具体文件或与其他在途 PR 的语义撞车),说一声位置,我马上查。

@ranxianglei
ranxianglei merged commit 76d4c7a into master Oct 20, 2026
24 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.660-master.76d4c7a (rolling master tag).

npm install -g billion-context@0.0.660-master.76d4c7a  # 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Pi] Codex-compatible User-Agent activates Codex-only compaction policy despite explicit native host identity

1 participant