Repository navigation
[PR] fix(#4688): recognize antigravity UA on the conflict surfaces - #4758
ranxianglei wants to merge 8 commits into
Conversation
Antigravity is a known bili lane (launcher, #3129/#2115) but its wire identity was never resolved server-side: sessions carrying conflict events showed clients: (none resolved) and only the generic remediation hint. Add the evidence-backed UA predicate (antigravity/hub/<ver>, observed shape v2.26.0 Windows via #4688) mirroring the codex pattern: sniffScanClient recognizes it with no scannable registry (closed binary, #1043), conflictClientOf normalizes recorded UA hints back to "antigravity", and the conflict surfaces (acp_status / web banner / launcher) get a dedicated one-line remediation instead of the generic fallback. Display-only: no wire or compression semantics change.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10196-pr.4758.366a406This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4758.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) PR #4758 review 结论(结构化八问)
测试有效性:断言有牙——正例(真实 UA 一处小 nit(不阻塞):PR 描述说谓词匹配「observed shape CI 分账:旧 head 判定:代码 ready-to-merge(展示面修复、模式对齐、证据充分、测试双向齐全);合入等 ci-fixes 合并后 CI 转绿即可,合并权在你。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI 状态说明(自动修复车道 attempt 1/2)
|
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 进度更新(23:40Z):新 head |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) 车道结论(自动修复 attempt 1/2,七问体例)
当前状态(00:20Z):新 head 上 12 个 workflow 已 11 绿(e2e 全家+build artifact+codex overlay);主 结束主动盯守:本车道可修部分已完成并验证。主 CI 若开跑后失败,系统会自动重新转发到本车道(attempt 2/2),届时按签名处置(在册簇内→归口 #4599;簇外新签名→分支上修);若全绿,检查矩阵直接转 ready-to-merge,无需再动作。 |
…help-merge sweep)
…help-merge sweep)
…4758 base conflict Rebase-free conflict resolution: master (259cd87) merged into the PR branch. One content conflict in tests/issue1206-thirdparty-scan.test.ts (the thirdparty-scan import line): the PR added isAntigravityClient, master added isDshLiveCompactEntry — resolved as the union of both. All other PR files (conflict-watch, thirdparty-scan, web/client, web/i18n, conflict-remediation) auto-merged clean. Net PR diff vs master stays exactly the 6-file antigravity UA change (53+/9-); no other file differs.
[bot] 🏷 Conflict resolved and pushed — PR #4758 is now What I did this run (CI conflict lane, attempt 1/3):
八问:
判定:冲突已解,PR 现可合并(mergeable=true);CI 检查将在新 head |
[ework] CI fix verified green ✓ |
clientFamilyOf (client-ua-registry.ts) is documented as mirroring conflictClientOf's resolution ladder, but only handled the codex UA shape. Now that conflictClientOf recognizes antigravity (#4758), the mirror was out of sync: antigravity UAs stayed bucketed under "other" in the diagnostics "observed client user-agents" section. Add the antigravity arm (mirroring the codex line) plus a positive+negative test row. Display-only — no wire or compression semantics change; the observed-ua line is strictly more accurate (family label "other" -> "antigravity").
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Note: I authored this PR (posting as
ranxianglei), so GitHub forbids a formal APPROVE review on my own PR — this is posted as a COMMENT review carrying my full assessment. Verdict below is APPROVE-worthy; the owner should merge (the branch is currently behind master).
APPROVE — display-only antigravity attribution on the conflict surfaces. Correct, well-tested, no regression, no kernel changes.
Verification (independent review)
Direction (①): Fixes a real gap — antigravity is a known bili lane (bili antigravity, #3129/#2115) but its wire identity was never resolved server-side, so conflict sessions showed clients: (none resolved) + a generic "disable auto-compaction" hint that is misleading for this lane (it has no user-configurable auto-compaction). The fix mirrors the existing codex evidence-permitlist pattern. Root cause (missing recognition), not a symptom mask.
Correctness (③):
isAntigravityClient(src/thirdparty-scan.ts:135): prefix-anchored^antigravity/, case-insensitive, deliberately NOT bare-token — a UA merely mentioning antigravity elsewhere must not inherit the lane identity. Conservative; matches the observed shapeantigravity/hub/<ver>.sniffScanClient(src/thirdparty-scan.ts:156): recognizes antigravity, returns undefined (closed Go binary, no scannable registry) — same contract as codex.conflictClientOf(src/conflict-watch.ts:119): normalizes recorded UA hints to "antigravity". Traced end-to-end:clientHintis recorded at request time (src/server/handle.ts:1875) assniffScanClient(...) ?? ua.slice(0,120); for antigravity that is the truncated UA (prefix preserved) → resolved. Existing sessions with already-recorded hints are also resolved by the new predicate.conflictRemediation(src/conflict-watch.ts:143): new antigravity case — accurate (periodic window re-slicing is expected lane behavior, not double compression; folded content stays offline-recoverable via export --full; start a new task/session when the pruned context is needed).- Web switch (src/web/client.ts:386) + i18n (src/web/i18n.ts:258 zh, :1014 en): both locales carry the key; the web switch mirrors the server map. Parity holds.
Regression (②): Inventoried every client-identity surface:
- acp_status (src/acp-status.ts:362,501), web banner (src/web/client.ts:386), launcher (src/launcher.ts:6841), sessions-data (src/web/sessions-data.ts:1410), diagnostics
clients:field (src/web/diagnostics.ts:207) — all route throughconflictClientOf+conflictRemediation, all now resolve antigravity. ✓ - One gap found + fixed on the spot:
clientFamilyOf(src/client-ua-registry.ts:49) is documented as "mirrors conflictClientOf's resolution ladder" but only handled codex — antigravity UAs stayed bucketed "other" in the diagnostics "observed client user-agents" section. Added the antigravity arm (mirroring the codex line) + a positive+negative test row. Display-only, strictly more accurate (family label "other" → "antigravity"). Commit 1319b6e. sniffScanClientordering (antigravity after codex, before opencode): the only theoretical behavior delta (antigravity UA + opencode header) does not exist in practice (closed binary, no opencode headers); even if it did, the antigravity UA is the stronger identity signal. No regression.- High-risk patterns (semantic drift, fail-fast→swallow, threshold/timing/output-format drift): none. Purely additive display logic.
Tests (④): Assertions have teeth — positive (real UA antigravity/hub/2.26.0 … + case variant) + negative (vendor/antigravity-wrapper/1.0, Mozilla/5.0 antigravity-fan-club, empty UA all stay unresolved/false); sniffScanClient contract line aligned with codex; i18n parity lists extended (en+zh). My added clientFamilyOf row is also positive+negative. Targeted local: conflict-remediation + issue1206-thirdparty-scan + issue4649-conflict-report-client-coverage = 69/69 green; tsc --noEmit clean. Full-suite verdict = CI on the pushed head.
Behavior change (old → new, display-only):
- OLD: antigravity conflict sessions → client unresolved → generic "disable the client's own auto-compaction…" hint (misleading — this lane has no user-configurable auto-compaction).
- NEW: resolves as
antigravity; the hint states the lane's periodic window re-slicing is expected (not double compression), folded content stays offline-recoverable (export --full), and when to start a new task/session. - Reason: the old hint was not actionable and misleading for this lane. No wire or compression semantics change.
No kernel changes — all 6 files under src/ + tests/. The kernel-authorization HARD RULE does not apply; this merge does not wait on the human kernel tier.
八问(中文)
- 是什么问题:Antigravity 是已知 bili 车道,但服务端从未解析其 wire 身份——带冲突事件的会话在 banner/acp_status 里显示
clients: (none resolved),只能给通用提示「去关客户端的 auto-compaction」,对这条车道是误导(它没有用户可配置的 auto-compaction)。 - 什么原因导致的:功能缺位而非代码 bug——
sniffScanClient只认 claude/codex/opencode,antigravity(封闭 Go 二进制)落进「无识别」路径;conflictClientOf没有把它归一化到已知客户端名,于是永远 unresolved。 - 影响范围与严重程度:纯展示面。所有带冲突事件的 antigravity 会话拿到错误提示;wire/压缩语义零影响。严重度 = 误导性展示/体验瑕疵,非功能失效。
- 怎么修复的:镜像 codex 既有「evidence-permitlist」模式做证据化识别——
isAntigravityClient(前缀锚定^antigravity/、大小写不敏感、刻意不用裸 token);sniffScanClient识别但返回 undefined(封闭二进制无可扫描 registry,与 codex 同契约);conflictClientOf把已存 UA hint 归一化回"antigravity";acp_status/web banner/launcher 各面加专用一行 remediation + en/zh i18n 键。 - 是否有回归问题:逐项审过全部客户端身份解析面,无回归。唯一缺口(
clientFamilyOf镜像漏了 antigravity,诊断「observed client user-agents」段把 antigravity UA 归到 "other")已顺手修掉(commit 1319b6e,display-only,严格更准确)。高危模式(语义漂移/吞错/阈值时序/输出格式漂移)逐项过,均不涉及。 - 是否破坏缓存:不涉及——不触碰 cache/retry/增量游标/去重键任何路径。
- 是否改了设计方向:没有。纯增量:既有识别模式加一条车道,无新机制。root re-slice 处理明确不在本 PR(#4759 待 owner 拍板)。
- 是否引入了新的配置:无。
已顺手修:clientFamilyOf(src/client-ua-registry.ts)镜像 ladder 漏了 antigravity——诊断「observed client user-agents」段会把 antigravity UA 归到 "other" 而非 "antigravity"。已加 antigravity 分支(镜像 codex 行)+ 正反测试行,display-only。commit 1319b6e。
判定:APPROVE。 展示面修复、模式对齐、证据充分、测试双向齐全、无内核改动、无回归。合入权在 owner。
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Review complete for PR #4758 (antigravity UA conflict-surface recognition). Verdict: APPROVE-worthy — display-only, no regression, no kernel changes. What I did:
Note: I authored this PR (posting as 已顺手修: |
[ework] CI fix verified green ✓ |
# Conflicts: # src/client-ua-registry.ts
[bot] 🏷 Conflict resolved and pushed — PR #4758 is now What I did this run (CI conflict lane):
八问:
判定:冲突已解,PR 现可合并(mergeable=true);CI 检查将在新 head |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Re-review on new head ecf3ef250f (master merged in) — clean.
The PR branch was updated to merge current master (head moved 1319b6e4ea → ecf3ef250f). I re-verified against the new head:
- PR diff unchanged. The merge only brought the branch up to date; the PR's own changes are the same 8 files (antigravity recognition on the conflict surfaces + the
clientFamilyOfmirror fix from my earlier review). No new code, no behavior drift. - Targeted tests green on the new head:
conflict-remediation+issue1206-thirdparty-scan+issue4649-conflict-report-client-coverage= 69/69 pass. - Typecheck clean (
tsc --noEmitexit 0). - CI green on
ecf3ef250f(mirror cache).
The full analysis (direction / correctness / regression / tests / behavior-change) is in my earlier review on this PR — it still applies verbatim since the diff is unchanged.
Note: I'm the PR author (token identity = ranxianglei), so GitHub blocks a self-APPROVE; this is a COMMENT review carrying the APPROVE verdict. The merge decision stays with the owner.
八问(中文)
- 是什么问题:Antigravity 是已知 bili 车道,但服务端从未解析其 wire 身份——带冲突事件的会话显示
clients: (none resolved)+ 误导性通用提示("去关客户端 auto-compaction",该车道并无此开关)。 - 什么原因导致的:功能缺位——
sniffScanClient/conflictClientOf没有 antigravity 的识别规则,UA 落进"无识别"路径。 - 影响范围与严重程度:纯展示面;误导性提示/体验瑕疵,非功能失效,wire/压缩语义零影响。
- 怎么修复的:镜像 codex 既有 evidence-permitlist 模式做证据化识别(前缀锚定
^antigravity/、大小写不敏感、刻意非裸 token)+ acp_status/web banner/launcher 各面专用一行 remediation + en/zh i18n 键。 - 是否有回归问题:无。逐项审过全部客户端身份解析面(acp_status / web banner / launcher / sessions-data / diagnostics);唯一缺口(
clientFamilyOf镜像漏 antigravity)已在前一轮顺手修掉(commit 1319b6e,已包含在本 head 中)。高危模式(语义漂移/吞错/阈值时序/输出格式漂移)逐项过,均不涉及。 - 是否破坏缓存:不涉及——不触碰 cache/retry/增量游标/去重键任何路径。
- 是否改了设计方向:没有,纯增量(既有识别模式加一条车道)。root re-slice 处理明确不在本 PR(#4759 待 owner 拍板)。
- 是否引入了新的配置:无。
判定:APPROVE(diff 未变、定向测试 69/69 绿、类型检查干净、CI 绿)。合入权在 owner。
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) Re-review on new head The PR branch was updated to merge current master (head
My earlier review's analysis (direction / correctness / regression / tests / behavior-change) still applies verbatim since the diff is unchanged. The Note: I'm the PR author (token identity = Re-review: #4758 (review) |
[ework] CI fix verified green ✓ |
Part of #4688 — the attribution facet (root re-slice handling is a separate owner decision).
What
Antigravity is a known bili lane (
bili antigravitylauncher, #3129/#2115), but its wire identity was never resolved server-side: sessions carrying conflict events showedclients: (none resolved)and only the generic remediation hint. This adds evidence-backed recognition mirroring the existing codex pattern:isAntigravityClient()(src/thirdparty-scan.ts): prefix-anchored, case-insensitive match on the observed UA shapeantigravity/hub/<ver> (…). Deliberately NOT a bare-token match — a UA merely mentioning antigravity elsewhere must not inherit the lane identity.sniffScanClient: recognizes it but returns undefined — closed Go binary (扫描市面上主流agent,看哪些没有提供bili 启动器和native模式 #1043), no scannable plugin registry; same contract as codex.conflictClientOf(src/conflict-watch.ts): normalizes recorded UA hints back to"antigravity".Evidence
Observed from a real session store via #4688 (bili v0.1.207, Windows x64):
antigravity/hub/2.26.0 (aidev_client; os_type=windows; arch=amd64; cl=1005016104)Behavior change (old → new)
Display-only — no wire or compression semantics change:
antigravity; the hint states the lane's periodic window re-slicing is expected behavior (not double compression), that folded content stays offline-recoverable (export --full), and when to start a new task/session.Tests
antigravity; predicate true on theantigravity/hub/prefix.vendor/antigravity-wrapper/1.0,Mozilla/5.0 antigravity-fan-club, missing/empty UA stay unresolved/false.Targeted local: tests/conflict-remediation.test.ts + tests/issue1206-thirdparty-scan.test.ts = 59/59 green; full suite verdict = CI.