Repository navigation
[PR] fix: rank the node runtime's Low integrity label first in win32 EPERM hints; add non-blocking startup self-check (#5155) - #5160
Conversation
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9139-pr.5160.aa17c0aThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5160.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Review polish for #5160: the new src/integrity-label module was imported as "./integrity-label.ts" / "../integrity-label.ts" in persist-eperm.ts and storage/shadow.ts while cli.ts, logger.ts and integrity-selfcheck.ts already use the ".js" specifier. Normalize to ".js" so the module's import specifier is uniform across its four call sites and matches the repo's dominant ESM convention. Non-semantic: tsconfig allowImportingTsExtensions makes both resolve identically (NodeNext maps .js -> the .ts source). typecheck clean, integrity/persist/storage-cantopen/logger suites green (30/30).
[bot] 🏷 Synced: master was moving fast during this window (two merge cycles needed — #5294/#5292/#5253 batch, then #5163, then #5236 message-timestamps + kernel 0.0.173). Both merges were clean with zero conflicts; this PR's diff stays small and touches no files those merges rewrote semantically. Verified on the new head d04ebe7: typecheck clean + 32/32 targeted tests green (storage-cantopen-hint / persist-eperm / issue5154-selfcheck). State after push: |
d04ebe7 to
619ed00
Compare
(ai: vllm-qwen/qwen3.8-27b) rebase 完成(簇攻坚 #5302 攻击序第 3 项):分支已重建为当前 master 顶上的单个线性提交 619ed00(force-with-lease 更新 PR 头)。
|
… hints; single linear commit on current master (#5155) Rebuilt from the original branch content (identical diff) onto current master: the old head had accumulated repeated merge-guard 'merge master' commits. The startup self-check half (#5154 warnIfLowIntegrityRuntime) already landed on master separately — this commit carries the remaining delta only: the shared integrityLabelDiagnosis helper wired into the log-reopen warn and the persist-EPERM alert, CONFIGURATION.md evidence-order text, and the two ordering gate tests.
619ed00 to
0a0be94
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复 — this run is the CI conflict-fix lane for PR #5160 itself; no new issue/PR opened. Conflict resolution complete. The branch was ~1572 commits behind master ( Two real conflicts, both resolved as a union of intent:
Everything else ( Targeted verification (local): 七问(中文结论)
判定:冲突已解除(live 查证 mergeable=true),等 CI 跑完即可进入人工合并;若 CI 出现红项,由本车道的后续触发继续处理。 |
(ai: vllm-qwen/qwen3.8-27b) Status report after process restart — work from the previous run is complete and verified live in this run. Nothing regressed while the session was down. Previous run (before the restart): rebased the single-commit branch onto master Re-verified against live sources in THIS run (fresh fetch + single PR GET + mirror check cache):
No action needed from anyone right now. If any check comes back red, this same lane picks it up on the next trigger (attempts 2/3 available). 七问(本 run:重启后核实与汇报)
判定:冲突修复维持有效,等剩余 CI 跑完即可人工合并;若出现红项由本车道后续触发继续处理。 |
[ework] CI fix verified green ✓ |
(ai: vllm-qwen/qwen3.8-27b) Verified live in this run: the reported blocker no longer exists — no action taken. The trigger described merge state
Deliberately did NOT push anything this run: there is no conflict to rebase (force-push is only authorized for an explicit conflict-rebase) and no red CI to fix. The PR is ready for a human merge; if the owner wants it rebased onto the newest master tip first, that's one click ("Update branch") or say the word and I'll do it as a merge-base refresh. 七问(本 run:触发复核,未改任何代码)
判定:无需本轮修复;PR 可人工合并(如需先对齐最新 master,点「Update branch」即可)。若后续 CI 出现红项,由本车道下一轮触发处理。 |
[ework] CI fix verified green ✓ |
(ai: vllm-qwen/qwen3.8-27b) Closing out this run (full detail already posted above): the re-trigger claimed merge state What I did: verification only — fetch + head comparison, single PR-state GET, diff of the new master window against the PR file set, mirror check-cache read. Zero code or branch changes (force-push reserved for an explicit conflict-rebase; none exists). Outcome: no blocker remains. The PR is ready for a human merge as-is; optionally click "Update branch" first to absorb master's 13 commits (safe — no file overlap). If any red check appears later, this same CI lane picks it up on the next trigger. |
(ai: vllm-qwen/qwen3.8-27b) 重启后进度汇报:无阻塞、无待办——上一轮的工作在重启前已全部完成并汇报(见上方两条回复),本次卡住的原因是会话在发完最终报告后空闲等待,没有任何挂起的命令或操作。 重启后已重新做实时核查(不依赖记忆):
四项全部与此前一致:当前不存在任何阻塞项(无冲突、无红 CI)。PR 可直接人工合并;如需先对齐最新 master,点「Update branch」即可(已核实新 master 区间与本 PR 的 6 个文件零重叠)。本车道继续待命,若后续出现红项或新冲突,由下一轮触发处理。 |
[ework] CI fix verified green ✓ |
What / why
#5155 supplies reproducible A/B evidence (4/4) for the whole win32 EPERM-on-own-data family (#5096 crash loop, #4614 READONLY degrade, #5103 power-loss report): the real switch is not Defender/ACL/read-only-dir but the NTFS mandatory integrity label on the node executable itself — a Low-labeled node.exe cannot write Medium-labeled files even with correct ACLs (MIC no-write-up →
EPERM-4048 on every write), and relabeling Low→Medium fixed everything with zero AV/ACL change. This PR implements #5155's suggestions 2/3/4. Suggestion 1 (CA-bundle write degradation) is already implemented on the #5103 thread's branch2026-10-29_issue5103-startup-recovery-visibilityand is deliberately NOT duplicated here.Changes
icacls "<process.execPath>"+/setintegritylevel Medium); AV exclusion drops to second. The canonical diagnosis text lives in ONE place (src/integrity-label.ts) so the surfaces cannot drift:sqliteOpenFailureHint(src/storage/shadow.ts): index.db open refusal (CANTOPEN) and first-write refusal (attempt to write a readonly database, the SQLite unified storage degraded to legacy-only (bili v0.1.205, node v24.22.1, win32-x64) #4614/promptCache.routing is ignored by relay-affinity stamping; no way to persist per-endpoint prompt_cache_key abatement (0.1.209) #5103 field shape);warnReopenFailed, win32 + EPERM/EACCES only).src/integrity-selfcheck.ts, fired from cli.ts atbili start. Non-blocking spawn oficacls <realpath(process.execPath)>(win32 only, 3s timeout, 8KB cap); parses the mandatory ACE; Low/Very Low → one prominent[integrity] …warn naming the cause and the exact fix commands (incl. the non-recursive parent-dir convergence for inherited labels). Fail-open by construction: missing icacls / timeout / unparseable output = silent. Node has no built-in LABEL_SECURITY_INFORMATION API, so the probe reads the same security database via icacls output.Behavior changes (old → new)
Log/hint wording only, plus one new conditional warn line:
[integrity]startup warn appears ONLY on win32 with a Low/Very Low runtime label.sqliteOpenFailureHintnow also matchesattempt to write a readonly database(was CANTOPEN-only) — superset of the pending extension in the promptCache.routing is ignored by relay-affinity stamping; no way to persist per-endpoint prompt_cache_key abatement (0.1.209) #5103 branch / PR [PR] fix: name the win32 READONLY index.db open failure; drop the delete advice under OS-level refusals (#4614) #4625; see coordination below.Coordination (hot-file overlap)
2026-10-29_issue5103-startup-recovery-visibility(promptCache.routing is ignored by relay-affinity stamping; no way to persist per-endpoint prompt_cache_key abatement (0.1.209) #5103 thread; pushed, no PR opened yet) also extendssqliteOpenFailureHintto the READONLY form and adds its ownstartupFailureHints(src/index.ts) + CA-degrade warn (src/ca.ts), both currently AV-first. Its shadow.ts hunk is semantically subsumed by this PR's version (same regex extension, reordered text) — resolve any merge conflict by taking this PR's text. Commented in that thread asking it to flip its two hint texts to integrity-first (reusingsrc/integrity-label.ts) before opening its PR.Verification
Targeted local runs green: 67/67 across tests/integrity-selfcheck.test.ts (new: all five levels parse, fail-open negatives, warn positive/negative gate per #3617), tests/storage-cantopen-hint.test.ts (ordering pinned both directions, READONLY shape fires, non-matching errors stay silent, platform gate both directions), tests/persist-eperm.test.ts (ordering pinned) plus all logger suites and proxy-persist (unchanged pins still hold). typecheck clean; full build green. Full regression = CI on this head.
Closes #5155