Repository navigation
fix(web): protectedTools row must address compress.protectedTools (#1948) - #1949
Conversation
The quick-config form read/wrote the top-level draft.protectedTools — a key the loader never consumes (not in KNOWN_TOP_LEVEL_KEYS), so saved values were ignored and warned about by warnUnknownTopLevelKeys as "belongs under compress". The row now reads cp.protectedTools in syncAll and writes d.compress.protectedTools like every other compress-level row.
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.1949-pr.1949.b1010d2This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr1949.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Review 结论 — PR #1949 已做验证:拉分支核对代码(对照原 issue #1948)、核对 base 与当前 master 一致(38a4758,无 stale base)、本地 typecheck / build / 定向测试( 结构化七问:
测试有效性:回归测试钉住 WEB_CLIENT 模板中的精确 wiring 字符串并断言旧 top-level wiring( diff 整洁度:干净——2 个文件(+27 −2),每一行都与 PR 目的相关,无无关改动、无 whitespace churn、无 lockfile/生成物变化(dist 未入库)。 判定:可合并。 CI 13/13 全绿(e2e lanes × 6 + test ubuntu/windows × node 22/24 + build-artifact + version-guard),本地定向验证全过,满足 §7.4 auto-merge gate(单模块纯 |
What changed
src/web/client.tsquick-config form: the Protected tools row read/wrote the top-leveldraft.protectedTools, while every other compress-level row addressesd.compress.*. Top-levelprotectedToolsis not a valid config key (absent fromKNOWN_TOP_LEVEL_KEYS), so saved values were silently ignored on load — and since #1817 every such config now also logs a warn ("protectedTools" belongs under "compress" (did you mean "compress.protectedTools"?)).syncAll()now readscp.protectedTools(cp =compressOf(draft)).d.compressexists and writes/deletesd.compress.protectedTools, mirroring the nudge / preserveRecentMessages / neverPreserveRecentTools rows.tests/web-ptools-position.test.ts: pins both paths to the compress level and asserts the top-level wiring (draft.protectedTools/d.protectedTools) cannot reappear.Config surface
None. No field added/renamed/re-semantics'd — the canonical key
compress.protectedTools(already inCOMPRESS_SETTING_FIELDS, documented in CONFIGURATION.md) is simply what the row now addresses. Migration story: none needed — values stored by the old row were never effective (the loader ignored them), so there is nothing to carry over; existing dead root-level entries are inert noise the #1817 warn already points at.Why not fix the loader instead
Top-level
protectedToolsshould stay unknown: the three-level compress hierarchy is the system for these knobs, and #1817's warning correctly flags any stray root placement.Pre-flight
typecheck clean · build clean · targeted tests pass (
tests/web-ptools-position.test.ts+tests/web-i18n.test.ts, 8/8) · dist verified to contain the corrected wiring.Fixes #1948