From 1c069c68bcab9a215b4f1cf0756ba334b08a9f72 Mon Sep 17 00:00:00 2001 From: Eliver Date: Mon, 9 Nov 2026 10:45:37 +0800 Subject: [PATCH 1/4] feat: warn when dsh's iot-thinking plugin is installed iot-thinking issues its own extra compress/rewrite model call after every reply; both calls share one session lane, so the step keeps waiting seconds to tens of seconds after its first byte (measured: the extra request shape was 44% of one session's requests, p50 ~7s, and vanished when the plugin was disabled). Owners could not see the cause from bili's side. Register a fourth builtin notice (KDD #16 surface, no new channel): - src/notice-store.ts: iot-incompat id + dismissal allowlist - src/notices.ts: probeDshIotThinking scans dsh profile dirs for node_modules/dsh-plugin-iot-thinking (never throws; advisory) - src/web/i18n.ts: en/zh copy - tests: registry id/allowlist rows + hermetic detection/dismissal suite --- src/notice-store.ts | 7 ++++- src/notices.ts | 40 +++++++++++++++++++++++++- src/pck-notice.ts | 4 +-- src/web/i18n.ts | 8 ++++++ tests/iot-incompat-notice.test.ts | 48 +++++++++++++++++++++++++++++++ tests/notice-registry.test.ts | 13 +++++++-- 6 files changed, 113 insertions(+), 7 deletions(-) create mode 100644 tests/iot-incompat-notice.test.ts diff --git a/src/notice-store.ts b/src/notice-store.ts index 9083337185..289452f4c8 100644 --- a/src/notice-store.ts +++ b/src/notice-store.ts @@ -24,8 +24,13 @@ export const PCK_NOTICE_ID = "pck-default-off"; // #5403 watermark fastpath experimental-grey intro (owner ruling 2026-11-02): // own id so dismissal stays independent of pck's. export const WM_FASTPATH_INTRO_ID = "wm-fastpath-intro"; +// Owner report 2026-11-09: dsh's iot-thinking plugin fires one extra +// compress/rewrite request after every model reply, occupying the SAME +// session's proxy lane serially — the step keeps waiting seconds to tens of +// seconds after its first byte. Own id so its dismissal is independent. +export const IOT_INCOMPAT_NOTICE_ID = "iot-incompat"; -const UPGRADE_NOTICE_IDS: ReadonlySet = new Set([PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID]); +const UPGRADE_NOTICE_IDS: ReadonlySet = new Set([PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID, IOT_INCOMPAT_NOTICE_ID]); // #5548 P2: local announcements dismiss as `@` so edited // content re-nags exactly once; the hash shape is the only dynamic form the // store accepts (raw local ids never enter it — those use instance/always). diff --git a/src/notices.ts b/src/notices.ts index 1573e4e44f..db864aa5e8 100644 --- a/src/notices.ts +++ b/src/notices.ts @@ -4,9 +4,12 @@ // other file touches per-notice code again. Display semantics (tone color, // action words) come from the web layer; activity predicates live HERE so the // server-side judgment never scatters back into route handlers. +import fs from "node:fs"; +import path from "node:path"; import { effectivePromptCacheRouting, loadConfigFile } from "./config.js"; +import { dshProfileDirs } from "./dsh-channel.js"; import { featureOverrideAbsent } from "./rollout.js"; -import { PCK_NOTICE_ID, dismissedUpgradeNotices, pckNoticeActive, WM_FASTPATH_INTRO_ID } from "./pck-notice.js"; +import { IOT_INCOMPAT_NOTICE_ID, PCK_NOTICE_ID, dismissedUpgradeNotices, pckNoticeActive, WM_FASTPATH_INTRO_ID } from "./pck-notice.js"; interface NoticeEntry { readonly id: string; @@ -36,8 +39,43 @@ export const NOTICES: readonly NoticeEntry[] = [ !dismissedUpgradeNotices(process.env).has(WM_FASTPATH_INTRO_ID) && featureOverrideAbsent("pluginFullResendWatermark", loadConfigFile().rollout), }, + // Owner report 2026-11-09: dsh's iot-thinking plugin rewrites/hides the + // thinking channel through a SECOND, self-issued model call after every + // reply. Both calls share one session lane, so the step keeps waiting + // after its first byte — the measured gap tracked that rewrite call's own + // latency (p50 ~7s per step) and the extra requests vanished when the + // plugin was disabled (44% of one session's requests were that shape). + // Installed ⇒ warn; presence is the whole predicate, no config knobs. + { + id: IOT_INCOMPAT_NOTICE_ID, + tone: "warn", + keys: { on: "iotcompat.on", desc: "iotcompat.desc", hint: "iotcompat.hint", dismiss: "iotcompat.dismiss_btn" }, + active: () => + !dismissedUpgradeNotices(process.env).has(IOT_INCOMPAT_NOTICE_ID) && + probeDshIotThinking(process.env), + }, ]; +/** Uncached: does ANY dsh profile carry the iot-thinking plugin? Never throws + * (no profiles / unreadable home ⇒ false — an advisory must not fail a page). */ +export function probeDshIotThinking(env: NodeJS.ProcessEnv = process.env): boolean { + let dirs: string[]; + try { + dirs = dshProfileDirs(env); + } catch { + return false; + } + for (const dir of dirs) { + try { + if (fs.existsSync(path.join(dir, "node_modules", "dsh-plugin-iot-thinking", "package.json"))) return true; + } catch { + // unreadable profile: keep scanning the rest + } + } + return false; +} + + /** Currently-visible notices, in registry order. Never throws. */ export function visibleNotices(): Array<{ id: string; tone: "ok" | "warn"; keys: NoticeEntry["keys"] }> { const out: Array<{ id: string; tone: "ok" | "warn"; keys: NoticeEntry["keys"] }> = []; diff --git a/src/pck-notice.ts b/src/pck-notice.ts index 68e81cd2f5..c93d8172c4 100644 --- a/src/pck-notice.ts +++ b/src/pck-notice.ts @@ -27,9 +27,9 @@ import { persistDismissedKey, unifiedReceiptsActive, } from "./notice-store.js"; -import { PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID } from "./notice-store.js"; +import { IOT_INCOMPAT_NOTICE_ID, PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID } from "./notice-store.js"; -export { PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID }; +export { IOT_INCOMPAT_NOTICE_ID, PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID }; const DISMISS_FILE = "upgrade-notices.json"; diff --git a/src/web/i18n.ts b/src/web/i18n.ts index 95ad37ed4d..aa30714195 100644 --- a/src/web/i18n.ts +++ b/src/web/i18n.ts @@ -299,6 +299,10 @@ export const MESSAGES: Record> = { "wmfast.desc": "长会话每轮都要把整个历史重新发给代理解析一遍,现在改为增量解析:只解析本轮新增的那部分,优化长会话的解析性能(发给模型的内容不变;有任何疑点,当轮自动回退老路径并重新对齐)。当前版本对约 5% 的安装灰度开启,属实验性功能。", "wmfast.hint": "开关在「配置」页快速配置(大上下文增量解析),也可在 billion-context.json 写 rollout.features.pluginFullResendWatermark: true/false,或设环境变量 BILI_ROLLOUT_PLUGIN_FULL_RESEND_WATERMARK=1/0。", "wmfast.dismiss_btn": "我知道了", + "iotcompat.on": "检测到不兼容插件:dsh 的 iot-thinking(会造成额外等待)", + "iotcompat.desc": "该插件在每次模型回复后额外发起一轮自己的压缩/改写请求,占用同一会话的代理通道并串行执行——表现为首字已经回来,这一步还要再等数秒到十几秒;开启压缩时会话内排队更明显。", + "iotcompat.hint": "建议在 dsh 侧关闭或卸载 dsh-plugin-iot-thinking(其 config.json 里 enabled=false,或 dsh plugin --profile remove dsh-plugin-iot-thinking);bili 侧无需改动。", + "iotcompat.dismiss_btn": "我知道了", "notices.dismissed": "已关闭该提示", "notices.dismiss_btn": "我知道了", "ses.title": "会话", @@ -1043,6 +1047,10 @@ export const MESSAGES: Record> = { "pckoff.desc": "Since this version bili no longer adds OpenAI's prompt_cache_key field to requests on its own (previously on by default). If your upstream routes prefix cache by this key (relays such as workbuddy panel/hub, account pools), turn the switch back on — otherwise traffic may route randomly and miss the prefix cache.", "pckoff.hint": "Switch: Configuration page → quick config (promptCache.routing: disabled/auto/enabled), or edit billion-context.json directly; direct official-API users can ignore this notice.", "pckoff.dismiss_btn": "Got it", + "iotcompat.on": "Incompatible plugin detected: dsh's iot-thinking (adds extra waiting)", + "iotcompat.desc": "After every model reply this plugin issues its own extra compress/rewrite request through the SAME session lane, serially — the step keeps waiting for seconds to tens of seconds after its first byte has arrived; the queueing is more visible while compression is active.", + "iotcompat.hint": "Disable or uninstall dsh-plugin-iot-thinking on the dsh side (set enabled=false in its config.json, or run dsh plugin --profile remove dsh-plugin-iot-thinking). Nothing needs to change in bili.", + "iotcompat.dismiss_btn": "Got it", "wmfast.on": "New: incremental parsing for large contexts (incremental-compression bridge feature, experimental)", "wmfast.desc": "Long conversations used to re-send their entire history for parsing on every turn. Now only the new part of each turn is parsed — faster parsing on long sessions (the request sent to the model is unchanged; any doubt falls back to the old path for that turn and re-aligns). This release rolls it out to roughly 5% of installs; it is marked experimental.", "wmfast.hint": "Switch: Configuration page → quick config (incremental parsing for large contexts), or write rollout.features.pluginFullResendWatermark: true/false in billion-context.json, or set BILI_ROLLOUT_PLUGIN_FULL_RESEND_WATERMARK=1/0.", diff --git a/tests/iot-incompat-notice.test.ts b/tests/iot-incompat-notice.test.ts new file mode 100644 index 0000000000..9a232c61fc --- /dev/null +++ b/tests/iot-incompat-notice.test.ts @@ -0,0 +1,48 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; + +// Owner report 2026-11-09: dsh's iot-thinking plugin issues one extra +// compress/rewrite call after every reply; both calls share one session lane, +// so the step waits seconds after its first byte. The registry exposes that as +// a warn notice; detection is a plain "is it installed in any dsh profile". +// Hermetic: fresh DSH_HOME (no profiles), state and config isolated. + +const home = fs.mkdtempSync(path.join(os.tmpdir(), "iot-incompat-home-")); +process.env.DSH_HOME = home; +process.env.XDG_STATE_HOME = fs.mkdtempSync(path.join(os.tmpdir(), "iot-incompat-state-")); +process.env.BILI_CONFIG_FILE = path.join(fs.mkdtempSync(path.join(os.tmpdir(), "iot-incompat-cfg-")), "absent.json"); + +const { NOTICES, probeDshIotThinking } = await import("../src/notices.ts"); +const { IOT_INCOMPAT_NOTICE_ID, dismissUpgradeNotice } = await import("../src/pck-notice.ts"); + +const entry = () => { + const found = NOTICES.find((n) => n.id === IOT_INCOMPAT_NOTICE_ID); + assert.ok(found, "registry carries the iot-incompat entry"); + return found; +}; + +test("no dsh profiles ⇒ not detected, notice inactive", () => { + assert.equal(probeDshIotThinking(process.env), false); + assert.equal(entry().active(), false); +}); + +test("plugin installed in one profile ⇒ detected, notice active", () => { + const pkg = path.join(home, "profiles", "web", "node_modules", "dsh-plugin-iot-thinking"); + fs.mkdirSync(pkg, { recursive: true }); + fs.writeFileSync(path.join(pkg, "package.json"), JSON.stringify({ name: "dsh-plugin-iot-thinking", version: "0.0.0" })); + assert.equal(probeDshIotThinking(process.env), true); + assert.equal(entry().active(), true); +}); + +test("dismissal hides the notice for later polls", () => { + assert.equal(dismissUpgradeNotice(IOT_INCOMPAT_NOTICE_ID, process.env), true); + assert.equal(entry().active(), false); +}); + +test("a different dsh home without profiles probes clean", () => { + const other = fs.mkdtempSync(path.join(os.tmpdir(), "iot-incompat-home2-")); + assert.equal(probeDshIotThinking({ ...process.env, DSH_HOME: other }), false); +}); diff --git a/tests/notice-registry.test.ts b/tests/notice-registry.test.ts index 347929a3c8..65c02544f9 100644 --- a/tests/notice-registry.test.ts +++ b/tests/notice-registry.test.ts @@ -12,17 +12,20 @@ import path from "node:path"; const stateDir = fs.mkdtempSync(path.join(os.tmpdir(), "notice-reg-state-")); const cfgPath = path.join(fs.mkdtempSync(path.join(os.tmpdir(), "notice-reg-cfg-")), "absent.json"); +// Hermetic dsh home too: the iot-thinking probe must see NO profiles here, or +// a developer machine that has the plugin installed changes the expectations. +process.env.DSH_HOME = fs.mkdtempSync(path.join(os.tmpdir(), "notice-reg-dsh-")); process.env.XDG_STATE_HOME = stateDir; process.env.BILI_CONFIG_FILE = cfgPath; const { NOTICES, visibleNotices } = await import("../src/notices.ts"); -const { PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID, dismissUpgradeNotice } = await import("../src/pck-notice.ts"); +const { IOT_INCOMPAT_NOTICE_ID, PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID, dismissUpgradeNotice } = await import("../src/pck-notice.ts"); const { MESSAGES, LOCALES } = await import("../src/web/i18n.ts"); test("registry: unique ids, valid tones, every key resolves in both locales", () => { const ids = NOTICES.map((n) => n.id); assert.equal(new Set(ids).size, ids.length, "ids must be unique"); - assert.deepEqual([...ids].sort(), [PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID].sort()); + assert.deepEqual([...ids].sort(), [IOT_INCOMPAT_NOTICE_ID, PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID].sort()); for (const n of NOTICES) { assert.ok(n.tone === "ok" || n.tone === "warn", `${n.id} tone`); for (const locale of LOCALES) { @@ -34,12 +37,16 @@ test("registry: unique ids, valid tones, every key resolves in both locales", () } }); -test("visibleNotices: fresh install sees both, registry order", () => { +test("visibleNotices: fresh install sees both, registry order (iot absent ⇒ hidden)", () => { const v = visibleNotices(); assert.deepEqual(v.map((n) => n.id), [PCK_NOTICE_ID, WM_FASTPATH_INTRO_ID]); assert.deepEqual(v.map((n) => n.tone), ["warn", "ok"]); }); +test("iot notice id is a dismissible builtin (no 400 on close)", () => { + assert.equal(dismissUpgradeNotice(IOT_INCOMPAT_NOTICE_ID, process.env), true); +}); + test("visibleNotices: dismissing one hides only that one", () => { assert.equal(dismissUpgradeNotice(WM_FASTPATH_INTRO_ID, process.env), true); const v = visibleNotices(); From 65fcba1a2c9f607875b89d39178c0aacfe9edd2e Mon Sep 17 00:00:00 2001 From: Eliver Date: Mon, 9 Nov 2026 11:35:04 +0800 Subject: [PATCH 2/4] fix: warn about iot-thinking only while it is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Installed-but-disabled is the healthy state: the plugin's extra rewrite call is what produces the post-first-byte wait, and turning it off removes it. Gate the notice on the plugin's own effective switch instead of bare presence (missing/broken config keeps the plugin default, enabled). Verified on the owner's machine: installed=true, enabled=false ⇒ active=false. --- src/notices.ts | 21 +++++++++++++++++++-- src/web/i18n.ts | 4 ++-- tests/iot-incompat-notice.test.ts | 29 +++++++++++++++++++++++++---- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/notices.ts b/src/notices.ts index db864aa5e8..2db3ba36c4 100644 --- a/src/notices.ts +++ b/src/notices.ts @@ -7,6 +7,7 @@ import fs from "node:fs"; import path from "node:path"; import { effectivePromptCacheRouting, loadConfigFile } from "./config.js"; +import { resolveDshHome } from "./client-config.js"; import { dshProfileDirs } from "./dsh-channel.js"; import { featureOverrideAbsent } from "./rollout.js"; import { IOT_INCOMPAT_NOTICE_ID, PCK_NOTICE_ID, dismissedUpgradeNotices, pckNoticeActive, WM_FASTPATH_INTRO_ID } from "./pck-notice.js"; @@ -45,14 +46,16 @@ export const NOTICES: readonly NoticeEntry[] = [ // after its first byte — the measured gap tracked that rewrite call's own // latency (p50 ~7s per step) and the extra requests vanished when the // plugin was disabled (44% of one session's requests were that shape). - // Installed ⇒ warn; presence is the whole predicate, no config knobs. + // Installed AND not switched off in its own config ⇒ warn (owner ruling + // 2026-11-09: disabling the plugin removes the extra wait, so the notice + // must go away with it and only reappear when it is turned back on). { id: IOT_INCOMPAT_NOTICE_ID, tone: "warn", keys: { on: "iotcompat.on", desc: "iotcompat.desc", hint: "iotcompat.hint", dismiss: "iotcompat.dismiss_btn" }, active: () => !dismissedUpgradeNotices(process.env).has(IOT_INCOMPAT_NOTICE_ID) && - probeDshIotThinking(process.env), + dshIotThinkingActive(process.env), }, ]; @@ -75,6 +78,20 @@ export function probeDshIotThinking(env: NodeJS.ProcessEnv = process.env): boole return false; } +/** Installed AND effective-enabled. The plugin's own default is enabled + * (its config-store seeds enabled: true), so a missing/unreadable config + * keeps the warning; only an explicit enabled: false silences it. */ +export function dshIotThinkingActive(env: NodeJS.ProcessEnv = process.env): boolean { + if (!probeDshIotThinking(env)) return false; + try { + const raw = fs.readFileSync(path.join(resolveDshHome(env), "plugin-data", "iot-thinking", "config.json"), "utf8"); + const doc: unknown = JSON.parse(raw); + if (doc !== null && typeof doc === "object" && (doc as { enabled?: unknown }).enabled === false) return false; + } catch { + // absent/broken config ⇒ plugin runs on its default (enabled) + } + return true; +} /** Currently-visible notices, in registry order. Never throws. */ export function visibleNotices(): Array<{ id: string; tone: "ok" | "warn"; keys: NoticeEntry["keys"] }> { diff --git a/src/web/i18n.ts b/src/web/i18n.ts index aa30714195..1dc3aaffc0 100644 --- a/src/web/i18n.ts +++ b/src/web/i18n.ts @@ -301,7 +301,7 @@ export const MESSAGES: Record> = { "wmfast.dismiss_btn": "我知道了", "iotcompat.on": "检测到不兼容插件:dsh 的 iot-thinking(会造成额外等待)", "iotcompat.desc": "该插件在每次模型回复后额外发起一轮自己的压缩/改写请求,占用同一会话的代理通道并串行执行——表现为首字已经回来,这一步还要再等数秒到十几秒;开启压缩时会话内排队更明显。", - "iotcompat.hint": "建议在 dsh 侧关闭或卸载 dsh-plugin-iot-thinking(其 config.json 里 enabled=false,或 dsh plugin --profile remove dsh-plugin-iot-thinking);bili 侧无需改动。", + "iotcompat.hint": "建议在 dsh 侧关闭或卸载 dsh-plugin-iot-thinking(其 config.json 里 enabled=false,或 dsh plugin --profile remove dsh-plugin-iot-thinking);关闭后本提示会自动消失,bili 侧无需改动。", "iotcompat.dismiss_btn": "我知道了", "notices.dismissed": "已关闭该提示", "notices.dismiss_btn": "我知道了", @@ -1049,7 +1049,7 @@ export const MESSAGES: Record> = { "pckoff.dismiss_btn": "Got it", "iotcompat.on": "Incompatible plugin detected: dsh's iot-thinking (adds extra waiting)", "iotcompat.desc": "After every model reply this plugin issues its own extra compress/rewrite request through the SAME session lane, serially — the step keeps waiting for seconds to tens of seconds after its first byte has arrived; the queueing is more visible while compression is active.", - "iotcompat.hint": "Disable or uninstall dsh-plugin-iot-thinking on the dsh side (set enabled=false in its config.json, or run dsh plugin --profile remove dsh-plugin-iot-thinking). Nothing needs to change in bili.", + "iotcompat.hint": "Disable or uninstall dsh-plugin-iot-thinking on the dsh side (set enabled=false in its config.json, or run dsh plugin --profile remove dsh-plugin-iot-thinking); this notice disappears once it is off. Nothing needs to change in bili.", "iotcompat.dismiss_btn": "Got it", "wmfast.on": "New: incremental parsing for large contexts (incremental-compression bridge feature, experimental)", "wmfast.desc": "Long conversations used to re-send their entire history for parsing on every turn. Now only the new part of each turn is parsed — faster parsing on long sessions (the request sent to the model is unchanged; any doubt falls back to the old path for that turn and re-aligns). This release rolls it out to roughly 5% of installs; it is marked experimental.", diff --git a/tests/iot-incompat-notice.test.ts b/tests/iot-incompat-notice.test.ts index 9a232c61fc..45a067be8e 100644 --- a/tests/iot-incompat-notice.test.ts +++ b/tests/iot-incompat-notice.test.ts @@ -7,7 +7,8 @@ import path from "node:path"; // Owner report 2026-11-09: dsh's iot-thinking plugin issues one extra // compress/rewrite call after every reply; both calls share one session lane, // so the step waits seconds after its first byte. The registry exposes that as -// a warn notice; detection is a plain "is it installed in any dsh profile". +// a warn notice, gated on "installed AND still enabled" (disabling the plugin +// removes the wait, so the notice must go away with it). // Hermetic: fresh DSH_HOME (no profiles), state and config isolated. const home = fs.mkdtempSync(path.join(os.tmpdir(), "iot-incompat-home-")); @@ -15,7 +16,7 @@ process.env.DSH_HOME = home; process.env.XDG_STATE_HOME = fs.mkdtempSync(path.join(os.tmpdir(), "iot-incompat-state-")); process.env.BILI_CONFIG_FILE = path.join(fs.mkdtempSync(path.join(os.tmpdir(), "iot-incompat-cfg-")), "absent.json"); -const { NOTICES, probeDshIotThinking } = await import("../src/notices.ts"); +const { NOTICES, probeDshIotThinking, dshIotThinkingActive } = await import("../src/notices.ts"); const { IOT_INCOMPAT_NOTICE_ID, dismissUpgradeNotice } = await import("../src/pck-notice.ts"); const entry = () => { @@ -23,17 +24,37 @@ const entry = () => { assert.ok(found, "registry carries the iot-incompat entry"); return found; }; +const writeConfig = (doc: unknown): void => { + const dir = path.join(home, "plugin-data", "iot-thinking"); + fs.mkdirSync(dir, { recursive: true }); + fs.writeFileSync(path.join(dir, "config.json"), JSON.stringify(doc)); +}; test("no dsh profiles ⇒ not detected, notice inactive", () => { assert.equal(probeDshIotThinking(process.env), false); + assert.equal(dshIotThinkingActive(process.env), false); assert.equal(entry().active(), false); }); -test("plugin installed in one profile ⇒ detected, notice active", () => { +test("installed with no config yet ⇒ active (plugin default is enabled)", () => { const pkg = path.join(home, "profiles", "web", "node_modules", "dsh-plugin-iot-thinking"); fs.mkdirSync(pkg, { recursive: true }); - fs.writeFileSync(path.join(pkg, "package.json"), JSON.stringify({ name: "dsh-plugin-iot-thinking", version: "0.0.0" })); + fs.writeFileSync(path.join(pkg, "package.json"), JSON.stringify({ name: "dsh-plugin-iot-thinking", version: "0.2.0" })); + assert.equal(probeDshIotThinking(process.env), true); + assert.equal(dshIotThinkingActive(process.env), true); + assert.equal(entry().active(), true); +}); + +test("explicit enabled:false ⇒ installed but silent", () => { + writeConfig({ enabled: false }); assert.equal(probeDshIotThinking(process.env), true); + assert.equal(dshIotThinkingActive(process.env), false); + assert.equal(entry().active(), false); +}); + +test("turning it back on ⇒ notice returns", () => { + writeConfig({ enabled: true }); + assert.equal(dshIotThinkingActive(process.env), true); assert.equal(entry().active(), true); }); From 549bc542460514ee7f93b7e3d2ceda768af6d613 Mon Sep 17 00:00:00 2001 From: Eliver Date: Mon, 9 Nov 2026 15:48:48 +0800 Subject: [PATCH 3/4] fix(web): show built-in notice banners (missing .show class) --- src/web/client.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/web/client.ts b/src/web/client.ts index 6414556c49..939c3f7c10 100644 --- a/src/web/client.ts +++ b/src/web/client.ts @@ -1682,6 +1682,9 @@ function changelogCatOf(rawLine) { if (!n || typeof n !== "object" || typeof n.id !== "string") continue; const el = document.createElement("div"); el.className = "banner " + (n.tone === "ok" ? "ok" : n.tone === "warn" ? "warn" : ""); + // .banner is display:none until .show — #5548's loop never added it, + // so every merged notice (builtin + file + feed) rendered invisibly. + el.classList.add("show"); el.dataset.id = n.id; nr.appendChild(el); if (n.source !== "builtin") { From 8d202c38b9595b80d5ac74135425646ca9c46822 Mon Sep 17 00:00:00 2001 From: ci-check Date: Mon, 9 Nov 2026 16:38:32 +0800 Subject: [PATCH 4/4] test(web): stop i18n ref scanner treating filenames like package.json as catalog keys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR #6015 red CI (shards ubuntu/24/3, ubuntu/22/3, windows/22/4, all the same subtest): #1024 'every referenced key exists in both locales' failed with 'referenced key missing from zh catalog: package.json'. collectRefs()'s lenient bare-string rule (#5345) accepts any dot-quoted token as a live i18n reference; the new notices.ts probe writes the literals "package.json" / "config.json", which the rule misreads as keys. Drop tokens whose final segment is a file extension from that rule only — explicit t()/tr()/data-i18n references stay authoritative, and the two segments already proven to be key suffixes (summary.key, det.log) are kept out of the exclusion. --- tests/web-i18n.test.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/web-i18n.test.ts b/tests/web-i18n.test.ts index d99f3a4c00..9aae86d722 100644 --- a/tests/web-i18n.test.ts +++ b/tests/web-i18n.test.ts @@ -125,10 +125,18 @@ function collectRefs(): Set { // #5345: the pack editor builds its