Skip to content

[PR] fix: redact storage diagnostics at the publish boundary - #4509

Open
ranxianglei wants to merge 9 commits into
masterfrom
2026-10-24_publish-redact-storage-diagnostics
Open

ranxianglei wants to merge 9 commits into
masterfrom
2026-10-24_publish-redact-storage-diagnostics

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What & why

The storage-legacy-only diagnostics blob is designed to be copied into a public GitHub issue (Web UI → storage degradation warning → Copy Diagnostics / Report on GitHub), but its storage section copied raw bytes with no publish-time redaction — unlike the config and conflict-log sections. Raw [storage] log lines (credentials, private hostnames, absolute user paths), free-form reason strings (degrade reason, bootstrapFailure.reason), and the absolute SQLite failure-marker path in the force-retry line leaked into the published blob and the prefilled issue body. #3959 already proved absolute user filesystem paths reached a public issue body through this flow; credential/private-host exposure was reproduced with synthetic inputs.

Fix

Enforce redaction at the single publish boundary (buildDiagnostics) so every topic's blob is scrubbed before serialization, and the copied blob + prefilled issue body derive from one string so they can never diverge:

Behavior changes (flagged)

Before After Why
Public storage blob carried raw [storage] lines, reasons, absolute paths All redacted + $HOME→~ stop credential/path leak into public issues
[storage] tail lines unbounded bounded to 240 chars parity with conflict-log tail; bound long error lines without losing classification
Force-retry marker shown as /home/<user>/.cache/... in the public blob shown as ~/.cache/billion-context/sqlite/.bootstrap-failed.json remove username while keeping the recovery path actionable

Local (non-published) surfaces are unchanged: acp_status's storage wire uses the separate storageStatusWire() and still reports verbatim for the model relay (#3385); storageDiagnosticsLines() called directly (as its unit test does) still emits the absolute marker path — only the published blob is rewritten.

Out of scope (cross-ref)

