Skip to content

[PR] fix(notices): gate announcement records on the live conflict scan via requiresScan (#6508) - #6509

Merged
ranxianglei merged 3 commits into
masterfrom
2026-11-13_notice-requires-scan-gate
Nov 13, 2026
Merged

ranxianglei merged 3 commits into
masterfrom
2026-11-13_notice-requires-scan-gate

Conversation

@ranxianglei

@ranxianglei ranxianglei commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

这是啥问题

announcements/remote.json 里的 dsh-live-compact 冲突公告(#5984 的广播)对每台机器都显示——公告记录 schema 没有客户端/扫描结果维度的门,没装插件的机器也被横幅打扰。用户裁定:扫描到才可以显示,否则不要显示;并且(11-13 15:35)广播现在就要撤下来。

改了什么

  • NoticeRecord 新增可选字段 requiresScan: { client, knownId? }(src/announcements.ts):validateRecord 统一校验(client 限 SCAN_CLIENTS 已知集,knownId 可选非空 ≤80),并计入 contentHash16(CANON_ORDER)
  • noticePassesGates 新增扫描门:设置了 requiresScan 的记录,只有该客户端的只读插件注册表扫描确实报告对应插件(任一发现或 knownId 精确匹配)才可见;注册表为空/不匹配 = 隐藏(fails closed)。扫描结果按 client+cwd 缓存 5 min,轮询热路径不重复 IO
  • 撤广播(commit e1292c4):announcements/remote.json 的 entries 清空——门只对认识该字段的新版本生效,未升级的旧版本仍会无条件显示;要现在就让所有机器闭嘴,只能撤条目。合并后 feed watcher(~3 min)即生效,横幅在全版本消失。冲突扫描(dsh 车道,knownId dsh-live-compact)保持为唯一的实时暴露机制;机制留在代码里,日后新版本铺开后可直接重新加回该条目,无需再 review 门本身
  • 文档:configuration(en/ja/zh)remoteAnnouncementsUrl 行 + website/config-reference/updates.yaml(docs-sync 种子,ci-check e49f5d0)+ reference/design-decisions.md KDD release v0.1.5 #16 记录该字段

验证(本地全绿)

  • tsc --noEmit clean
  • tests/remote-announcements.test.ts 13/13(新增 4 个:gate 行为 hidden→shown→knownId 不匹配→any-finding;校验矩阵;remote 车道端到端「feed 送达但无插件 → 无横幅,装插件 → 出现」;master 已发布 remote.json 校验,含"已撤条目不得回到 feed"断言)
  • local-announcements / notice-registry / notice-unified-store / issue5548-dismiss / issue1206-thirdparty-scan 共 75/75
  • issue2861 / wm-fastpath-intro / iot-incompat / knobs-config-precedence 共 44/44
  • scripts/validate-remote-announcements.ts OK(0 entries valid);config-surface-guard OK;gen-config-docs check-coverage OK;lifecycle-ledger-guard OK;check-architecture-docs OK

真机核对:用户 ~/.dsh/profiles 下 13 个 profile 均未安装 dsh-live-compact → 撤条目后所有版本横幅消失;扫描机制不受影响,装了插件的机器照常收到 CLI WARNING / 会话台账 / acp_status 提醒。

Closes #6508(关联分析:#5984)

… requiresScan (#6508)

The dsh-live-compact-conflict entry in announcements/remote.json
broadcast to EVERY instance: NoticeRecord gates (versions/percent/time
window/dismiss) carry no client dimension, so the banner showed even on
machines where the plugin is not installed — contradicting the conflict
scan's 'flag only when found' semantics (#5984).

Add optional requiresScan: { client, knownId? } to the record schema
(validated by the shared validateRecord, counted in contentHash16):
when set, noticePassesGates keeps the record hidden unless that
client's read-only plugin-registry scan actually reports the plugin
(any finding, or a matching knownId). Empty registries scan empty, so
the gate fails closed and can never force user action. Scan results
are cached per client+cwd for 5 min, keeping hot poll paths cheap.

- remote.json: the #5984 entry now gates on dsh + dsh-live-compact
- docs: configuration (en/ja/zh) + KDD #16 record the field
- tests/remote-announcements.test.ts: gate behavior (hidden→shown→
  knownId mismatch→any-finding), validation matrix, remote-lane
  end-to-end, shipped-feed validation — hermetic DSH_HOME fixture,
  scan cache cleared per case
@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-11-13_notice-requires-scan-gate (e1292c4)

Latest build — install this exact version

npm install -g billion-context@0.0.9505-pr.6509.bae4ae9

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
e1292c4 billion-context@0.0.9505-pr.6509.bae4ae9 build
e49f5d0 billion-context@0.0.9503-pr.6509.c2eb3ad build
e6e4ad9 billion-context@0.0.9487-pr.6509.7a970c7 build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr6509.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(notices): gate announcement records on the live conflict scan via requiresScan (#6508) [PR] fix(notices): gate announcement records on the live conflict scan via requiresScan (#6508) Nov 13, 2026
ci-check and others added 2 commits November 13, 2026 15:08
…enerates it

The fix commit hand-edited the generated docs/configuration*.md tables;
docs-sync regenerates them from website/config-reference/*.yaml and
reverts the sentence, failing git diff --exit-code. Seed the same
en/zh/ja text in updates.yaml so the generator emits it verbatim.
…eed (#6508)

The entry's audience was "dsh profiles with the plugin", but until every
running instance upgrades to a build that understands requiresScan, old
versions show it unconditionally — the gate cannot reach them. Empty the
feed now (watcher picks it up within ~3 minutes of merge); the conflict
scan (dsh lane, knownId dsh-live-compact) remains the live surfacing
mechanism. The requiresScan mechanism stays in code so the announcement
can be re-added once the gated build is deployed, without re-reviewing
the gate itself.
@ranxianglei

Copy link
Copy Markdown
Owner Author

跟进(e1292c42c):按用户裁定,本 PR 同时撤掉广播——announcements/remote.json 的 entries 清空。原因:requiresScan 只对认识该字段的新版本生效,未升级的旧版本(当前绝大多数在跑的实例)仍会无条件显示这条横幅;要让所有机器现在闭嘴,只能撤条目。合并后 feed watcher ~3 分钟内拉空 feed,横幅在全版本消失。冲突扫描(dsh 车道 knownId dsh-live-compact)不受影响,仍是实时暴露机制;门留在代码里,日后新版本铺开后可直接把条目加回,无需再审门本身。真机:用户 13 个 dsh profile 均未装该插件,撤后全机器静默。

@ranxianglei
ranxianglei merged commit 2b37ae3 into master Nov 13, 2026
48 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.1185-master.2b37ae3 (rolling master tag).

npm install -g billion-context@0.0.1185-master.2b37ae3  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

Louie0806 pushed a commit to Louie0806/billion-context that referenced this pull request Nov 13, 2026
…nfirmation, blast-radius PRs, plugin notices trigger-only (ranxianglei#6508)

Owner ruling 2026-11-13, after the dsh-live-compact record (ranxianglei#5984) shipped
as an ungated remote-feed broadcast and had to be retracted (ranxianglei#6508/ranxianglei#6509):

1. strict prohibition on announcements visible to every machine unconditionally
2. explicit owner confirmation before ANY announcement PR (add/change/retract)
3. announcement PRs must state the blast radius: audience, version coverage
   (incl. which older versions ignore new gate fields), and display duration
4. plugin-targeted announcements disallowed in principle — plugin conflict
   surfacing belongs to the read-only conflict scan (ranxianglei#1206); a plugin-targeted
   notice must be trigger-based (scan surfaces, or a requiresScan-gated record)

AGENTS.md: new MANDATORY table row + 'Remote Announcements' section in §4;
reference/design-decisions.md: KDD ranxianglei#19 with the full ruling and precedent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant