Repository navigation
[PR] fix(conflict-watch): stop native compaction landings from lighting the conflict banner (#5767, #5786) - #6355
ranxianglei wants to merge 4 commits into
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10767-pr.6355.3fdf415This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6355.tgz
npm install -g packageInstall instructions are refreshed on each push. |
d79be66 to
14b83ca
Compare
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Duplicate check: not a duplicate — this is the fix PR for the root-cause batch (aggregation thread #6264), covering two source issues with one user-visible symptom (conflict banner lit for the client's own compaction housekeeping) and two distinct mechanisms (#5767 Claude Code native compaction attribution, #5786 recovered id-churn-adoption framing). It supersedes PR #5787 (cherry-picked with authorship preserved). This is a [PR] thread — the work is already done upstream. I'm now pulling the branch, verifying the code, and checking CI status. Will report the full review conclusion shortly. |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) PR #6355 review — code verified clean; branch state is broken (force-pushed backwards). Code (both commits reviewed against current master):
CI / branch state (live-verified):
Verdict: the code is merge-ready in content (coherent, mirrors the dsh-lane discipline exactly, real tests), but the branch state is broken — the 13:11:43Z force-push reverted the branch from the green, master-merged 八问(中文):
判定:代码内容可合并,但分支需先重新同步到 master 才能合并。 |
1222da6 to
88b7dcb
Compare
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved + red What I did this run (CI engineer lane, attempt 1/3):
Final branch: 结构化八问(中文)
判定:冲突已解、红项已修,PR 处于可合并状态( |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Status update — the branch has since been fixed; my earlier "branch is broken" claim is now stale. While I was reviewing, the branch was re-synced to master (rebased, not merge — cleaner linear history). Live-verified current state:
Net verdict: the code is correct and the branch is now properly synced to master and mergeable. Once the last 6 CI lanes land green, this is ready for human merge. No further action needed from me on the branch. 八问(更新):
判定:代码正确、分支已同步到 master 且可合并;等最后 6 条 CI 车道全绿后即可由人工合并。 |
[ework] CI fix verified green ✓ |
88b7dcb to
ff5c196
Compare
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved — PR is back to mergeable (state What I did this run (CI engineer lane, attempt 1/6):
CI status (honest): the mirror cache is stale in this run (frozen at 结构化八问(中文)
判定:冲突已解、PR 回到可合并状态( |
…he conflict banner #4131 added the `id-churn-adoption` ConflictKind (fold-reconcile re-mints and re-anchors ids across builds, 0 unmatched, NO compaction boundary) but only wired the recording side. Both display classifiers still treated it as an unexplained signal: - web banner severity (bili_conflictSeverity) dumped it into the residual signalN, so a pure id-churn-adoption ledger read landed=true and lit the alarm banner even though the event is fully recovered by design (#3235 policy: recovered stays quiet). - formatConflictSection framed a pure id-churn-adoption ledger as "something OUTSIDE bili touched this conversation" + "[suspected] confirm each named plugin", pointing the user at a phantom second compressor. Carve id-churn-adoption out of signalN (it joins the neutral/recovered bucket) and give formatConflictSection a dedicated churnAdoptOnly header + advice ("bili itself re-minted and fully re-anchored the ids; no second compressor, nothing to act on"). Mixed ledgers still alarm on genuine unannounced-rewrite/orphan signals. Behavior change (old -> new): a session whose only conflict evidence is a recovered id-churn-adoption event PREVIOUSLY showed the web alarm banner and the /acp panel framed it as an outside rewrite; NOW it stays quiet (banner hidden) and is framed correctly. Still recorded in acp_status/stats. Scope: this PR is deliberately limited to the id-churn-adoption variant of the recurring "Compression conflict banner" symptom. The unannounced-rewrite variant (dsh/claude native-compaction landings) is a different mechanism and still alarms by design pending separate attribution work -- untouched here. Closes #5786 (cherry picked from commit 4a96bad) (cherry picked from commit 3c7adee)
…nthropic lane rewrites the client history in place; the next request replays [continuation summary, retained tail...] against the same session id. The anthropic lane's compaction-landing detection knew only the dsh checkpoint framing, so the landing fell through to detectUnannouncedHistoryRewrite and recorded "unannounced-rewrite" (signal tier), lighting the conflict banner for the client's own auto-compact. The anthropic lane now detects the CC continuation framing with the same three-gate discipline as the dsh detector (#2621/#4438): carrier (user/text), novelty (fresh id vs the pre-turn ref map), standalone (sentence opens the message). On a hit it records "native-compaction" (handled tier) and rebases the ACP state onto the compacted history - the same marker+rebase treatment as the dsh lane (#2432/#2658) and the codex lane (#2373). The framing check is lane-scoped (dsh profile or claude identity/client); the sentence is version-pinned like DSH_CHECKPOINT_PREAMBLE_PREFIX (#970) - if Claude Code rewords it, detection degrades to the pre-#5767 archive path, never a false positive. Tests: drift pin on the pinned sentence; carrier/novelty unit gates; e2e positive (claude session rebases, no unannounced-rewrite, replay does not re-trigger) + four e2e negatives (no framing / assistant quote / old id / non-claude lane). Fixes #5767 (cherry picked from commit 0d9231c)
…5767) The PR added src/server/claude-compaction-guard.ts but the architecture map (reference/architecture.md) did not list it, so the architecture-docs CI lane failed with 'missing: src/server/claude-compaction-guard.ts'. Add the entry next to its sibling dsh-compaction-guard.ts.
ff5c196 to
6fb8805
Compare
(ai: vllm-qwen/qwen3.8-27b) Rebased PR #6355 onto current master and resolved the merge conflict. What happened
Verification on the rebased head (local, targeted)
Push
七问:
结论:冲突已解决并推送,CI 正在新 head(6fb8805)上跑,等 CI 绿 + 人工合并。 |
(ai: vllm-qwen/qwen3.8-27b) The red Diagnosis
Fix
七问:
结论:继承红已消除,新 head |
|
(ai: vllm-qwen/qwen3.8-27b) Review verdict: APPROVE (posted as a comment — GitHub blocks a formal self-approve on the author's own PR; this is the review record for the human merge). Reviewed end-to-end: PR body, linked issues (#5767, #5786), full diff, and cherry-pick provenance. Correctness
Tests — all run locally on the PR head, green:
Regression / behavior — no kernel/ changes, no config surface, no wire/persistence changes. Both behavior changes are disclosed in the PR body (old→new): (1) claude native-compaction landings on the anthropic lane: One note for the record: the new #5787 is superseded and can be closed by the owner after merge. |
Review complete — verdict APPROVE. (Full review posted on the PR as a comment — GitHub blocks a formal self-approve on the author's own PR, so the verdict is a comment for the human merge.) 结构化八问 (PR review 结论)
Coordination: PR #6355 reviewed end-to-end — APPROVE, review posted (comment 6972861211); targeted + regression suites green locally, full-suite verdict on CI. #5787 is superseded (owner may close after merge). Ready for human merge. |
Fixes #5767
Fixes #5786
Root-cause batch for the recurring "Compression conflict banner" false alarms (aggregation thread #6264). One PR, two commits — the two source issues are the same user-visible symptom (banner lit for the client's own compaction housekeeping) with two distinct mechanisms, fixed here as a checklist of one mechanism each.
Commit 1 — cherry-pick of PR #5787 (authorship preserved, -x)
fix(conflict-watch): stop recovered id-churn-adoption from lighting the conflict banner#5786: #4131 added the
id-churn-adoptionConflictKind (fold-reconcile re-mints and re-anchors ids across builds, 0 unmatched, NO compaction boundary) but only wired the recording side. Both display classifiers still treated it as an unexplained signal: the web banner severity (bili_conflictSeverity) dumped it into the residualsignalN(banner lit even though the event is fully recovered by design — #3235 policy: recovered stays quiet), andformatConflictSectionframed a pure id-churn-adoption ledger as "something OUTSIDE bili touched this conversation", pointing the user at a phantom second compressor. The commit carves id-churn-adoption out ofsignalN(it joins the neutral/recovered bucket) and givesformatConflictSectiona dedicatedchurnAdoptOnlyheader + advice. Mixed ledgers still alarm on genuine unannounced-rewrite/orphan signals.Commit 2 — the #5767 fix
fix(conflict-watch): attribute Claude Code native compaction on the anthropic lane#5767: Claude Code's auto-compact (CLAUDE_CODE_AUTO_COMPACT_WINDOW) rewrites the client history in place — the shadowed region is replaced by ONE continuation user message opening with the verbatim sentence "This session is being continued from a previous conversation that ran out of context", and the next request replays [continuation summary, retained tail…] against the same session id. The anthropic lane's compaction-landing detection knew only the dsh checkpoint framing, so the landing fell through to
detectUnannouncedHistoryRewriteand recorded "unannounced-rewrite" (signal tier) — the banner alarmed for the client's own auto-compact. The #5767 ledger shows the shape: 19–24 incoming messages, 5–9 carrying pre-turn refs, of 415–2312 known.The anthropic lane now detects the CC continuation framing with the same three-gate discipline as the dsh detector (#2621/#4438): carrier (user/text), novelty (fresh id vs the pre-turn ref map), standalone (sentence opens the message). On a hit it records "native-compaction" (handled tier) and rebases the ACP state onto the compacted history — the same marker+rebase treatment as the dsh lane (#2432/#2658) and the codex lane (#2373). The framing check is lane-scoped (dsh profile or claude identity/client); the sentence is version-pinned like
DSH_CHECKPOINT_PREAMBLE_PREFIX(#970) — if Claude Code rewords it, detection degrades to the pre-#5767 archive path, never a false positive.Behavior changes (disclosed, old → new)
applyCompactionArchivepath → conflict banner lit. New = "native-compaction" (handled tier) +markNativeCompactionBoundary+reconcileNativeCompactionBoundaryrebase → no banner, ACP state rebased onto the compacted history (the dsh/codex lanes already settle the identical shape this way). Why: the landing is the client's own announced auto-compact, not a foreign compressor.Supersedes
Supersedes PR #5787 — its commit is cherry-picked here with authorship preserved (
-x). #5787 remains open for the owner to close.Tests
tests/issue5767-claude-native-compaction.test.ts(new, 8 tests): drift pin on the pinned sentence; carrier/novelty unit gates; e2e positive (claude session rebases, no unannounced-rewrite, replayed continuation does not re-trigger) + four e2e negatives (no framing / assistant quote / old id / non-claude lane)tests/web-conflict-banner.test.ts,tests/conflict-lifecycle.test.ts