Repository navigation
[PR] Enrich auto-filed diagnostics reports with host client versions, masked config, and evidence logs - #3623
Conversation
The conflict-banner report button (#3235) files the GitHub issue from a diagnostics blob that carried only the ledger summary — not enough to triage (no client version, no config, no log evidence). Per owner request on #3611, buildDiagnostics now appends three sections to every topic blob: - host client versions: per dsh profile, the installed @deepseek-ai/dsh / dsh-compaction-basic / dsh-web-app package versions (missing rendered as ?); - bili config (secrets masked): the full config file with key-based secret masking plus the generic redactSecretsInText pass; - recent conflict-related log lines (conflict-banner topic only): the last 20 lines matching the known dsh-native-compaction signatures (#1729/#2432/#2709), redacted and length-capped. Publish discipline: the blob becomes a PUBLIC issue body — no absolute local paths are emitted (profile names only), all values pass through redaction, section sizes are bounded (config 1600 chars, 20 log lines x 240 chars). Endpoint shape is unchanged ({blob,title,url}); existing topics keep their exact prefix — new content is tail-appended.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4265-pr.3623.75acfc0This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3623.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Review fix for #3623 — two redaction holes in the new config section: - maskSecretValues dropped key context inside arrays, so string values under a secret-named key in an array passed through raw ("apiKey": ["…"]); the parent key is now propagated into elements. - URL userinfo (https://user:pass@relay) survived both the key-based mask and redactSecretsInText (whose patterns cover bearer/sk-/xai-/AIza/JWT/ key=value shapes only); it is now stripped explicitly before rendering. The block comment that overclaimed the sink net covers URL userinfo is corrected to match what the net actually catches. - The budgets comment no longer claims the prefilled issues/new URL always survives proxy request-line limits; the copy button remains the reliable channel (worst-case full-budget CJK logs can outgrow conservative limits). Fixture coverage added for both holes; both new assertions verified to fail on the pre-fix code.
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 相关条目: #3291/#3235(conflict-banner 报告按钮本身,已关闭——本 PR 正是对它的增强)、#3310(web UI 持久反馈入口,open——机制不同:它加的是 UI 入口,本 PR 丰富的是 blob 内容,两者都消费 #3040 通用设施,不重复)。 审核结论(独立审读,非复读 issue)⓪ 方向关: #3611 的现场报告确实只有 ledger summary,无客户端版本/配置/日志证据,triage 卡死是真实缺陷;owner 在 #3611 点名要 dsh 版本+脱敏配置+更多日志。本 PR 方向正确,修在正确的层(blob 生成器),不是治标。 ② 回归审查(逐项过既有行为):
③ 代码审查发现(已当场修复,push 到 PR 分支 commit
④ 测试有效性: 4 个新测试断言有真牙——缺包渲染 ⑤ diff 整洁度: 2 文件(+295/-12),每行都与目的相关,无跑题改动,命名/常量/注释风格与仓库一致。干净。 需 owner 拍板的一个取舍(URL 长度 vs 证据量)
结构化八问
本地定向验证: enrichment 套件 4/4、conflict-banner+enrichment 合计 33/33、storage-banner(含端点)5/5、typecheck 干净;全量回归以新 head 判定: 可合——方向对、实现扎实、diff 干净、我的修复 commit 已就位;等新 head CI 全绿后由人合并。URL 长度取舍(A/B)请拍板,不阻塞合并。 |
(ai: vllm-qwen/qwen3.8-27b) CI 跟进:新 head 结论不变:可合,等人工合并。URL 长度取舍(A 维持现状 / B 砍到 10 行)仍待你拍板,不阻塞合并——若选 B,我这边几行的事,说一声即可。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.585-master.3bb5c1a # this exact build
npm install -g billion-context@master # always the newest merged build
|
Closes #3611
What
The conflict-banner report button (#3235) files its GitHub issue from a diagnostics blob that carried only the ledger summary. On #3611 that turned out to be insufficient to triage — no client version, no config, no log evidence. Per owner request in #3611 ("看起来是我们的自动报告并没有提供足够的数据让我们诊断呢 包括用户的dsh版本 基本配置(脱敏) 更多相关日志"),
buildDiagnostics(src/web/diagnostics.ts) now appends three sections to every topic blob:@deepseek-ai/dsh/@deepseek-ai/dsh-compaction-basic/@deepseek-ai/dsh-web-apppackage versions read from the profile's node_modules (missing rendered as?; no profiles → explicit note).~/.config/billion-context/billion-context.jsonwith key-based secret masking (*key*/*token*/*secret*/*password*/*credential*/*auth*string values →***) plus the genericredactSecretsInTextpass.Publish discipline (the blob is a public issue body)
Behavior changes (disclosed per policy)
{blob,title,url}is unchanged; existing topics keep their exact prefix byte-for-byte, so any consumer reading the prefix is unaffected.Tests
New hermetic suite tests/web-diagnostics-enrichment.test.ts (4 tests): fixture profiles under a temp DSH_HOME with real package.json files (incl. absent-package-as-
?), key-based masking incl. false-positive guard (prose mentioning "tokens" untouched), signature-based log filtering with token redaction, no-fixture-path-leak assertion, truncation budget, storage-legacy/unknown-topic also enriched, unknown-topic graceful degradation. Existing tests/web-conflict-banner.test.ts (banner decision logic) still green locally. Full-suite verdict on CI.