Repository navigation
[PR] fix: name the win32 READONLY index.db open failure; drop the delete advice under OS-level refusals (#4614) - #4625
Conversation
…dvice under OS-level refusals (Follows #4614)
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.6829-pr.4625.47515a6This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4625.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…ot this PR's master 146b34f fails the unused-exports gate on this exact line (INTERNAL_ONLY src/agent/client-build-note.ts: ClientBuildCheck): the type-only export #4545 introduced was missed by the 4d34abf de-export sweep. This PR touches none of it — every PR rebased past that master inherits the red (#4599 storm log). Same one-word fix as #4606 commit 1 and the in-branch precedents (#4607/#4595/#4540/#4618/#4622): drop the leading export on a symbol referenced only within its own file. Drop this commit when rebasing after #4606 merges.
(ai: vllm-qwen/qwen3.8-27b) 查重结论:不重复。 本 PR 是 #4614 子缺陷 A(诊断缺口)在该线程承诺的交付物;与已关闭的 #3823 同属一个失败域(OS 级拒写)但签名不同(CANTOPEN vs READONLY)——签名不同正是旧提示落空的原因,不构成重复;子缺陷 B(漂移面)按约定留在 #4614 等 owner 拍板,本 PR 只搭车其日志措辞小修。 标签: bug、dsh、scope/storage、p2(理由:存储诊断面缺陷;现场来自 dsh 拉起的 win32 低完整性子进程车道;严重度=排障盲区+误导性建议的数据风险窗口,不是可用性停摆——降级本身是设计内兜底)。 独立审核(PR 侧重新做过,不复读 issue 结论)① 方向关:根因判断成立且打到了点上。提示函数(#3855)当年只为「文件不存在」形态的 CANTOPEN 字符串写的;文件已存在后同一机制换字符串出场(打开成功、第一次写入被拒 → SQLITE_READONLY),字符串匹配落空 = 矩阵缺一格,不是症状层修补。我独立核实了前提:bili 从不以只读方式开库(普通 ② 回归关(逐格清点 degrade 路径既有行为矩阵,读了改动前代码而非只看 diff):
CANTOPEN 分支文本逐字未动; ③ 代码关:正则风格与既有 CANTOPEN 分支一致(case-insensitive 子串,SQLite 错误文本跨版本稳定);提示文本含可执行命令(查标签 + 递归 Low 重打标)与明确的 do-NOT-delete 及理由;注释更新与代码事实相符(不再出现「删文件解不了锁」同句后又建议删文件);无 ④ 测试有效性:8 例全部有牙、双向钉死(#3617)——单测断言具体 token(win32/readonly/integrity/icacls/do NOT delete)而非恒真;非 win32 静默钉 linux+darwin 两平台;wiring 用 0444 真实文件确定性复现 READONLY 降级(非 mock),root/win32 跳过理由写明(win32 分支由平台 stub 单测补位,诚实边界不留假绿);stub-win32 CANTOPEN 负向钉正是旧 bug 形状(hint 在场 ∧ 删除建议缺席),谁把无条件后缀加回来它就红;drift 告警新增 #4614 生产者断言与既有 #394 断言并存。本地实测:两文件 14/14 绿,typecheck 干净。 ⑤ diff 整洁度:4 文件每行都服务于目的(fix + 测试 + CHANGELOG 条目,条目位置核实在 结构化八问
CI 分账(head 43addbf,我推送的)
收工判定:PR 自身范围内 ready-to-merge;合并按钮当前被仓库级死锁挡住(required checks × born-red 集群,owner 决策中),与本 PR 质量无关。#4606 落地后 rebase 丢弃我的 CI 小修 commit、重触发,预期全绿。 |
(ai: vllm-qwen/qwen3.8-27b) CI 自动修复车道(ci-worker-r1)判定:被指派的红已解决(继承性,修在分支上),残留红为已知继承项,分支无需再动 白话结论:这个 PR 自己的代码没问题——被转发的那条红( 八问
残留红(继承,分支侧不再夹带):11 个 test 分片全部死在同一条预检自检行—— 收工判定:自动修复车道任务完成——指派红已解决并复核,残留红已判继承并在 #4599 有条目(floor 64 已记本 PR 状态)。分支就绪,等 #4606 合并 → rebase → 重触发。 |
…-open-hint # Conflicts: # src/storage/shadow.ts
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.918-master.ea5f125 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Follows #4614 (sub-defect A: diagnostic gap). Not auto-closing — the issue's root cause (why this machine's index.db stopped accepting writes) and its drift facet are still under triage.
What
Field report (#4614, v0.1.205 win32-x64): an EXISTING index.db that was writable until 14:27 fails to open at the next boot with
attempt to write a readonly databaseand degrades to legacy-only. That is the #3823 failure class (OS-level write refusal: Windows integrity control / MIC No-Write-Up on a DSH-spawned low-integrity child, AV lock, exclusive concurrent writer) surfacing differently once the file already exists — open succeeds read-only, the first write is refused → SQLITE_READONLY instead of CANTOPEN. ButsqliteOpenFailureHintonly recognized the CANTOPEN string, so:/__bili/statusdegrade reason carried zero actionable info for this signature;; delete the file to reset the index— actively harmful here: in unified-full mode index.db may hold the only copy of recent session state for a session whose JSON envelope writes were frozen by drift escalation.Change
sqliteOpenFailureHintgains the READONLY signature branch (win32-only, same platform doctrine as [PR] fix(storage): name OS-level suspects in win32 CANTOPEN degrade output (#3823) #3855): names the integrity-label suspect, givesicaclslabel-check + recursive Low re-labeling commands, AV/concurrent-writer suspects, and an explicit do-NOT-delete warning.Behavior change disclosure (old → new)
... staying legacy-only <hint?>; delete the file to reset the index— including when the win32 CANTOPEN hint had just said deletion cannot help.sqliteOpenFailureHintfires (win32 × CANTOPEN or READONLY), the log line ends with the hint only; the delete suffix appears only for un-hinted failures (corrupt file etc.). Log wording only — no protocol/config/persistence/wire change. Diagnostics (runtime-status) pick up the READONLY hint automatically via the shared function.Tests (targeted green locally; full suite = CI)
tests/storage-cantopen-hint.test.ts3→8 cases, both directions pinned per #3617:typecheck clean;
node --import tsx --test tests/storage-cantopen-hint.test.ts8/8.