Repository navigation
[PR] fix(storage): name OS-level suspects in win32 CANTOPEN degrade output (#3823) - #3855
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4572-pr.3855.fb2ce29This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3855.tgz
npm install -g packageInstall instructions are refreshed on each push. |
049c217 to
f75bd6b
Compare
|
(ai: vllm-qwen/qwen3.8-27b) Rebased onto current master (48d45e7) — the branch was ~30 merges behind, including the #3818/#3819 storage-mode flip and #3790 bootstrap diagnostics. Hint code verified intact on the new base; targeted suites green locally (storage-cantopen-hint + log-mask). Two labeled drive-by commits added on top (no behavior change), because master itself is currently red on two gates this PR's CI also runs — reproduced locally on pure master, so this is inherited redness, not from this diff:
No new issue filed for these (few-line fixes riding an in-flight PR); flagging so the same two commits can ride whichever in-flight PR lands first. |
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。 本 PR 是 #3823 家族(#3788/#3385/#3338)的诊断面改进:那四个 issue 是各自的 bug 报告(Windows 环境因素导致统一存储降级 legacy-only),本 PR 不改存储行为,只为 win32 × CANTOPEN( 标签: pr, bug, dsh, scope/storage, p2 —— #3823 家族存储降级缺陷的修复面;字段实例来自 DSH 拉起的子进程;范围限存储诊断展示层;能用但降级+旧提示误导,p2。 审核进行中,当前状态:
下一步:重跑该失败 windows job 确认 tunnel-guard ECONNRESET 属环境 flake,然后给最终八问结论。 |
…#3823) On win32, 'unable to open database file' (SQLITE_CANTOPEN) at index.db open time is almost always an OS-level refusal (AV/Defender lock, OneDrive placeholders, MAX_PATH), not a corrupt file — the generic 'delete the file' advice misleads for that class. New sqliteOpenFailureHint() fires exactly when win32 && CANTOPEN and is appended to the maybeOpen warn line plus the degradeReason() output (diagnostics block + /__bili/status). Both directions pinned in tests/storage-cantopen-hint.test.ts (#3617).
#3823) Field evidence from #3823: the affected machine's DSH-launched bili child ran at low integrity — its CA bundle write was refused by Windows integrity control (EPERM, fixed by icacls Low), and the same restriction class is a plausible producer of the index.db open refusal. Add it to the hint's suspect list so the diagnostics point at process restrictions, not just AV/OneDrive.
…ows (master-red docs-sync gate) Drive-by fix, labeled: master 48d45e7 fails docs-sync because the committed CONFIGURATION.md / .zh-CN.md still carry two superseded table rows each (the old storage.unified 'unset (shadow)' row and an old storage.sqliteAutoDownload row without the #3788 cooldown text). tools/gen-config-docs.mjs generate deletes exactly those 4 rows; no other content changes.
f75bd6b to
74c6598
Compare
(ai: vllm-qwen/qwen3.8-27b) 审核完成(独立重审,非复读 issue 结论)。判定:可合入。 先交代一个审核中发现并处理的事:接单时分支落后 master 12 个 commit(#3697 hermes /acp、#3737 dsh-authored-compaction、#3850 等已合入)。按规范 rebase 到当前 master(39fb841)——零冲突(新 master 的 docs commit 与本 PR 的再生成表格区不重叠),diff 保持原样 8 文件 +143/−11,已推送,新 head 74c6598。rebase 后本地复验:typecheck 干净;定向 suite(storage-cantopen-hint + 5 个相邻)= 58 跑 / 57 过 / 0 败 / 1 常规跳过;重跑 gen-config-docs 生成器与提交文档零差异(与 #3737 的 docs 变更无语义冲撞)。CI on 74c6598:主 CI run 全绿(CORE 矩阵 6 测试腿 + static-gates×2 + 全部门禁)+ 各 e2e lane(dsh/opencode/codex/pi/pi-ws/registry/windows-codex-overlay)全绿。旧 head 上唯一的红(windows node22 shard1 的 tunnel-guard ECONNRESET)经重跑确认是网络 flake,与本 PR 触碰面无关;单次未复现,暂不立项,再出现会跟。 结构化八问:
测试有效性:4 个新测试双向钉住(#3617)——win32×CANTOPEN 触发并断言提示内容、win32×其他错误(含 no-engine)静默、linux/darwin×CANTOPEN 静默、端到端接线用名为 index.db 的目录跨平台确定性触发 CANTOPEN 断言 reason 前后缀;windows 分片日志里还抓到了真实 win32 渲染出的完整 warn 行。 收工判定:可合入(mergeable;合并动作留给你)。若 #3531 先行合入,本分支只需解那一个模板字面量的冲突(保留两侧后缀即可)。 |
(ai: vllm-qwen/qwen3.8-27b) 这条是分支创建时的作者侧说明(首次 rebase 到 48d45e7 + 两个 drive-by 的来历),平台晚到转发。状态其后已推进,同步一句以免混淆:
结论维持上一条八问回复:可合入,合并动作留给你。 |
[bot] 🏷 (ai: vllm-qwen/qwen3.8-27b) CI 已全绿。 期间出现过一次
当前状态:全部检查通过(28 success + 12 skipped 为默认门控的 e2e 车道,属正常)。待人工合并。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.633-master.ca9a996 # this exact build
npm install -g billion-context@master # always the newest merged build
|
What / Why
#3823(同家族 #3788/#3385/#3338)报告 Windows 上统一存储降级 legacy-only。前三例都是「Node < 22.5 无内置 SQLite 引擎 → 自下载失败」;本例不同——Node 24 有内置引擎(诊断里
engine bootstrap: not-needed),失败点是 OS 拒绝打开 index.db(SQLiteunable to open database file,SQLITE_CANTOPEN)。这类失败在 Windows 上几乎总是环境因素(Defender/杀软锁目录、OneDrive 占位文件、路径超 260 字符),不是文件损坏。但当前降级告警只说
delete the file to reset the index——对锁类失败删文件无效,提示会误导用户。本 PR 在两个展示面补上 Windows 专属的可操作提示。How
src/storage/shadow.ts新增纯函数sqliteOpenFailureHint(err):仅当process.platform === "win32"且错误文本匹配/unable to open database file/i时返回提示(点名 AV/OneDrive/路径长度三个嫌疑 + 排除目标目录 + 明确「删文件清不掉锁」);其余情况返回空串。maybeOpencatch 的 warn 行(插在 "staying legacy-only" 与 "; delete the file..." 之间)+src/storage/runtime-status.tsdegradeReason()的 CANTOPEN 分支(diagnostics 块 +/__bili/status的 reason 字段)。tests/storage-cantopen-hint.test.ts共 4 个——helper 门控矩阵(win32×CANTOPEN 触发;win32×其他错误静默;linux/darwin×CANTOPEN 静默;no-engine 错误静默)+ 端到端接线(用名为 index.db 的目录跨平台确定性触发 CANTOPEN,断言降级 reason 带/不带平台对应后缀)。双向钉住(Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617 门禁纪律)。Behavior change disclosure (old → new)
仅影响 win32 且错误文本含 "unable to open database file" 的情形;其他平台与错误类型字节级不变:
warn 行:
降级 reason(diagnostics +
/__bili/status):不引入新配置/env;存储行为本身不变(降级路径照旧,legacy JSON 照常服务)。
与在途 PR 的重叠(hot-file 提示)
Verification
本地定向跑绿:新 suite 4/4;相邻 suite(acp-status-storage-degraded + web-storage-banner + storage-engine-bootstrap + storage-mode-label + storage-unified)= 52 pass / 0 fail / 1 skipped(常规门控跳过);typecheck 干净;build 成功。全量判定 = 远程 CI on this head。
Related: #3823(triage 进行中——等 reporter 环境取证;本 PR 是其中无需决策的诊断面改进,故不关 issue)