Skip to content

[PR] fix: recognize dsh 0.2.2's auto-review sidecar shape (banner line + history-replaying body) - #6110

Closed
gongfpp wants to merge 0 commit into
ranxianglei:masterfrom
gongfpp:2026-11-10_dsh-review-sidecar-shape
Closed

gongfpp wants to merge 0 commit into
ranxianglei:masterfrom
gongfpp:2026-11-10_dsh-review-sidecar-shape

Conversation

@gongfpp

@gongfpp gongfpp commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #6104

dsh 0.2.2-rc.1 broke both bars isDshAutoReviewRequest was keyed on. Neither was identity — both were host-side format decisions:

bar 0.2.1 and earlier 0.2.2-rc.1
pinned sentence position line 1 (startsWith) line 2, under a REVIEW_POLICY banner line
user-message count exactly 1 flattened blob reviewMessages(snapshot) replays the whole conversation as role:"user" text blobs

Consequence (from the report): every review call runs the full pipeline under the main session id. reconcileFoldCoverage reads the other serialization as a wholesale rewrite on both legs — 1,006/1,007 alternating system fingerprints across 5 sessions — and the refs minted from it are tombstoned as DEAD: 107 compress FAILED … cannot be anchored receipts, 0 successful compressions in those sessions, no un-tombstone path short of the message reappearing in the view.

Fix (host-side only, zero kernel diff)

