Skip to content

[PR] feat: visibilityMarkers tri-state — model-only receipt delivery - #1708

Open
ranxianglei wants to merge 14 commits into
masterfrom
2026-09-29_model-only-visibility
Open

ranxianglei wants to merge 14 commits into
masterfrom
2026-09-29_model-only-visibility

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Closes #1701

Implements the owner-approved design from #1701: proxy-internal receipts (\u{1F4E6} [ACP] Compressed ..., \u274C [ACP] ... FAILED) become model-visible, client-invisible under the new model-only mode, so clients (Codex etc.) stop persisting and re-sending them.

Config surface

Field: compress.visibilityMarkers (existing field, type extended — no new key, no new section)

Before After
Type boolean boolean | "stream" | "model-only" | "off"
Default true unchanged (true ≡ "stream")
Legacy values true/false still accepted: true ≡ stream, false ≡ off
Invalid values non-boolean poisons the block non-mapping value poisons the block ("false", "STREAM", 0)

Why the existing surface could not express this: the boolean conflated two independent concerns — client-stream visibility vs model-side injection (#1701 fact 3). Mechanisms considered before extending it: a separate top-level switch (rejected: splits one concern across two places), env-var-only (rejected: not tierable per route/model like the rest of compress config), new compress.* sibling field (rejected: same field already owns the concern; tri-state keeps one knob). Migration: none needed — existing configs behave byte-identically.

Behavior changes (old → new)

  • No default change. Unset/true ⇒ stream: client stream and model-side injection exactly as today (both derived gates evaluate to the same booleans as the old !== false).
  • New opt-in model-only: zero receipt bytes in the client stream (success receipts AND intermediate failure retries); model-side injection unchanged (paired tool-call/tool-result was never gated; orphan marker message + JSON-lane developer item stay on); one visible ❌ line at terminal compression failure (repeated-identical-failure early break / max-rounds cap), because intermediate ❌s are now silent and the user needs exactly one trace of the terminal state.
  • off (≡ legacy false): double-off, semantics unchanged from legacy false.
  • Prompt silence clause (MARKER_SILENCE_CLAUSE) follows model visibility: on for stream + model-only, off for off. In model-only the model still sees receipts in same-request re-requests, so dropping the clause would re-trigger [Question] zocde调用子智能体的时候,子智能体有概率出错,导致子智能体停止工作 #862-style narration.

Scope: proxy lane only (streaming Responses/OpenAI/Anthropic/Google + JSON Responses). The plugin lane (host-embedded) takes effect where the proxy controls the response stream; its marker path is unverified per #1701 and will follow up separately. The proposal's optional add-ons (SSE-comment form, belt-and-suspenders filter extension) are NOT included — separate work.

Drive-by fix (labeled, unrelated to #1701)

tests/issue1086-chain-self-exemption.test.ts used rmSync without importing it — pre-existing ReferenceError on clean master (verified on a worktree of origin/master @ 8293a54: 21 tests, 1 fail). One-word import addition, own commit.

Pre-flight

  • npm run typecheck ✓
  • npm test: 3278 tests, 3266 pass, 0 fail, 12 skipped (e2e-gated) ✓
  • npm run build ✓ (dist-import-annotations OK)

Tests added (tests/visibility-markers.test.ts): tri-state parse round-trip + poison cases; merge deepest-wins; resolveVisibilityMode normalization; per-mode streaming-loop parity (marker present/absent, re-request pair intact, graceful completion); model-only terminal failure = exactly one visible ❌ receipt message preceding completion; off double-off at terminal failure; JSON-lane polarity split (developer marker on re-request, zero marker bytes in returned output); JSON cap-exit terminal marker.

Cache-prefix note: receipts live only within one request's re-request chain (never written to session state), so cross-turn client history and model view stay byte-stable by construction.

@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-09-29_model-only-visibility (99533f3)

Latest build — install this exact version

npm install -g billion-context@0.0.7308-pr.1708.ef7ce15

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
99533f3 billion-context@0.0.7308-pr.1708.ef7ce15 build
d79a758 billion-context@0.0.6819-pr.1708.2f2697c build
e09f4c1 billion-context@0.0.6524-pr.1708.1f64b6b build
b8ffe73 billion-context@0.0.6208-pr.1708.c5f4011 build
604d3c9 billion-context@0.0.6119-pr.1708.9b25097 build
52c9cd1 billion-context@0.0.6028-pr.1708.3a8a8f0 build
fc36721 billion-context@0.0.5860-pr.1708.545a416 build
133ada8 billion-context@0.0.5793-pr.1708.5bcd700 build
518c1df billion-context@0.0.5656-pr.1708.e243332 build
52f3996 billion-context@0.0.5608-pr.1708.d95c3ce build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr1708.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

[bot] 🏷 收到,开始 review PR #1708(visibilityMarkers tri-state)。按规范走:① 审原 issue #1701 → ② 回归审查 → ③ 代码审查 → ④ 测试有效性 → ⑤ diff 整洁度。先拉分支核对代码与 CI 状态,结论稍后回复。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 Review complete (branch pulled, code read end-to-end, drive-by independently reproduced, CI verified on final head). Verdict per gate:

① 原 issue(#1701)— 方向关 ✅

Implements the owner-approved design (floor 4「可以,动手」) faithfully. Verified all five gate points against the design: derived flags clientMarkers = (mode === "stream"), modelMarkers = (mode !== "off"); MARKER_SILENCE_CLAUSE follows model visibility (on for stream+model-only, off for off) — correct, since under model-only the model still sees receipts in same-request re-requests and dropping the clause would re-open #862-style narration. Scope correctly limited to the proxy lane; plugin-lane deferral and exclusion of the optional add-ons match the approved scope. Config surface: extends the existing compress.visibilityMarkers field (no new key/section) — owner sign-off predates implementation in #1701, so the discipline is satisfied.

② 回归审查 — 既有行为清单(逐项判定)

  1. Default / legacy true (unset): both derived gates evaluate to the same booleans as the old !== false → wire output byte-identical for existing users. 保持 ✓
  2. Legacy false: double-off, identical to old semantics. 保持 ✓
  3. Receipt lifetime: receipts live only within one request's re-request chain, never written to session state → cross-turn client history and prefix-cache stability preserved by construction. 保持 ✓
  4. Paired tool-call/tool-result injection: never gated in any mode — confirmed by the off test (tool still executes; pair rides the re-request while the orphan marker message is absent). 保持 ✓
  5. ACP 状态标记被拼接进用户消息文本块;跨会话代际 stale refs 压缩整批失败 #1029 inbound stripping / SSE structure / tool ids & ordering: untouched. 保持 ✓
  6. Terminal-failure ❌ marker: strictly new behavior, gated behind visibilityMode === "model-only" at both exits (src/loop/core.ts:920-930 max-rounds cap; core.ts:944-947 小模型(2B级)compress 循环空转:同参数重复失败烧满 10 轮 + 幻觉 ref + 摘要长度约束不遵守 #156 early break) and the JSON cap-exit (src/compress-loop-responses.ts:217-221). Zero change to stream/off paths. 有意变更,已在 PR 正文披露 ✓
  7. Silence-clause polarity: 有意变更,已披露(理由见 ①)✓
  8. Hot-file contention: ⚠️ [PR] refactor: extract prepare*/inject* pipelines into src/server/ (#1440) #1449 (extract prepare*/inject* pipelines into src/server/) rewrites exactly the functions this PR threads visibilityMode through — whoever lands second takes a semantic rebase. Recommend merging [PR] feat: visibilityMarkers tri-state — model-only receipt delivery #1708 first, or rebasing [PR] refactor: extract prepare*/inject* pipelines into src/server/ (#1440) #1449 onto it. fix: bounded transparent retry for fail-fast transport failures on the main model-request path (#1688) #1693 also touches src/server.ts (+4/-2, retry region) and CONFIGURATION docs (+2/-2) but does not overlap this diff's regions. Not a blocker for this PR.

③ 代码审查 — 主关 ✅

  • resolveVisibilityMode normalization correct; its lenient fallback-to-stream is safe only because config.ts parse poisons non-mapping values ("false"/"STREAM"/0/null) — poison cases verified in tests.
  • Streaming terminal paths: 小模型(2B级)compress 循环空转:同参数重复失败烧满 10 轮 + 幻觉 ref + 摘要长度约束不遵守 #156 early break reports failedMutating[last] (guaranteed a FAILED compress/decompress by the break condition failedMutating.length === proxyResults.length); the cap-exit scans the final round's proxyResults reversed for a FAILED mutating call. Both emit exactly one marker (intermediates are silent in model-only), then completion. Edge case handled sanely: if the final capped round had no failed mutating call, no marker — correct, since the terminal state isn't a failure.
  • JSON lane: terminalFailed is tracked across all rounds (right choice — the cap-exit has no round-local scope), one assistant message appended at cap exit; re-request developer item keeps model polarity (!== "off").
  • src/server.ts wiring consistent across all eight withMarkerIntegrityNote sites and injectSystem (default "stream"); grep confirms no stale raw visibilityMarkers reads outside the config field itself.

④ 测试有效性 — 质量关 ✅

The 14 new tests have teeth: they assert actual wire bytes (zero [ACP] bytes in the client stream under model-only; unique-id counting proving exactly-one marker; marker ordering vs the completion event; fetchCalls cadence distinguishing early-break from cap-exit) and inspect the actual re-request bodies (off-mode: orphan marker absent from the wire while the tool pair is present). Deterministic — fetch mocks, no ports, no env luck.
Drive-by independently reproduced: master's tests/issue1086-chain-self-exemption.test.ts fails with ReferenceError: rmSync is not defined (line 728); the PR's one-word import fix makes it pass 21/21. Legitimate pre-existing breakage, own labeled commit — good hygiene.

⑤ diff 整洁度 ✅(一处已直接修掉)

Clean except three lines of indentation drift introduced on changed lines (src/server.ts:3354 at 16 spaces, :3581/:3810 at 12, siblings at 8). Fixed directly on the branch in whitespace-only commit a3a3f2a0 (style: align indentation…, git diff -w empty) — no logic touched.

Pre-flight & CI

Local: typecheck ✓, build ✓ (dist-import-annotations OK), targeted suites ✓. Full CI on final head a3a3f2a0: 13/13 green (test matrix ubuntu/windows × Node 22/24, e2e, hermetic registry e2e, real dsh/opencode/pi/codex lanes, build-artifact, codex MCP overlay, version-guard).

Conclusion: no regressions found; all intentional changes disclosed; mergeable once you merge (merge stays human-only per repo rules — I did not merge). Only follow-up worth noting: sequence #1449 against this PR (see ②.8).


中文摘要: 实现了 #1701 拍板的 visibilityMarkers 三态(stream/model-only/off),默认行为字节级不变、model-only 下回执对客户端零字节且终态恰好一条 ❌;审查未发现回归,顺手修了 3 行缩进漂移(commit a3a3f2a),CI 13/13 全绿,可以合并。

@ranxianglei
ranxianglei force-pushed the 2026-09-29_model-only-visibility branch from a3a3f2a to 48c1709 Compare October 24, 2026 20:06
@ranxianglei ranxianglei changed the title feat: visibilityMarkers tri-state — model-only receipt delivery [PR] feat: visibilityMarkers tri-state — model-only receipt delivery Oct 24, 2026
…ster red)

The unused-exports CI job fails on this branch with
INTERNAL_ONLY src/agent/client-build-note.ts: ClientBuildCheck — an
inherited failure: the file is byte-identical to master tip 146b34f,
where the same job fails with the identical line (#4545 train added a
type-only export the de-export sweep missed).

One-word fix per the few-line CI-fix discipline: remove the leading
export; the type remains used inside its own file. Local gates:
unused-export clean (6 waived), tsc --noEmit green.

Duplicates PR #4606 commit 1 (root fix vehicle); drop this commit when
rebased after #4606 merges.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI auto-fix lane (attempt 1/2): the failing unused-exports check is fixed on this PR branch — new head 52f3996a3, pushed.

The red line was: INTERNAL_ONLY src/agent/client-build-note.ts: ClientBuildCheck.

结构化结论(八问)

  1. 是什么问题:本分支检查矩阵红在 unused-exports,但红的不是本 PR 的代码——是继承自 master 的 CI 失败。
  2. 什么原因:master tip(146b34f27)上,[PR] dsh lane: note in-session when running an unverified @deepseek-ai/dsh client build (soft, exact-match) #4545(client-build note)落地时把 ClientBuildCheck 留成了导出,而它的全部引用都在定义文件内部(type-only export,de-export sweep 漏网)。master 自己的 unused-exports job 报同一行错误;本 PR base 就是该 tip,原样继承。本 PR diff 完全不碰该文件;两棵树 grep 比对:ClientBuildCheck 全仓共 5 处引用、全部在同文件内。
  3. 影响范围与严重程度:仅 CI 检查信号,零用户面行为变化;严重度 = 阻塞合并(矩阵红),非功能缺陷。
  4. 怎么修复的:一词修复——去掉 src/agent/client-build-note.ts:32 行首的 export,类型保留供文件内部使用。按本轮 master 红风暴的小修先例([PR] fix(storage): block interval bounds survive post-fold resaves (#4592) #4607/[PR] feat: host-stable tool-unit id side channel — ingress half (#2938 Tier-1 Increment 1; supersedes erroneously closed #298 | feat: host-stable tool-unit id side channel — ingress half (#2938 Tier-1 增量 1;接替误关的 #2981) #4615/[PR] fix: verify responder identity before claiming a settled proxy origin (#4125) #4622 等同样处理)以独立标注 commit 推到 PR 分支;该 commit 与根治载体 PR [PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) #4606 的 commit 1 重复,[PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) #4606 合入后 rebase 时丢弃即可。
  5. 是否有回归问题:无。该符号无任何外部引用(两棵树 grep 验证);本地 tsc --noEmit 全绿;gate 脚本输出由 1 处发现变为 clean(waived 集合不变)。wire / 配置 / 持久化语义零改动。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

遗留风险提示:master 还有另一处继承红(LIVE_FILES 护栏——tests/issue3890-parent-gone-confirm-drain.test.ts 未登记进 scripts/live-files.mjs,test lane 会在跑测试前直接 abort),重触发时 test lane 可能因此红;它同样在 #4606 的修复集里,本次 auto-fix lane 按范围纪律未动。#4606 合入后 rebase 本 PR 即可一并解决。

结论:本轮目标检查(unused-exports)已在分支侧修复,新 head 52f3996a3,等 CI 重触发;若 test lane 因上述另一继承项红,请待 #4606 合入后 rebase。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI auto-fix lane(attempt 2/2,最后一次):判定为继承性失败,不在本分支继续修,停止。分支保持 attempt 1 的 head 52f3996a3 不动。

本轮红条 = 全部 11 个 test 分片。已直接拉取 ubuntu 与 windows 两侧 job 日志核对:零真实测试失败——每个分片都死在跑测试前的 pretest 自检,报错行逐字一致:

process-spawning test files missing from LIVE_FILES in scripts/run-ci-tests.mjs: tests/issue3890-parent-gone-confirm-drain.test.ts

结构化结论(八问)

  1. 是什么问题:test 车道全红,但红的不是本 PR 的代码——是继承自 master head(146b34f27)的常红(CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 盘点第 2 条,LIVE_FILES tripwire)。
  2. 什么原因导致的:master 上的 tier-5 train 落了一个会起子进程的测试文件却没登记进 LIVE_FILES(tests/claude-native.test.ts linux live-E2E subtests fail/hang in shared multi-agent sandboxes #1248 门禁「未登记即 fail」),tripwire 直接杀掉所有分片、一行测试都没跑。更深一层:tripwire 修掉后还会显形一批 born-red 用例(约 35 用例 / 11 机制,如 tests/generation-boundary.test.ts:129 少传第 9 参)——所以「分支内补一行登记」也换不来 test 车道变绿。
  3. 影响范围与严重程度:仅检查矩阵信号,零用户面行为变化;严重度 = 本 PR 在 master 治愈前无法过 CI。舰队层面:CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 哨兵已上报合并死锁(required checks 覆盖全部 test 分片 × born-red 集群 ⇒ 当前没有任何 PR 能走正常按钮合并,包括修复载体 [PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) #4606 本身),决策请求已在 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 等 owner 拍板。
  4. 怎么处置的(为何不修):根治载体 PR [PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) #4606(head 6d6ebb7d1f9,open)四个提交已覆盖全部四条 master 常红且自身相关检查已确认绿;它合入后本 PR rebase 到 master + 重触发即绿。登记动作按门禁要求需先做 tests/claude-native.test.ts linux live-E2E subtests fail/hang in shared multi-agent sandboxes #1248 并发假设评审(归 [PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) #4606 所有),且单独修 tripwire 会让 born-red 集群在本分支显形、超出 auto-fix 车道范围——按本轮风暴的统一先例([PR] fix: report fold-substrate vacuum instead of staying silent (#2438 F1-a) #4617/[PR] fix: HTTP-lane egress byte budget so image-dense sessions stop 503-looping (#3909) #4623/[PR] fix: fork adoption no longer gives up permanently on 409 SNAPSHOT_UNAVAILABLE (#3011) #3024/[PR] fix(release): label-gated head-tree publish for conflicted carve-out ship PRs #4596 等同签名处理)不夹带重复小修。attempt 1 的 unused-exports 一词修复(52f3996a3)保留在分支,[PR] fix(ci): clear the two master-red gates in one branch — unused-exports (#4602) + the #3890 LIVE_FILES tripwire (#4604) #4606 合入后 rebase 时丢弃即可。
  5. 是否有回归问题:无——本次未向分支推送任何新代码,分支自 52f3996a3 起无变化。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

收工判定:本条红 = 继承性失败,非小修可及(完整愈合需 #4606 的四提交集 + owner 解锁死锁)。不开新 issue(tripwire 已有 #4604 跟踪、修复集在 #4606、死锁决策在 #4599)。后续路径:#4606 合入 → 本 PR rebase → 重触发,预期全绿。

ci-check added 5 commits October 25, 2026 10:10
…solution)

Union at the runCompressLoop call site: keep master's new 'reply'
(handoff-reply, #4248) plus this PR's 'visibilityMode' tri-state.
Merged loop options accept both (reply?: HandoffReply / visibilityMode?: VisibilityMode).
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

上游冲突已解决:master(931c66a2f)已合入本 PR 分支,新 head a489ac89d,已推送。真实冲突只有一处,机械化解(两个正交新字段的并集),无需设计决策,故未开 decision-request issue。

冲突点:src/server/relay.ts 的 runCompressLoop 调用点参数列表被两侧独立改动——master(#4248 handoff-reply)新增传 reply,本 PR 把 visibilityMarkers 换成三态 visibilityMode。合并后的 loop options 类型两者并存(reply?: HandoffReply + visibilityMode?: VisibilityMode)→ 取并集:reply 保留、visibilityMode 保留。其余文件(config.ts 三态解析、loop/core.ts、CONFIGURATION.md en+zh)全部干净自动合并。

语义交叉核对(hot-file 纪律):合并后全仓 grep 所有 usage——每个 withMarkerIntegrityNote / injectSystem 调用点传的都是真布尔 visibilityMode !== "off"(无原始字符串→布尔强转漏洞,JS 里 "off" 是 truthy,这类洞会静默翻转 silence-clause 极性);config.ts 三态解析(boolean + 三个字符串、其余值 poison)完整保留;master 侧新增模块 src/server/handle.ts:2415 同样走 resolveVisibilityMode。四个 prepare-* 模块的 visibilityMode: VisibilityMode 类型化传参(本 PR 的接线)在合并后全部存活。

Pre-flight:typecheck ✓ · build ✓(dist-import-annotations OK)· tests/visibility-markers.test.ts 15/15 ✓。全量回归交 CI。

结构化结论(八问):

  1. 是什么问题:本 PR 分支落后 master 约两个月,同一调用点参数列表被两侧各自演进,merge state dirty,PR 无法合并。
  2. 什么原因导致的:两侧对同一行做了不同方向的改动(master 加 reply 字段 / 本 PR 换 visibilityMode),文本重叠产生单个冲突 hunk。不是语义碰撞:两字段正交,合并后签名同时接受两者。
  3. 影响范围与严重程度:纯分支卫生,零用户面行为变化;严重度 = 合并路径被堵(dirty),现已恢复。
  4. 怎么修复的:merge master(而非 rebase——保留分支既有历史,含 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 哨兵 ci-fixes sweep 提交),唯一冲突点取两字段并集,另做全仓 visibility 接线点审计确认无强转洞。
  5. 是否有回归问题:无。审过的既有行为:默认/legacy 行为不变(本 PR 自身已披露默认字节级不变);本轮仅新增 reply 透传(master 侧增量,[PR] fix: Save and export the latest assistant reply in the handover document | fix: 交接文档保存并导出最新一条助手回复 #4248 已合入 master);无语义漂移、无阈值/时序/输出格式变化、无 fail-fast 变吞错。
  6. 是否破坏缓存:不涉及——回执仍只存在于单请求内 re-request 链,缓存前缀机制不受本次合并影响。
  7. 是否改了设计方向:不涉及。
  8. 是否引入新配置:不涉及。

CI 提示:分支现同时含 ci-fixes tip d0166c9f1(哨兵报告 26/26 全绿)与 master 931c66a2f。注意 #4599 刚登记一条 master 继承红(tests/storage-unified.test.ts 两条 parity 断言,纯 master 本地可复现,疑与 #4725 的 -1 sentinel 相关,归 #4757 簇)——若重触发后这两条按同签名红,请按继承性在 #4599 车道处理,本车道不重复修。

结论:冲突已解、分支已推(a489ac8),等 CI 重触发与 owner 合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

冲突

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

收到「冲突」——已核验,当前不存在文本冲突:PR 分支头已完整包含 master 尖。

证据链(三层):

  1. origin/master 尖 = 9b6ec2345,PR head = e09f4c169;git merge-base --is-ancestor 确认 master 是 PR head 的祖先(上一轮合并已带入);
  2. 本地 git merge-tree --write-tree 干跑(PR head × master):输出单个干净树哈希、exit 0、零冲突条目——合并是 no-op;
  3. GitHub API(单次 GET):mergeable: true,mergeable_state: blocked,head e09f4c169 / base 9b6ec2345。

解读:blocked ≠ dirty。blocked 表示分支保护要求未满足(评审批准 / 必需检查未齐),不是文本冲突;若镜像页仍显示「冲突」,那是我上轮推送(a489ac89d → e09f4c169)之前的陈旧状态,下次同步应翻回干净。

如果你说的「冲突」指别的东西——某个具体 CI 分片红、或与另一条分支(release lane / bugfix 车道)的冲突——告诉我具体 ref 或症状,我按那个方向查。

结论:分支侧无需动作;等你确认所指 + CI 跑完即可推进合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

结论:当前无文本冲突,无需 rebase/merge/push——master 已完整包含于本 PR head,PR 处于可合并状态(仅待评审/必需检查解锁)。

核验证据(全部基于远端权威 SHA,非本地陈旧 checkout):

  • 远端 master = 9b6ec2345(git ls-remote),PR head = e09f4c169;merge-base(head, master) = master 本身 ⇒ master ⊆ PR head。master 自 floor 19 合入后未再前进。
  • git merge-tree --write-tree e09f4c169 × 9b6ec2345 = exit 0、干净树哈希、零冲突条目 ⇒ 文本层面无任何冲突;此状态下 git merge origin/master 是字面 no-op("Already up to date"),不产生新提交,故不推送(避免触发无意义 CI 重跑)。
  • GitHub API(单次 GET,实时):mergeable: true,mergeable_state: "blocked"(≠ dirty/conflict),base master@9b6ec2345,head e09f4c169。blocked 的含义是分支保护要求未满足(评审批准等),不是文本冲突。
  • 镜像缓存 CI(sha e09f4c169):11/11 test 分片 + static-gates + mysql-contract 全 success(其余 skipped)。

关于再次触发:本 PR 的 head 与 master 自 floor 21(2026-10-27 17:00,当时同样判定「无文本冲突、blocked≠dirty」)以来均未变化,merge-guard 却再次以 reason=conflict 触发——两次输入完全相同、结论不同,指向 guard 侧读到的是 GitHub 异步重算 mergeable_state 时的瞬时/陈旧 dirty 值,而非分支侧存在真实冲突。分支侧无任何可修对象。按纪律此处不开新 issue(尚不能确证是 guard 缺陷而非单次瞬态),先在此留痕;若该 guard 对同一未变化的干净 head 持续误报,建议查一下其 conflict 检测是否消费了瞬态 mergeable 缓存。

收工判定:分支侧无需动作,等评审/必需检查解锁即可合并(合并权在 owner)。

…conflicts)

Merged origin/master (58e61a3, +121 commits) into the PR #1708 branch
2026-09-29_model-only-visibility. Two content conflicts, both confined to the
import block of the two prepare lanes — resolved as a union of orthogonal
additions (no logic change):

  src/server/prepare-openai.ts
    + import type { VisibilityMode } from "../compress-settings.js"   (this PR)
    + import { effectivePromptCacheRouting } from "../config.js"      (master #5079)
  src/server/prepare-responses.ts
    compress-settings import gains `type VisibilityMode`              (this PR)
    config.js import gains `effectivePromptCacheRouting`             (master #5079)

All other hunks auto-merged cleanly in separate regions: this PR's
visibilityMode call-sites and master's prompt_cache_key routing /
resolvePromptCacheKey sessionId param do not overlap.

Local pre-flight on the merged head: typecheck OK, build OK (dist-import-
annotations OK, dist-external OK), tests/visibility-markers.test.ts 15/15,
tests/issue5079-pck-default-off.test.ts 8/8,
tests/issue3813-responses-pck-ablation.test.ts 2/2. Full-suite verdict is the
remote CI test lanes on the pushed head.

Resolves the merge-guard conflict trigger for PR #1708.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) 冲突已解决并推送:把 origin/master(58e61a3d5,+121 commit)merge 进 PR 分支,两处 import 块冲突按「正交新增取并集」处理——prepare-openai.ts 同时保留本 PR 的 VisibilityMode import 与 master #5079 的 effectivePromptCacheRouting import;prepare-responses.ts 的 compress-settings import 补上 type VisibilityMode、config.js import 补上 effectivePromptCacheRouting(无任何逻辑改动,其余 hunk 各自在不同区域自动合并)。本地预检全绿:typecheck ✓ build ✓ tests/visibility-markers.test.ts 15/15、issue5079-pck-default-off 8/8、issue3813-responses-pck-ablation 2/2。PR 头现为 d79a758,GitHub 侧 mergeable=true。说明一点:master 在我这轮操作期间又前进了(现 tip 09a5b5b),我用 merge-tree 对新 tip 复核过——依旧干净、无新冲突,因此没有再追这个每几分钟就动的目标(追也追不上,且会无限循环);当前 CI 已在跑(30 项 check,暂无失败),如需完全对齐最新 master 可在合并前再同步一次。

Merged origin/master (c0fa5b2) into PR #1708 branch 2026-09-29_model-only-
visibility per the merge-guard "behind" sync request. Clean auto-merge — no
conflicts, no manual resolution. Master's new commits did NOT touch
src/server/prepare-openai.ts or src/server/prepare-responses.ts, so this PR's
visibilityMarkers feature code is byte-identical; the sync only pulls master's
unrelated work forward.

Local pre-flight on the synced head: typecheck OK, build OK (dist-import-
annotations OK, dist-external OK), tests/visibility-markers.test.ts 15/15,
tests/issue5079-pck-default-off.test.ts 8/8,
tests/issue3813-responses-pck-ablation.test.ts 2/2. Full-suite verdict = the
remote CI test lanes on the pushed head.

Brings the branch current to reduce drift ahead of merge.
Pull e5e2108 (master) into the PR branch. Master added the #4521
statusLine block into prepare-openai.ts / prepare-responses.ts in the
same nudge-injection region as this PR's visibilityMode call-sites; the
two changes are orthogonal and auto-merged cleanly (both retained).

Verified on the merged tree: typecheck, build, visibility-markers
(15/15), issue5079-pck-default-off (8/8).

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

Projects

None yet

1 participant