Non-HTTP URL schemes and bare host:port literals in free-form prose are not masked here — maskUrlsForPublish is intentionally HTTP-only (broader host recognition is tracked separately in #4191); redactSecretsInText still scrubs credential query params regardless of scheme. This matches the existing config/conflict-section coverage exactly (parity, not expansion).

Verification

Targeted suites green on the rebased head (current master): log-mask, web-storage-diagnostics-redaction (new), storage-diagnostics-lines, web-diagnostics-enrichment (#3813 single-read), web-storage-banner, snapshot-shadow — 43 pass / 0 fail. tsc --noEmit clean. Full regression = remote CI.

Closes #4427
Closes #4499

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-24_publish-redact-storage-diagnostics (b1220b7)

Latest build — install this exact version

npm install -g billion-context@0.0.9853-pr.4509.991f29f

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
b1220b7 billion-context@0.0.9853-pr.4509.991f29f build
3682334 billion-context@0.0.9705-pr.4509.40994da build
38f2bde billion-context@0.0.5461-pr.4509.b66087d build
fa1d924 billion-context@0.0.5440-pr.4509.327ac00 build
5552f56 billion-context@0.0.5432-pr.4509.ffb34d8 build
78a1547 billion-context@0.0.5429-pr.4509.ae10deb build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4509.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix: redact storage diagnostics at the publish boundary [PR] fix: redact storage diagnostics at the publish boundary Oct 24, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: N/A —— 既有 PR 的 CI 自动修复车道(第 1/2 次尝试),未新立条目。

unused-exports 门禁红灯已修复,一行改动已推送到 PR 分支(78a1547 → 5552f56)。

结构化八问:

  1. 是什么问题:这个 PR 把发布边界脱敏统一收敛到 redactForPublish 之后,maskUrlsForPublish 失去了唯一的跨模块调用方,被 unused-exports 门禁判为 INTERNAL_ONLY(只在自身文件内被引用),CI 门禁红灯挡住合并。
  2. 什么原因导致的:整合调用点时把所有直接调用换成了 redactForPublish,但 maskUrlsForPublish 仍保留着 export——它已变成纯内部函数却还留在公开面上。门禁(audit: 全仓冗余审计与重构计划——server.ts 解体、客户端矩阵去重、死代码、AGENTS.md 模块图腐化 #1440 P6)禁止的正是这类残留导出。
  3. 影响范围与严重程度:仅内部实现,零运行时行为变化(该函数仍由 redactForPublish 在文件内调用;去掉 export 关键字不影响打包与调用)。唯一影响是红灯挡合并,无用户面影响。
  4. 怎么修复的:去掉 maskUrlsForPublish 的首部 export(src/log-mask.ts:137),降为模块私有函数——这正是门禁自身给出的 INTERNAL_ONLY 标准修法。没有加 WAIVERS 豁免:豁免先例要求跨 bundle 边界消费或命名 wire 形状,此函数两者皆无。
  5. 是否有回归问题:无。全仓 grep(src/tests/scripts)确认没有任何文件在模块外引用该符号(含本 PR 新增的两个测试文件),去掉 export 不可能破坏任何导入;其余既有行为未触碰。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:没有——反而更贴合本 PR 自己的设计意图("redactForPublish 是唯一的发布边界脱敏入口")。
  8. 是否引入了新的配置:没有。

验证:本地跑 node scripts/check-unused-exports.mjs 通过(✓ clean, 6 waived)。等新 head 上 CI 重跑,unused-exports 预期转绿;PR 当前 behind 状态不构成合并阻塞。审阅本 PR 未发现其他问题——CI 转绿后即可人工合入。

@ranxianglei ranxianglei added bug Something isn't working p1 scope/ui labels Oct 24, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 同家族非重复 —— 与 PR #4499(同标题、同修复对象、早约 70 分钟创建)是同一机制的两个 PR:#4509 正文显式 "Closes #4499"(取代关系),#4499 的 CI 测试矩阵为红,#4509 门禁全绿且测试更完整。按先来后到本应保留先到的,但后到者显式声明取代且质量占优,建议合 #4509、由 owner 关闭 #4499(我不执行关闭)。父 issue #4427 是被修对象,不构成重复。

标签: bug + p1 + scope/ui(凭据/私有主机名/用户主目录路径经「公开诊断报告」流程泄进公共 GitHub issue = 安全泄露类,按 owner 规则泄露类一律 p1;缺陷面在 Web 诊断面板的发布边界)

独立审核结论(diff 逐段通读,关键路径 grep/本地实测验证,未照抄 issue 侧表述):

  1. 是什么问题:存储降级时,Web 面板「Copy Diagnostics / Report on GitHub」生成的诊断 blob 里,storage 段落原样拷贝 [storage] 日志行、自由文本 reason 和绝对路径的 SQLite 失败标记文件路径——凭据、私有主机名、用户名路径会随用户点击进入公共 GitHub issue(SQLite unified storage degraded to legacy-only (bili v0.1.202, node v24.21.0, darwin-x64) index.db corrupted | SQLite unified storage degraded to legacy-only (bili v0.1.202, node v24.21.0, darwin-x64) index.db损坏 #3959 已证明绝对路径走过这条路,凭据/主机向量本次用合成输入复现)。
  2. 什么原因导致的:storageLogTail() 直接拷原始字节,而 conflictLogTail() 走了 maskUrlsForPublish∘redactSecretsInText——同一 blob 内两段脱敏标准不一致;且既有原语只覆盖 URL 主机与 secret 形状,裸 $HOME 绝对路径没有任何一层管。
  3. 影响范围与严重程度:p1。触发条件具体(存储处于降级态 + 用户主动发布诊断),但后果是凭据/私有主机名/用户名落在公共频道,不可撤回。
  4. 怎么修复的:脱敏收敛到唯一发布边界——buildDiagnostics 序列化前对整个 blob 跑一次 redactForPublish(secrets → 非公共主机 → $HOME→~ 三层合成);复制的 blob 与预填 issue body 从同一个字符串派生,结构上不可能分叉;storageLogTail 顺带获得 240 字符行界(conflict tail 同标准),共享 publishRedactLine。这是「疏」不是「堵」:改的是产生未脱敏字节的决策点,不是事后过滤。
  5. 是否有回归问题:逐项清点了触碰路径承担的既有行为——① acp_status 存储 wire 走独立的 storageStatusWire()(src/acp-status.ts:386),grep 确认不经过发布边界,SQLite unified storage degraded to legacy-only (bili v0.1.197, node v20.20.2, win32-x64) #3385 的逐字上报不变 ✓;② 本地直接调用 storageDiagnosticsLines() 仍输出绝对标记路径,只有发布 blob 被改写 ✓;③ conflict tail 与 config 段在原脱敏之上多了一层 $HOME→~——有意变更,PR 已披露 ✓;④ 整 blob 边界脱敏使此前完全未脱敏的其他 topic 段落也受三层清洗——设计意图内的加固,未发现误伤已知内容形状;⑤ 强制重试标记本地保持绝对路径(恢复可操作性),发布时 ~ 化——PR 表格已披露 ✓。无意回归:未发现。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:无架构转向;把 config/conflict 段既有的「发布时脱敏」纪律提升为唯一序列化点的统一入口(redactForPublish 成为发布脱敏的唯一入口),方向收敛而非发散。
  8. 是否引入了新的配置:没有。代码注释明确发布边界不受 BILI_LOG_MASK_HOSTS 门控(本地可见性偏好不得削弱发布边界)——这是对既有 env 语义的澄清,不是新增配置。

验证与处置记录:

  • 本地在新 head 复跑 PR 声称的 6 个定向套件(log-mask、web-storage-diagnostics-redaction、storage-diagnostics-lines、web-diagnostics-enrichment、web-storage-banner、snapshot-shadow):43 pass / 0 fail,tsc --noEmit 干净,与 PR 声称一致。
  • 新测试有牙:双向断言(Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617 门禁纪律:泄漏被洗掉 AND 良性内容保留)、走真入口 buildDiagnostics("storage-legacy-only")、env 全钉死的 hermetic 环境、单串不变量(预填 URL 的 body 参数解码回 == blob 字符串)。
  • unused-exports 红灯(ci-worker-r1 已修,commit 5552f56,我核实了 diff 与全仓引用面):整合后 maskUrlsForPublish 失去唯一跨模块调用方,去掉 export 降为模块私有,修法正确。注意该失败曾级联跳过整个 test 矩阵(ci.yml 中 test job needs: [..., unused-exports] + if: !failure()),修复后矩阵已正常展开运行。
  • 我顺手修了一处小问题并推到 PR 分支(commit fa1d924,独立标注):maskPathsForPublish 文档注释声称锚点「never corrupts a neighbour token」,实测点号/连字符兄弟目录(${HOME}.bak、${HOME}-bob)会被改写成 ~…——是安全方向的过度脱敏(不产生泄露),但注释与代码事实不符;若收紧锚点去豁免它们,反而会引入「真实 home 后跟句尾标点被漏放」的 under-mask 回归,故行为保持不变,只把注释改准确并加两条断言钉死现状(防止未来被当 bug「修」成 under-mask)。本地 log-mask 套件绿。

CI 状态:head fa1d924(仅注释+断言,零行为变化)重跑中;上一 head 5552f56 静态门禁全过、test 矩阵已展开不再被级联跳过。

判定:方向正确(单一发布边界、疏不堵)、回归面逐项清点完毕、测试有牙、行为变更全部如实披露、out-of-scope 边界(HTTP-only 主机识别,同 #4191 口径)合理。可合;合并后请 owner 关闭被取代的 #4499。

ci-check added 4 commits October 24, 2026 19:00
The storage-legacy-only diagnostics blob is copied into a PUBLIC GitHub
issue, but its storage section copied raw bytes with no publish-time
redaction - unlike the config and conflict-log sections. Raw [storage] log
lines, free-form reason strings, and the absolute SQLite failure-marker path
leaked into the published blob and the prefilled issue body (#4427; #3959
precedent for absolute paths reaching a public issue body).

Enforce redaction at the single publish boundary (buildDiagnostics):

- New redactForPublish(text) in src/log-mask.ts composing three layers:
  credential-shape scrubbing -> non-public host masking -> home-path stripping.
- New maskPathsForPublish: rewrites the $HOME prefix to ~, anchored on both
  flanks so sibling homes, relative paths, and URL pathnames are untouched.
  Closes the bare-absolute-path vector the existing primitives missed.
- storageLogTail bounds each line to LOG_LINE_MAX_CHARS (240) and applies the
  same redaction as conflictLogTail via a shared publishRedactLine helper.
- The force-retry marker stays an absolute path locally (recovery stays
  actionable); only the $HOME prefix is rewritten to ~ in the published blob.

Local (non-published) surfaces unchanged: acp_status's storage wire uses
storageStatusWire() and still reports verbatim for the model relay (#3385).

Targeted suites green (log-mask, web-storage-diagnostics-redaction [new],
storage-diagnostics-lines, web-diagnostics-enrichment, web-storage-banner,
snapshot-shadow); tsc --noEmit clean. Full regression = remote CI.

Closes #4427
Closes #4499
The #4499 publish-boundary consolidation moved every external call site
onto redactForPublish, leaving maskUrlsForPublish referenced only inside
src/log-mask.ts. Drop the leading export per the gate's INTERNAL_ONLY fix;
no WAIVERS entry — no bundle-boundary consumer needs the name.
…ign docs with anchor reality

Review of the #4427 publish-boundary redaction found the maskPathsForPublish
doc claiming the anchors "never corrupt a neighbour token", while dot/hyphen
sibling homes (${HOME}.bak, ${HOME}-bob) ARE rewritten to ~… — a safe-side
over-mask (no leak), but not "untouched" as documented. Tightening the right
flank to spare them would under-mask a real home followed by punctuation
(e.g. sentence-final period), so the behaviour stays as-is: the doc now states
the actual contract and two assertions pin the over-masking so a future
"fix" cannot silently flip it into an under-mask.
…ate)

Master-side gap: ad98e7e (#4491) hand-wrote the pluginLaneServerHistory
rows into CONFIGURATION.md/.zh-CN.md without a YAML seed entry, so the
docs-sync generator drops them and every PR merge commit goes red. Add the
missing seed entry and regenerate; this normalizes the two hand-written
rows to generator output (inline-code backticks dropped from descriptions,
which the seed schema forbids; ZH default cell unified to the shared
English form used by sibling rows; env-map rows added). Docs-only wording
change, no runtime behavior touched. Branch rebased onto current master as
part of landing the self-consistent tree.
@ranxianglei
ranxianglei force-pushed the 2026-10-24_publish-redact-storage-diagnostics branch from fa1d924 to 38f2bde Compare October 24, 2026 11:10
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

查重: 按失败签名(pluginLaneServerHistory / docs-sync / 缺失种子条目)检索了 open+closed 的 issue 与 PR——只有原始功能条目 #4491/#4505,没有针对此缺口的既有修复 → 直接修(自动修复车道 2/2)。

本轮红灯的根因不在这个 PR,是 master 上留下的洞。已修复并推送到 PR 分支(fa1d924 → 38f2bde)。

结构化八问:

  1. 是什么问题:docs-sync 门禁在本 PR 红灯——但根因在 master:Plugin lanes: pin identity to client msgids, render outbound from the server-owned history | 插件车道服务端正史:消息身份钉在客户端 id 上,出站前缀由正史渲染 #4491 合入时(ad98e7e)把 rollout.features.pluginLaneServerHistory 的文档行手写进了 CONFIGURATION.md/.zh-CN.md,却没有在 website/config-reference/*.yaml 种子里补对应条目。docs-sync 从种子重新生成文档块再与提交产物比对,手写的行一重生成就被抹掉 → 任何 PR 的合并提交都会红(已实证复现:在干净 master 上直接跑生成器,得到一模一样的 diff)。
  2. 什么原因导致的:配置文档区块的设计是「种子为唯一事实来源」([docs][website] 配置文档单一事实源:从声明式 schema 生成 CONFIGURATION.md 与网站 /docs/(一步到位) #2107 drift guard);Plugin lanes: pin identity to client msgids, render outbound from the server-owned history | 插件车道服务端正史:消息身份钉在客户端 id 上,出站前缀由正史渲染 #4491 的提交绕过了生成器直接改产物,留下了一行种子无法复现的手写行(种子 schema 禁止 desc 里出现反引号,且两种语言共用同一个 default 列,而两行手写内容 default 值还不一样)。叠加本 PR base 过期,增量提交修不了 master 侧的状态。
  3. 影响范围与严重程度:所有在途 PR 的 docs-sync 门禁都受影响(任何合并提交都会继承 master 上的孤儿行);本 PR 被挡在合并之外。纯文档元数据问题,零运行时/用户面影响。严重度:挡合并级。
  4. 怎么修复的:① 补缺失的种子条目(website/config-reference/rollout.yaml,EN/ZH 描述从原手写行逐字转录);② 跑生成器重新生成全部产物,把两行手写行归一到生成器输出;③ 按 §7.2 把分支 rebase 到最新 master(先验证过:fork 点之后 master 没有任何其他提交触碰本 PR 的 4 个文件 → 零冲突;分支三个提交均为 agent 提交,rebase 不影响贡献归属)。
  5. 是否有回归问题:无运行时行为变化。纯文档措辞归一共三处,按旧值→新值披露:a) EN/ZH 描述文本去掉行内代码反引号(种子 schema 禁止,文字本身未变);b) ZH 默认列「0(关)」→「0 (off)」(生成器对两种语言用同一共享 default,与兄弟行的英文默认列惯例一致);c) EN+ZH 的 env-map 表各新增一行 BILI_ROLLOUT_PLUGIN_LANE_SERVER_HISTORY(此前因子条目缺失而缺席)。rebase 无冲突、无语义重叠。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:没有——反而是恢复「种子为唯一事实来源」的原有设计意图。
  8. 是否引入了新的配置:没有。BILI_ROLLOUT_PLUGIN_LANE_SERVER_HISTORY 环境变量代码里早已存在(src/rollout.ts,动态构造的名字),本次只是补齐它缺失的文档登记。

验证:本地连跑两次 generate(第二次零 diff,幂等 ✓)、check-coverage 通过(180 个 env 名 + 58 个顶层键全部有文档)、unused-exports 保持 clean。等新 head 上 CI 重跑,docs-sync 预期转绿、上一轮修好的 unused-exports 保持绿。CI 转绿后即可人工审阅合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

补充一条(透明性说明):修 docs-sync 时发现仓库里已存在一个针对同一根因的分支 2026-10-24_docs-sync-missing-seed(@ 62c301a,同样补 rollout.features.pluginLaneServerHistory 的种子条目)——可能是另一条工作线对同一 master 侧缺口的专项修复。本 PR 内已包含等价修复(rebase 后合并即快进、无冲突风险),两者内容一致:哪个先合入都成立,另一个的对应提交届时即为冗余,审阅时留一个即可。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI 跟进(head fa1d924):除 docs-sync 外全部 gate 绿——而这个红灯与本 PR 无关,是 master 既有问题:

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

冲突判定:这不是普通 rebase 能解的冲突——master 已经通过孪生 PR #4499 合入了同一修复,本 PR 的核心目的已达成,其实现被已发布版本取代。按自动修复车道规则(需要设计决策时交判定停手),本轮不动分支,交结论如下。

发生了什么

  1. 本 PR([PR] fix: redact storage diagnostics at the publish boundary #4509)与先到的 [PR] fix: redact storage diagnostics at the publish boundary #4499 是同机制、同修复对象的两个 PR(本 PR 正文声明 "Closes [PR] fix: redact storage diagnostics at the publish boundary #4499" 取代关系)。今天 11:16 UTC,master 合入的是 [PR] fix: redact storage diagnostics at the publish boundary #4499(merge fe290ad88,已随 0.0.813-master.fe290ad 发布)——也就是被声明要取代的那个。
  2. 同期 master 还合入了 Log redaction misses userinfo in non-HTTP protocol URLs (e.g., socks5): socks5://user:pass@host is logged verbatim. | 日志脱敏漏 socks5 等非 http 协议 URL 的 userinfo:socks5://user:pass@host 原样进日志 #4191(非 http scheme URL 的凭据掩码,82c0ccb58/e336ec9a5),它扩的正是本 PR 改的那几个函数(maskUrlsInText/maskUrlsForPublish/maskUrlsForDiagnostics),并且把 maskUrlsForPublish 钉在公开导出面(tests/log-mask.test.ts:115 有专门断言)。
  3. 本 PR 最后一个提交(docs-sync 补 pluginLaneServerHistory 种子条目)对应的修复已由 docs-sync has been all red on master since the merge of #4505: the rollout.features.pluginLaneServerHistory seed entry i | docs-sync 自 #4505 合并起在 master 全红:rollout.features.pluginLaneServerHistory 种子条目丢失 #4520/[PR] fix: restore lost config-docs seed for rollout.features.pluginLaneServerHistory (docs-sync red on master) #4534 进 master——两边 website/config-reference/rollout.yaml 现在逐字相同,rebase 后该提交为空。

为什么不能机械 rebase(三处要拍板的语义冲突)

冲突点 master(已发布) 本 PR 分支 强推任一侧的代价
maskPathsForPublish 锚点 严格双侧锚定(点号/连字符兄弟目录如 /home/<user>.bak 不改写) 右侧放宽为「后跟非 word 字符即可」(点号/连字符兄弟目录会改写,注释明确为安全侧过度脱敏) 取本 PR 侧 = 对刚发布行为的变更(掩码范围扩大,需旧→新披露);取 master 侧 = 丢掉本 PR 的核心差异
maskUrlsForPublish 可见性 导出,且被 #4191 测试钉死在公开边界 改为模块私有(commit f018d157e) 取本 PR 侧直接破坏 #4191 刚合入的测试与其公开边界决策
URL scheme 覆盖 任意 scheme(EMBEDDED_URL_RE,#4191) 仅 http(s)(分支基线早于 #4191) 取本 PR 侧 = 回退 #4191 已发布的修复

rebase 会对上述每个 hunk 要求「哪一侧赢」的裁决,且没有任何一侧是无损选择——这是设计取舍,不是文本漂移,所以停在这里等你。

顺带发现(不阻塞,留档备查)

对比中注意到 master 已发布版本有两个小缺口(若要收,应针对当前 master 开一个小的 follow-up,而不是救这个过期分支):

  • maskPathsForPublish 缺 homedir() === "/" 守卫:在 home 为 / 的极简容器里会把文本中所有独立 / 改写成 ~(灾难性过度脱敏)。本 PR 分支恰好有该守卫。
  • 严格锚点要求家目录前缀后紧跟分隔符/引号/行尾,「句尾标点」场景(如 prose 里的 /home/<user>.)会漏放用户名;本 PR 分支的宽松锚点没有这个洞。

建议处置(等 owner 拍板)

  1. 关闭 [PR] fix: redact storage diagnostics at the publish boundary #4509:核心修复已经 [PR] fix: redact storage diagnostics at the publish boundary #4499 发布并上线,本 PR 无独立增量价值,建议按「已被取代」处置(关闭权在你,我不执行;需要的话我先打标签留痕)。
  2. 上面两个小缺口:要修就按同机制家族开一个小 follow-up 一并收掉,不在本分支上折腾。
  3. 本轮未推送任何改动,PR 分支保持 38f2bde 原样。

结构化八问:

  1. 是什么问题:系统报本 PR 与 base 冲突要求 rebase;实际根因是 master 已合并同修复的孪生 PR [PR] fix: redact storage diagnostics at the publish boundary #4499,外加 Log redaction misses userinfo in non-HTTP protocol URLs (e.g., socks5): socks5://user:pass@host is logged verbatim. | 日志脱敏漏 socks5 等非 http 协议 URL 的 userinfo:socks5://user:pass@host 原样进日志 #4191 扩展了同一组函数——冲突本质是「两个竞争实现哪个留下」,不是文本漂移。
  2. 什么原因导致的:[PR] fix: redact storage diagnostics at the publish boundary #4499 与 [PR] fix: redact storage diagnostics at the publish boundary #4509 同天并行开工(相差约 70 分钟),[PR] fix: redact storage diagnostics at the publish boundary #4509 正文虽声明取代 [PR] fix: redact storage diagnostics at the publish boundary #4499,但 owner 先合入了 [PR] fix: redact storage diagnostics at the publish boundary #4499;随后 Log redaction misses userinfo in non-HTTP protocol URLs (e.g., socks5): socks5://user:pass@host is logged verbatim. | 日志脱敏漏 socks5 等非 http 协议 URL 的 userinfo:socks5://user:pass@host 原样进日志 #4191 又扩展了这组函数,使 [PR] fix: redact storage diagnostics at the publish boundary #4509 的基线与 master 产生语义分叉。
  3. 影响范围与严重程度:只影响本 PR 的合并路径;线上零影响——修复本身已在 master 生效并发布。严重度:挡合并级,无用户面缺陷。
  4. 怎么修复的:本轮未动代码(自动修复车道遇设计决策 → 交判定停手)。修复路径 = owner 二选一:① 关 [PR] fix: redact storage diagnostics at the publish boundary #4509(推荐,推荐项的修法思路就是「承认 [PR] fix: redact storage diagnostics at the publish boundary #4499 已是正主,本 PR 退役」);② 指定以 [PR] fix: redact storage diagnostics at the publish boundary #4509 实现为准重写——需回退 Log redaction misses userinfo in non-HTTP protocol URLs (e.g., socks5): socks5://user:pass@host is logged verbatim. | 日志脱敏漏 socks5 等非 http 协议 URL 的 userinfo:socks5://user:pass@host 原样进日志 #4191 的公开边界决策并披露锚点行为变更,不推荐。
  5. 是否有回归问题:未推送任何内容,零回归风险。若后续按建议做 follow-up 补两个小缺口,那是独立披露的行为收紧,与本 PR 无关。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:没有;发布边界统一脱敏的架构(master 现状)保持不变。
  8. 是否引入了新的配置:没有。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

收工状态更新(本 PR 审核结论此前已发:可合;此处只补阻塞解除后的最新进展):

ework-agent and others added 2 commits November 14, 2026 04:35
The suite baseline preload (preload-storage-baseline.mjs) pins
BILI_STORAGE_UNIFIED="legacy" for the broad corpus. After #6480 flipped the
storage default to pure-sqlite, the notice-registry suite's visibleNotices
assertions expect the pure-sqlite default notice, which is gated on
unifiedSelectionIsSqlite (unified "sqlite" or absent) — the preload's
"legacy" made the notice silent, so the suite was born-red on master. Pin
the selection explicitly (#4011 lesson: a test that depends on the production
default passes locally but fails in CI).
# Conflicts:
#	CONFIGURATION.md
#	CONFIGURATION.zh-CN.md
#	src/log-mask.ts
#	src/web/diagnostics.ts
#	tests/web-storage-diagnostics-redaction.test.ts
#	website/config-reference/rollout.yaml
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

[bot] 🏷

Merge conflict resolved — the PR is now mergeable. I merged origin/master into the PR branch and resolved every conflict.

Key finding: this PR is a parallel implementation of the same fix master already shipped as #4427, and master's version is an evolved superset. All of master's relevant commits postdate the PR's merge base (verified none are in the merge base). Every one of the PR's 4 commits is fully superseded:

PR commit Superseded by (on master)
194f7f35 core publish-redact fix fa0dbd2f (#4427) + e59e0206 (Windows/%USERPROFILE% home roots) + 6250e07f (JSON-escaped home paths)
f018d157 make maskUrlsForPublish module-private master keeps it exported — #4191 broadened it to any-scheme EMBEDDED_URL_RE, and master's tests import it
fd473b68 pin dot/hyphen-sibling over-masking master's conservative anchoring is the shipped choice (no dot/hyphen over-mask); master's tests pin that behavior
38f2bdef docs seed rollout.features.pluginLaneServerHistory already on master after the docs reorg (docs/configuration.md:107,:2037; website/config-reference/rollout.yaml:77-85, with desc_ja+default_zh)

Resolution: took the master side for all 7 touched files (6 conflicted + the auto-merged tests/log-mask.test.ts). No coverage is lost — master's own test files already cover the same ground and pin the shipped behavior (tests/web-storage-diagnostics-redaction.test.ts:85-99 for anchoring + redactForPublish, tests/publish-json-home-paths.test.ts for JSON-escaped paths).

Result: the merged tree is byte-identical to origin/master (0 differing files) — a pure no-op merge. Verified clean: no conflict markers, empty full-tree diff vs master. Pushed 38f2bdef..36823342d6 (fast-forward, plain push — remote head was unchanged, no concurrent agents). The PR is now mergeable: true (mergeable_state: blocked = the branch-protection CI/review gate, the normal pre-merge state — the conflict itself is gone). CI check states aren't in the mirror cache yet; they'll land as the poller refreshes.

Recommendation for the owner: since the PR is 100% superseded by master's #4427 work, you can either close it as superseded or merge it as a no-op. I've left it open for your call.


八问(中文审核清单)

  1. 是什么问题:PR [PR] fix: redact storage diagnostics at the publish boundary #4509 与 master 基线冲突(merge state = dirty),无法合并。
  2. 什么原因导致的:该 PR 与 master 上已合入的 [security][web] Storage diagnostics publish raw log lines and absolute paths | 存储诊断公开报告泄露本地路径和未脱敏日志 #4427 是同一修复的两条并行实现线,从同一 merge-base 分叉后各自演进,在 7 个文件上产生语义冲突。
  3. 影响范围与严重程度:仅影响本 PR 的可合并性;不影响任何已发布行为——合并结果与 master 逐字节一致,零用户面影响。
  4. 怎么修复的:把 master 合入 PR 分支,7 个冲突文件全部取 master 侧(master 是已发布、更演进的超集);PR 的 4 个提交被完全取代,无独有贡献丢失。
  5. 是否有回归问题:无。合并树 == master 树(0 文件差异),相对 master 零行为漂移;PR 提议的 dot/hyphen over-masking 未被采纳,master 已发布的保守锚定行为保持不变。
  6. 是否破坏缓存:不涉及(纯冲突消解,无运行时/缓存/重试逻辑变更)。
  7. 是否改了设计方向:不涉及(未引入新方向,完全收敛到 master 既有实现)。
  8. 是否引入了新的配置:不涉及。

判定:冲突已解决,PR 现可合并(mergeable = true)。因 PR 被 master 的 #4427 工作完全取代,建议 owner 将其关闭为 superseded,或作为 no-op 直接合并。

ework-agent and others added 3 commits November 14, 2026 10:20
…test

The dsh plugin lane (ci-e2e-dsh.yml) runs node --import tsx --test
WITHOUT the preload-storage-baseline.mjs preload, so BILI_STORAGE_UNIFIED
is unset and the storage mode defaults to 'full'. Under the pure-sqlite
default flip (5a80e2b, #6480), 'full' mode turns the JSON envelope
writer OFF — so the .content-store.json sidecar is never written, and
the test's readdirSync(namespace) hits ENOENT.

Pin BILI_STORAGE_JSON_WRITER=on in the test so the content-store
sidecar is written regardless of the storage mode. This keeps the
corrupted-store detection path exercised in both full and legacy modes.

Closes: dsh plugin lane red on master (run 43532980164, job 132255459726)
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

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

CI red fix — inherited failure, merged ci-fixes per policy.

The 5 failing test shards on this PR (head 3682334) are all inherited reds, not caused by this PR's code: the PR's tree is byte-identical to master, and each failing shard matches a documented inherited-red signature in the CI 总控 (#4599):

Failing shard Inherited signature (#4599)
test (windows-latest, 22, 1/2/3) #4347 EBUSY unlink index.db family (Windows file-lock / SQLite handle not closed before teardown)
test (ubuntu-latest, 24, 1) non-EBUSY inherited red (tracked in #4599)
test (ubuntu-latest, 22, 1) visibleNotices / timing flake (visibleNotices facet already pinned in ci-fixes)

Per owner policy (2026-10-24 CI 失败协调): master is red → inherited failure → git merge origin/ci-fixes into the PR branch and push; do NOT investigate the inherited reds in-branch (fixes converge on ci-fixes via the sentinel).

Action taken this run:

  1. Verified master is red and all 5 shards match documented inherited signatures (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. Merged upstream/ci-fixes (head cd8bc8a = current master e5e1647 + CI test pins) into the PR branch — clean merge, no conflicts.
  3. Pushed 36823342d6..b1220b7ef0 (fast-forward) to 2026-10-24_publish-redact-storage-diagnostics.

After the merge the PR branch tree == ci-fixes tree; its diff vs current master is only the 2 CI test-pin files (tests/notice-registry.test.ts, tests/plugin-fork.test.ts). CI re-runs on the new head: the visibleNotices reds are fixed by the ci-fixes pins; the EBUSY win22 family is the sentinel's ongoing handle-leak investigation on ci-fixes (out of scope for this lane).

Note: this PR's content remains a no-op fully superseded by master #4427 (from the prior conflict-resolution run) — owner may close as superseded or merge as a no-op.


八问

  1. 是什么问题: PR [PR] fix: redact storage diagnostics at the publish boundary #4509 的 5 个 test 分片 CI 红,阻塞合并门禁。
  2. 什么原因导致的: 继承性失败 —— PR 分支树与 master 逐字节相同,5 个红分片全部命中 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 已登记的继承红签名(win22×{1,2,3}=windows-22-1 lane randomly red: during test cleanup, unlink index.db hit an EBUSY external lock, couldn't survive tmp-rm | windows-22-1 车道随机红:测试清理期 unlink index.db 遇 EBUSY 外部锁,熬不过 tmp-rm 的 9.6 秒重试梯子(#2799/#2908 族复发) #4347 EBUSY 文件锁/handle 未关;ubu24-1=非 EBUSY 继承红;ubu22-1=visibleNotices/时序抖动)。非本 PR 代码引入。
  3. 影响范围与严重程度: 仅本 PR 的 CI 门禁(合并前须绿),不影响任何用户/运行时行为。严重度:CI 阻塞,非产品缺陷。
  4. 怎么修复的: 按 owner 政策(2026-10-24)把 upstream/ci-fixes(=当前 master e5e1647 + CI 测试钉)merge 进 PR 分支并推送;修复收敛在 ci-fixes(哨兵维护),不在本分支重复修 master 级失败。
  5. 是否有回归问题: 无。merge 后 PR 分支树 == ci-fixes 树;相对当前 master 的 diff 仅 2 个 CI 测试钉文件,均为测试环境钉,不改运行时语义。
  6. 是否破坏缓存: 不涉及(纯测试钉 + master 同步,无缓存/重试/游标逻辑变更)。
  7. 是否改了设计方向: 不涉及。
  8. 是否引入了新的配置: 不涉及(测试钉复用既有测试 env,无新配置面)。

判定: 已按政策 merge ci-fixes 并推送(b1220b7),CI 将在新 head 重跑。visibleNotices 红由 ci-fixes 钉修复;EBUSY win22 家族是哨兵在 ci-fixes 上收敛中的 handle 泄漏调查(非本车道职责)。本 PR 内容仍是被 master #4427 完全取代的 no-op,建议 owner 决定关单(已取代)或作为 no-op 合并。

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

Labels

bug Something isn't working p1 scope/ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[security][web] Storage diagnostics publish raw log lines and absolute paths | 存储诊断公开报告泄露本地路径和未脱敏日志

1 participant