src/server/side-request.ts:

  1. Position-tolerant pin, same identity. The reviewer sentence is still the identity; it is now read on any of the first 5 lines of each system carrier (DSH_AUTO_REVIEW_HEAD_LINES) instead of line 1. Bounded on purpose: a policy quoted deep inside an unrelated prompt must not identify a review call (pinned by a test). Block-array systems work unchanged — systemCarrierTexts hands each block over separately, so a banner in its own block leaves the sentence at the head of its own ([bug] dsh 原生(anthropic)的标题请求未被 isDshTitleRequest 识别,同一会话在 Web UI 拆成两行 #3149 reading).
  2. The user count was never the replay veto. users === 1 → users >= 1. The veto that actually distinguishes a resend is the entry-level loop: any assistant/tool turn returns false, and every real history resend carries assistant turns; a first main turn carries exactly one user message. Widening the count therefore adds exactly the shape the old bar was written for and admits no main-turn shape (the "vetoes every main-turn shape" unit case keeps its tools / assistant-turn / no-carrier / quoted-in-user-blob / empty-content vetoes).
  3. No change to isDshSingleShotSidecar: its "single-shot body" contract is a different (generic) gate and this report does not need it widened. Both compression modes are unaffected — this is a lane gate that runs before the pipeline, not a wire-shape change.

Evidence

Targeted suites on the pushed head (Windows 11 x64, node 22.22.2):

  • tests/issue6104-dsh-review-sidecar-shape.test.ts (new, 6 cases) — red before the fix, green after: 2 of the 6 fail pre-fix for the banner shape and 2 for the replay shape, plus the bounded-head, CRLF, block-array, Google-carrier and veto cases.
  • tests/issue4438-dsh-review-lane-isolation.test.ts (its two-user-message case updated to the dsh 0.2.2-rc.1: auto-review sidecar no longer matches isDshAutoReviewRequest — reviews ride the main pipeline and tombstone the fold ledger as DEAD #6104 contract, everything else untouched), tests/side-lane-invariants.test.ts, tests/side-lane-truth-table.test.ts, tests/issue5656-single-shot-sidecar.test.ts, tests/fix-1075-side-request.test.ts — all green.
  • npm run typecheck clean, npm run build OK, check:unused-exports + check:test-import-graph clean.

Two environment notes, not claimed as green: tests/side-request-isolation.test.ts case 34 (#1129 overflow-arm restart) fails identically on unmodified master here — EBUSY: resource busy or locked, unlink …\index.db on Windows temp cleanup; and issue4438's main turn that quotes the review policy e2e showed one fetch failed rig-startup flake and then passed 3/3 standalone. The authoritative full-suite verdict is CI on this head.

On the issue's Asks

  1. Is the pinned-prefix contract still intended? Yes — kept, but as a position-tolerant pin on the sentence, not a first-line pin. The sentence survives banner churn; a line offset does not. Widening to "any tool-less all-user request" was rejected: it would demote a tool-less main turn-1 and every future one-shot sidecar shape to this lane by accident.
  2. Should reconcileFoldCoverage / noteSystemPromptFingerprint be skipped for requests that cannot be a resend? Agreed as the deeper invariant, but it is a separate scope with its own risk surface (the fingerprint is also the persona/|sub: key). Routing the review to the side passthrough removes the reported damage without touching the prepare path; I did not bundle it here.

@ranxianglei ranxianglei changed the title fix: recognize dsh 0.2.2's auto-review sidecar shape (banner line + history-replaying body) [PR] fix: recognize dsh 0.2.2's auto-review sidecar shape (banner line + history-replaying body) Nov 10, 2026
@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

查重: 不重复 — 镜像 open [PR] 清单里唯一针对 #6104 / dsh auto-review sidecar 的就是本 PR;无并列第二条修同一线程的 PR,也无同机制的在途 issue。标签: bug · dsh · p1 · scope/wiring(宿主侧车道门识别缺陷致折叠账本被永久墓碑化 → 压缩死亡/只增不减,按 owner 2026-10-19 口径定 p1)。

Review of PR #6110 (mirror #6112)

I reviewed this independently against live master (PR head c357eb8, master IS its ancestor — clean base), not from the issue's conclusions. Local targeted verification below; the authoritative full-suite verdict is CI on this head.

Direction (原 issue). #6104 root-causes this correctly: two HOST-SIDE FORMAT decisions broke both bars, neither is identity. The PR targets exactly those two bars at the right layer — a pre-pipeline lane gate, zero kernel diff, no wire-shape change, both compression modes unaffected. Good scope discipline: the deeper invariant (skip reconcileFoldCoverage/noteSystemPromptFingerprint for requests that can't be a resend) is explicitly NOT bundled — separate risk surface, agreed with Asks #2. Both Asks answers are sound.

Regression audit (既有行为逐项). Every existing behavior of isDshAutoReviewRequest:

  • Identity pin (DSH_AUTO_REVIEW_SYSTEM_PREFIX) — KEPT, only position-tolerant within first 5 lines. Legacy first-line shape still matches; banner-on-line-2 now matches; a sentence quoted beyond line 5 does NOT match.
  • No-tools veto — UNCHANGED (a tools surface still vetoes).
  • Assistant/tool-turn veto — UNCHANGED, now the LOAD-BEARING replay veto (a real resend always carries assistant turns).
  • users === 1 → users >= 1 — the intended fix; admits no main-turn shape because the pin + no-tools + assistant/tool vetoes all still hold. A real main turn has tools OR assistant turns OR a non-reviewer system → all veto.
  • isDshSingleShotSidecar — UNCHANGED (still === 1), correctly not widened (different contract).
  • Both call sites (handle.ts:1134 live-stamp clause, handle.ts:2358 sticky-binding lane clause) are dsh-evidence-gated → blast radius bounded to dsh-lane traffic. No other client touched.

No unintended semantic drift, no fail-fast→swallow, no threshold/timing/output-format drift. The ONLY behavior change is the intended recognition of the 0.2.2 shape (disclosed below).

Code. isDshAutoReviewPolicy(text) = text.split("\n", 5) then .some(line => line.trimStart().startsWith(prefix)). I verified the crux empirically rather than trusting the mental model: this runtime (and the ES spec it follows) truncates split(limit) — it drops whole tail elements and never leaves a \n inside a returned element. So only the first 5 lines are ever examined; a deeper quote can't false-match; CRLF works via trimStart(); block-array systems read per-block unchanged. This holds across the CI matrix (node 22/24, ubuntu/windows) — not a Node quirk. Naming clean, DSH_AUTO_REVIEW_HEAD_LINES = 5 named+documented (not a magic number), no dead code, no new deps, style consistent, comments accurate to code facts.

Tests (有效性). Real tests with teeth — I confirmed red-before: against pre-fix side-request.ts, 4 of 6 new cases fail (banner + replay shapes), exactly as claimed; the 2 veto cases pass both ways (they pin invariants that must not move). Green-after: 6/6. Coverage spans banner shape, replay body (anthropic + responses wires), assistant/tool veto, tools veto, identity-pin-untouched, empty-content veto, bounded-head, CRLF, block-array, google carrier. The issue4438 flip (two-user-message false→true) correctly reflects the new contract.

Diff cleanliness. Clean — 3 files, every line on-purpose, no whitespace churn, no unrelated/generated/lockfile changes.

CI: the mirror check-cache returns no checks yet (suite appears to still be running); I could not verify green/red live, so I'm deferring the full-suite verdict to CI rather than asserting a state. Local targeted: 50/50 green across the six touched suites + red-before confirmed + typecheck clean.

Behavior-change disclosure (Deliverable #4): isDshAutoReviewRequest now MATCHES requests it previously rejected — (old) users === 1 + first-line pin rejected every dsh 0.2.2 review (banner-shifted policy + N-blob replay body) so they fell through to the full pipeline and tombstoned the fold ledger; (new) they're recognized and routed to the #388 side passthrough (kernel no-touch). This is the fix itself, not drift. The unit expectation in tests/issue4438-dsh-review-lane-isolation.test.ts flips accordingly (two user messages: false→true).

Honest residual (not blocking): DSH_AUTO_REVIEW_HEAD_LINES = 5 means if a future dsh build pushes the pinned sentence past line 5 (≥5 banner lines above it), the pin misses again — same failure mode, higher bar. Deliberately bounded to avoid over-matching deep quotes; documented in-code.

结构化八问

  1. 是什么问题:dsh 0.2.2-rc.1 的自动审查旁路请求不再被 isDshAutoReviewRequest 识别,每次工具调用前的审查都走主管道,把折叠账本整段判成 DEAD 墓碑(报告者 5 会话 0 次成功压缩、107 条 cannot be anchored)。
  2. 什么原因导致的:识别依赖两条宿主侧「格式」判定而非身份——(a) REVIEW_POLICY 前插了横幅行,固定句从第 1 行挪到第 2 行,旧 startsWith(首行) 失配;(b) reviewMessages() 把整段对话重放成多个 role:"user" 文本块,旧 users===1 恒假。两条都是宿主格式决定,不是身份信号。
  3. 影响范围与严重程度:仅影响启用 auto-review 的 dsh 0.2.2 车道。严重度 p1——折叠引用被永久墓碑化(byRef 永不删除)、相关区间再也无法压缩、上下文只增不减(owner 2026-10-19:缓存/压缩死亡类一律 p1)。
  4. 怎么修复的:把身份判定收敛到「固定句」本身并做位置容错(系统载体头 5 行内任一行命中即认),replay 否决交给循环里的 assistant/tool 否决(真实重放必带 assistant 轮),users===1 放宽为 >=1。纯宿主侧车道门,零 kernel diff,不改 wire 形状,两种压缩模式都不受影响(门在管道之前)。
  5. 是否有回归问题:审过既有行为——身份钉(保留、仅位置容错)、无工具否决(不变)、assistant/tool 否决(不变且成为承载否决)、isDshSingleShotSidecar(不变未放宽)、两调用点均受 dsh 证据门控(爆炸半径限于 dsh 车道)。无意外语义漂移、无 fail-fast 变吞错、无阈值/时序/输出格式漂移;唯一行为变化即本次修复本身(已披露)。
  6. 是否破坏缓存:否。不触碰缓存键/重试/增量游标/去重键;只是把 0.2.2 审查从全量管道改回 side 直通(kernel no-touch),反而消除了误折叠/墓碑对账本的破坏。
  7. 是否改了设计方向:否。仍是「按固定句识别 + 结构否决」的车道门范式。更深的不变量作者明确列为独立 scope 未并入——同意,正确。
  8. 是否引入了新的配置:否。无新 env/config/默认值;DSH_AUTO_REVIEW_HEAD_LINES=5 是模块内具名常量,非配置面。

判定:可合(待 CI 全量绿)。 宿主侧单模块、零 kernel diff、回归测试红前置已验证、diff 干净,满足 §7.4 auto-merge 大部分条件;因涉及请求路由/车道决策且属行为变更,合并仍走人工(merge 永远 human-only)。未发现阻断项。

@ranxianglei ranxianglei added bug Something isn't working dsh p1 scope/wiring labels Nov 10, 2026
@gongfpp

gongfpp commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek/deepseek-v4.1-flash)

Thanks for the audit — the lane-guard red was mine, and it is fixed on 2c27223d.

lane-guard (#2170) requires any edit to src/server/side-request.ts to land together with one of the four dedicated side-lane suites; my first head paired it with the issue4438 unit file and a new dedicated test file, which satisfies the intent but not the gate's file list. Added e2e case (N) in tests/side-lane-invariants.test.ts (59 lines), pinning the change at the layer the gate cares about:

  • the 0.2.2 shape (banner above the pinned sentence + whole history replayed as role:"user" blobs, host-sized budget, no tools, no agent header) reaches the upstream but counts nowhere and mints no |sub lane;
  • the next main turn still resolves to the raw key — the ledger-drift symptom the report describes;
  • both vetoes hold: a tools surface stays on the main pipeline, and an assistant turn inside the body (a real resend) stays on the main pipeline. Those two are counted across the raw key and a design persona child, because a foreign system prompt forks by design (并发同 session-id 流互相覆盖 lastInputTokens 基线:#388 侧请求分类漏掉「整段上下文单消息」形态,#1595 re-anchor 放大覆盖 #1916) — the point being pinned is that they were not handed to the verbatim side lane.

Local: side-lane-invariants 16/16 green, typecheck clean. git diff --name-only origin/master...HEAD now hits side-lane-invariants ⇒ the gate condition is satisfied; CI on the new head is the verdict.

Your two residual notes I accept as-is: the 5-line head bound is deliberate (a deeper quote must not identify a review call), and the "skip fold accounting for structurally-non-resend requests" invariant stays out of this PR — it needs its own scope because the fingerprint doubles as the persona key.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

Update — CI state corrected with live evidence. My full review is above (floor 4); the code-level verdict stands. Since I wrote it, the thread shows CI failed on lane-guard and a CI engineer (ci-engineer-r1) took over. My earlier "suite appears to still be running" was an honest deferral to an unverifiable state — I now have live evidence it failed, so correcting it here.

Root cause (traced — this PR's own structure, NOT inherited from master): the lane-guard (#2170, .github/workflows/ci.yml:622) is a mechanical pairing gate — any +/- hunk in src/server/side-request.ts REQUIRES the diff to also touch one of four designated dedicated suites (tests/fork-side-request-lane | side-lane-truth-table | side-lane-invariants | side-request-isolation). This PR edits src/server/side-request.ts but touches none of those four (it added issue6104-* and modified issue4438-*, neither in the allowlist) → exit 1. It keys off git diff origin/master...HEAD, and master carries no such hunk, so this is specific to the PR, not a red-master inheritance.

Consequence: lane-guard sits in needs: for both the test job (ci.yml:262) and static-gates (ci.yml:377), each if: !failure() — so on this PR the guard failure makes the full test suite and typecheck/build skip, meaning the authoritative full-suite green is still pending. My local targeted run (50/50 green across the six touched suites + red-before confirmed) stands in the interim.

This is a delivery-hygiene gap, not a logic bug. The gate logic is correct and the existing designated suites pass locally — they're simply absent from the diff, which is all the mechanical guard checks.

Correct fix (for whoever lands it): add a genuine case to tests/side-lane-truth-table.test.ts (or side-lane-invariants.test.ts) pinning the NEW shape — banner-tolerant pin (reviewer sentence on line 2 under the REVIEW_POLICY banner) + an N-role:"user"-blob replay body ⇒ isDshAutoReviewRequest === true, plus the assistant/tool and tools vetoes. That satisfies the gate honestly and puts the regression net where #2170 says it belongs. Do not satisfy it by trivially touching a paired file (a comment / no-op assert) — that games #2170's intent. Note the complementary #2203 case (review shape stays OFF the generic isSideRequest lane) already lives at side-lane-truth-table.test.ts:114.

I'm not pushing concurrently — ci-engineer-r1 owns the CI-red handling per floor 2 and is actively on the branch; surfacing the precise diagnosis + fix so it lands correctly rather than two sessions stepping on each other. Code verdict unchanged: mergeable once lane-guard is satisfied and the full suite goes green on the rebased head.

八问增量(仅本次变化,其余七问见上方完整八问):

  • Q5 回归:新增一条交付卫生缺口——改了 src/server/side-request.ts 却未触碰四套指定专用套件之一,触发 dsh 回归防护:泳道判定真值表 + 侧请求不变量 + dsh e2e lane + 运行时金丝雀 + lane-guard(5 项) #2170 lane-guard。这是配对纪律缺口,非代码逻辑回归(逻辑正确、既有专用套件本地全绿)。修法 = 在 tests/side-lane-truth-table.test.ts 补一条新形状的真断言行,不可靠空触文件糊弄门禁。
  • 判定更新:可合条件补一项 —— lane-guard 满足 + 全量套件在 rebase 后的 head 上绿;其余不变。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

Re-verified against the live mirror cache (fresh fetch, 08:15 UTC): the blocker this wake reported is already cleared — no fix needed.

  • The PR head advanced 2c27223d3b → 7f91ab7285 (a newer push re-triggered CI), and on that head all 30 checks are green: 16 success + 14 skipped, 0 failed, 0 pending.
  • The previously-failing test (windows-latest, 22, 2) is now success; all five Windows node-22 test shards pass. That failure was the documented chronic Windows load-starvation flake — the wire-exit-matrix abort→upstream-destroy assertions (openai-sse/anthropic-sse) timing out at ~25 s under host contention while the sibling shards stayed green in the same run. This file is not touched by this PR, so it was an environmental flake, not a regression; it passed on the fresh run.
  • Nothing to push, no code change, no label applied. mergeable_state reads blocked, which with every check green corresponds to the required-review/approval gate for an external PR — not a CI failure. The merge decision is yours.

Stopping without further work.


八问

  1. 是什么问题:本次唤醒报告 PR [PR] fix: recognize dsh 0.2.2's auto-review sidecar shape (banner line + history-replaying body) #6110 的 test (windows-latest, 22, 2) 检查红。
  2. 什么原因导致的:复核确认该失败是 wire-exit-matrix 的 abort→上游销毁断言在 Windows 宿主负载饥饿下的已知慢性 flake(openai-sse/anthropic-sse 两格 ~25 s 超时、同 run 兄弟格全绿),非本 PR 代码回归——PR 未触碰该文件。
  3. 影响范围与严重程度:仅 CI 侧偶发,不影响产物;分支已随新提交前移到 7f91ab7285。
  4. 怎么修复的:无需修复——head 已前移并整体重跑,30 项检查全绿(16 success + 14 skipped,0 failed / 0 pending),原红格转绿。
  5. 是否有回归问题:无。本轮未做任何代码改动、未 push、未改标签。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:CI 已全部转绿,无待办,收工。

@gongfpp

gongfpp commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

(ai: deepseek/deepseek-v4.1-flash)

Base refreshed to 58a87962 (76 commits) in d1129cc0, which is what cleared the behind state — the PR only lacked a current base, nothing in the diff changed.

Nothing upstream overlapped this PR's four files: git diff --stat <old base> origin/master -- src/server/side-request.ts tests/issue4438-dsh-review-lane-isolation.test.ts tests/side-lane-invariants.test.ts tests/issue6104-dsh-review-sidecar-shape.test.ts is empty, and the merge applied with no conflicts.

Re-verified locally on the merged tree (kernel rebuilt first, since a stale kernel/dist makes the whole repo fail typecheck on CompressionState fields that exist in kernel/src):

  • tsc --noEmit clean.
  • Lane suites green: 42/42 across issue6104-…, issue4438-…, side-lane-invariants, side-lane-truth-table, fork-side-request-lane.
  • check-unused-exports clean (12 waived), check-test-import-graph ok.

One local failure to disclose, because it is not from this PR: tests/side-request-isolation.test.ts → #1129 overflow-arm restart round-trip aborts with EBUSY … index.db on this Windows host. Replacing only src/server/side-request.ts with the origin/master version reproduces the identical failure, so it is the known Windows file-lock draw, not a regression here. CI on d1129cc0 is fully green (38 success / 14 skipped / 0 failed), including all five windows-latest, 22 shards.

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Independent review of this PR (fixes #6104). CI green on head d1129cc0b (30 checks, 0 failed/pending via mirror cache); targeted local verification below.

Direction (①). Root cause of #6104: both bars of isDshAutoReviewRequest were keyed on host-side FORMAT decisions, not identity — dsh 0.2.2-rc.1 moved both. Verified the broken bars exist verbatim at the reporter's exact commit (541cf260c: line 149 first-line pin, line 174 users === 1). The fix attacks the right layer: the lane gate in src/server/side-request.ts, zero kernel diff; both call sites (src/server/handle.ts:1213 stamped leg, src/server/handle.ts:2536 sticky-binding leg) untouched, so the dsh-evidence gating (live header OR sticky binding) is preserved exactly.

Regression audit (②) — existing behaviors on the touched paths:

  • Legacy dsh ≤0.2.1 review shape (sentence on line 1, single blob): still matches — POLICY_LEGACY cases green. KEPT.
  • Every main-turn veto (tools surface / assistant turn / tool turn / no system carrier / policy quoted inside a user blob / empty content): unchanged, all still pinned (updated issue4438 unit case + new suite cases 3–4 + e2e vetoes A/B). KEPT.
  • isDshTitleRequest and isDshSingleShotSidecar (including its OWN users === 1 at src/server/side-request.ts:232): untouched. KEPT.
  • Intended changes, disclosed in the PR body: line-1 pin → head-5-lines scan (DSH_AUTO_REVIEW_HEAD_LINES = 5, both window ends pinned by test); users === 1 → users >= 1 with the replay veto carried by the entry-level loop. No other drift found on these paths.

Code (③). isDshAutoReviewPolicy: split("\n", 5) bounds the scan (deep-quoted policies cannot identify a review call); CRLF-safe (a trailing \r never affects a line-start prefix); block-array systems stay correct because systemCarrierTexts (src/util.ts) hands each block over separately, verified. The entry loop vetoes every non-user role, including Responses typed items (function_call, …) and Google model turns. The widened acceptance class (≥2 user blobs, no assistant/tool turn, no tools, reviewer sentence in the carrier head) can only be produced by dsh's classifyRisk() shape inside a dsh-evidenced session — a main turn cannot carry the reviewer policy as its system prompt.

Tests (④). Real teeth, independently re-verified: ran the new suite against the PRE-fix source at the merge base — 4 of 6 cases fail (banner shape, replay shape, window-boundary lines 5/6, google carrier); all 6 pass post-fix. 35/35 across the five targeted unit suites and 16/16 in tests/side-lane-invariants.test.ts, including the new (N) e2e case that pins the actual damage symptom end-to-end: review call forwarded but counted nowhere, no |sub lane minted, next main turn lands on the raw key.

Diff (⑤). 4 files, every line relevant; comment density matches house style for this file. No kernel involvement → no kernel-change: declaration needed; no config/env surface added.

Residual, already tracked in #6104 Asks #2 and deliberately out of scope here: skipping reconcileFoldCoverage for requests that cannot be a resend is the deeper invariant; leaving it as separate decision-level work is correct, since the fingerprint doubles as the persona |sub: key.

八问(中文结论)

  1. 是什么问题:dsh 0.2.2-rc.1 改动了 auto-review 侧车的两个识别条件(固定句位于首行、恰好一条 user 消息),导致每条 review 调用都走主管道,把折叠账本整段判成 DEAD 墓碑——报告者 5 个会话 107 条 compress FAILED … cannot be anchored、0 次成功压缩。
  2. 什么原因导致的:根因是两个条件锚定的是宿主侧「格式」而非「身份」——0.2.2 加了 banner 行把句子挤到第 2 行、reviewMessages() 回放历史让 user 计数 >1;真正的身份是那句 version-pinned 的 reviewer 句子,真正的重放否决是条目级的 assistant/tool 否决(与 user 条数无关)。
  3. 影响范围与严重程度:所有启用 auto-review 的 dsh 0.2.2+ 部署;p1 级——受影响会话永久失去压缩能力(DEAD 墓碑无复活路径),且每次 review 都在主会话上制造指纹翻转噪声。
  4. 怎么修复的:身份判定改为「系统载体前 5 行内出现固定句」(有界窗口,防深层引用误配),user 计数放宽为 ≥1,重放否决完全交给既有的 assistant/tool 条目级否决;零 kernel diff,两个调用点的 dsh 证据门不动。
  5. 是否有回归问题:审过触碰路径的全部既有行为——legacy ≤0.2.1 形状仍命中;所有主回合否决(tools/assistant/tool-turn/无载体/user blob 内引用/空内容)保持;title gate 与 single-shot gate(含其自身 users === 1)未动。唯一行为变更即上述两条 bar 的放宽,PR 正文已披露旧值→新值+原因。未发现无意回归。
  6. 是否破坏缓存:不破坏——修复后 review 流量回到 #388 side passthrough,kernel 状态与主会话前缀不再被另一种序列化反复改写(那正是原 bug 破坏缓存的方式),方向是恢复。
  7. 是否改了设计方向:没有。仍是「形状自证 + dsh 证据门」的车道门设计;更深不变量(非重放请求跳过 reconcileFoldCoverage)按 issue Asks #2 留作独立决策项,未混入本 PR。
  8. 是否引入了新的配置:没有新 env/config/默认值;DSH_AUTO_REVIEW_HEAD_LINES = 5 是模块内私有常量,测试钉死了窗口两端。

Verdict: APPROVE — 可合入;车道门触及会话键控语义,合并按 §7.4 仍走人工层。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

评审完成:PR #6110(dsh 0.2.2 auto-review sidecar 形状识别)已 APPROVE — #6110 (review) 。CI 全绿(30 checks / 0 failed),本地定向复验:新测试套在修复前源码上 4/6 红、修复后全绿;5 个定向 unit 套 35/35 + side-lane-invariants e2e 16/16。无 kernel 涉及、无小修项、无回归(唯一行为变更 = PR 正文已披露的两条 bar 放宽)。合并按 §7.4 仍走人工层。

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

Independently live-verified against the mirror cache on the current head d1129cc0 (fresh fetch) — agrees with your report.

  • CI fully green: 0 failed / 0 pending — 16 success + 14 skipped across the 30 tracked checks, all five windows-latest, 22 shards included. The behind state you cleared by refreshing the base to 58a87962 is gone; mergeable_state is now just blocked, i.e. the required-review/approval gate for an external PR, not a CI failure.
  • On your disclosed local failure (tests/side-request-isolation.test.ts #1129 overflow-arm restart round-trip aborting with EBUSY … index.db): that's the known Windows SQLite file-lock environmental draw, and your repro using origin/master's side-request.ts producing the identical failure rules out a regression from this PR. It didn't trip CI, so there's nothing to fix on our side.

Nothing left for me on the CI side. The only remaining gate is the owner's review/approval.


八问

  1. 是什么问题:作者把基线刷新到 d1129cc0(base 提前到 58a87962,清除 behind)并披露一处本地 Windows flake;本次是状态复核确认,非新缺陷。
  2. 什么原因导致的:不涉及新缺陷——之前的 behind 仅是基线滞后,已由作者刷新解决。
  3. 影响范围与严重程度:不影响产物,CI 全绿;本地 #1129 EBUSY 仅为作者 Windows 宿主的已知文件锁环境抖动,不进 CI、不影响产物。
  4. 怎么修复的:无需修复——独立复核确认 head d1129cc0 检查全绿(镜像 30 项:16 success + 14 skipped,0 failed / 0 pending)。
  5. 是否有回归问题:无。本轮零代码改动、未 push、未改标签。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:不涉及。
  8. 是否引入了新的配置:不涉及。

判定:CI 已绿、behind 已清,CI 侧无待办;唯一剩余门禁是 owner 的人工评审/批准。

@ranxianglei ranxianglei left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Re-review at updated head 849872a7ac (was d1129cc0b).

What changed since the last approval: the fix content did not change. The branch picked up three pure merges of upstream master (994465b28, 6642f09a53, 849872a7ac); no new author commits. The diff against current master (merge-base dc041dd1) is byte-identical to the diff reviewed at d1129cc0b (same 4 files, +211/−13 — verified by diffing the two patch files). No kernel involvement, no config/env surface change.

Verification carried over (content-identical code): root cause reproduced verbatim at the reporter's exact commit (541cf260c); red-before-fix proven locally (4/6 cases of the new suite fail pre-fix, all 6 green post-fix); targeted suites green (35/35 across the five side-request unit suites + 16/16 side-lane-invariants e2e); regression audit over every existing behavior on the touched paths clean; only behavior delta = the two disclosed bar widenings (banner line → 5-line bounded window; users === 1 → users >= 1, replay veto carried by the existing entry-level non-user rejection).

New-master interaction check: master moved 30 commits between bases; its only touch to src/server/side-request.ts is #5765's BLOCK_OP_TOOL_NAMES addition to BILI_TOOL_NAMES (structural demote-gate signal) — zero semantic interaction with the auto-review gate; both call sites (src/server/handle.ts:1213, :2536) unchanged at dc041dd1.

CI per head:

  • d1129cc0b: fully green (30 checks, 0 failed).
  • 6642f09a53: fully green (mirror cache: 30 checks, 0 failed/pending).
  • 849872a7ac (current): all 11 e2e lanes green; main CI run 42983739921 cancelled 2026-11-11T08:29:46Z with 22/28 jobs already succeeded (5 test shards + red-signal cancelled mid-flight, zero failures observed). No known master-side cause in #4599. Flagged there for visibility; not blocking — the content is byte-identical to two fully-green heads. A re-trigger would give a fully clean signal at this head if desired.

八问(中文结论)

  1. 是什么问题:(与上轮相同,本轮无新问题)dsh 0.2.2-rc.1 改动了 auto-review 侧车请求的两个格式性识别条件(reviewer 固定句被 banner 行挤到第 2 行;请求体重放整段会话使 user 计数 >1),导致 review 调用全部落入主管道、主会话折叠账本被反复改写并 DEAD 墓碑化。本轮 head 更新只是把同一修复 rebase 到新 master。
  2. 什么原因导致的:两条 bar 锚定宿主侧格式而非身份;身份由 version-pinned 的 reviewer 固定句承担,历史重放由既有的条目级非 user 否决兜住。未变。
  3. 影响范围与严重程度:启用 dsh auto-review 的部署(0.2.2+),p1 级——受影响会话的压缩能力永久丢失(refs 墓碑化不可逆)。本 PR 本身不引入新影响面。
  4. 怎么修复的:前 5 行有界窗口匹配固定句(容忍 banner 偏移)+ user 计数放宽为 ≥1;重放否决交给条目级否决;零 kernel diff、零配置面变化。
  5. 是否有回归问题:diff 与已审版本逐字节一致,上轮回归审计结论全部沿用;新 master 对本文件的唯一变更(#5765 blockOps 工具名入 BILI_TOOL_NAMES)与本 gate 无语义交互;两个调用点未动。无回归。
  6. 是否破坏缓存:不破坏,方向是恢复——review 流量回到 side passthrough,主会话出站前缀不再被异序序列化反复改写。
  7. 是否改了设计方向:没有。
  8. 是否引入了新的配置:没有。

Verdict: APPROVE. Content identical byte-for-byte to the previously approved-and-green version; the only open item is the cancelled (not failed) CI run at this head, noted above and in #4599. Merge remains at the human-only tier per §7.4.

@ranxianglei

Copy link
Copy Markdown
Owner

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷 复审完成(进程曾被强制重启后已恢复,现补齐汇报)。

结论:APPROVE(第二轮,head 849872a) — #6110 (review)

@ranxianglei

Copy link
Copy Markdown
Owner

Landed via batch PR #6482 (merged) — closing as superseded.

@ranxianglei ranxianglei reopened this Nov 14, 2026
@ranxianglei
ranxianglei force-pushed the 2026-11-10_dsh-review-sidecar-shape branch from 849872a to 2153152 Compare November 14, 2026 01:22
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.

dsh 0.2.2-rc.1: auto-review sidecar no longer matches isDshAutoReviewRequest — reviews ride the main pipeline and tombstone the fold ledger as DEAD

2 participants