Skip to content

channel: READS lacks delivery-board and delivery-probe, so read-only mode denies both #1225

Closed

Description

@Birfy

来源:#1219 审查过程中由 Reviewer 发现(读代码 + 真跑),标注非阻断,与那张 PR 的 authz 修复分开处理,所以单开。

现象

core/src/host/channel.js 的 READS 集合里有大量只读端点,但没有 delivery-board,也没有 delivery-probe。当另一个 dsh 进程持有 state.lock、本窗口处于只读模式时,这两个端点都会被判成 bot/read-only:

  • delivery-board(#1173 起就在用)——旧账,不是本次引入;
  • delivery-probe(#1211 新增的诊断入口)——跟随 #1219 落地。

两者都是纯粹的读操作(delivery-probe 只发五个 GET,delivery-board 只读 GitHub 与本地快照),只读模式的语义应该允许它们,而不是让用户在一个「另一个窗口开着」的状态下连看板都打不开。

建议改法

  1. channel.js 的 READS 加 delivery-board 与 delivery-probe 两项。
  2. 加一条用例:构造只读状态(另一个 live pid 持 state.lock),断言两个端点都返回正常结果而不是 bot/read-only;刀证是去掉 READS 里那一项后用例变红。
  3. 若 channel.js 的改法落在某个 patches/ds-bot/*.patch 所覆盖的文件上,记得重新生成该 patch(有 git 时用 generate,无 git 才手改)并跑 node scripts/ds-bot-patches.mjs check。

不做

  • 不在 #1219 里顺手改:那张单正在收 authz 的白名单缺口(delivery-probe 没进 authz.js 允许行,已登录实例里诊断按钮返回 Unknown endpoint——那条是阻断项,两条性质不同,不要混)。
  • 标签留 Triage:从现有六个 area:* 里挑,不要用已删除的 area:host。

Activity

  1. added
    bug
    agent-ready
    area:security
    on Oct 26, 2026
  2. Birfy commented on Oct 26, 2026

    @Birfy
    CollaboratorAuthor

    Triage(2026-10-26):查重完成,结论 agent-ready(标签 bug + area:security + agent-ready)。

    1. 查重

    • 不重复。#1219 已经合入(merged_at 03:59:54Z,tip 2477ab06),它修的是另一层:authz.js 允许行里缺 delivery-probe(已登录实例里诊断按钮返回 Unknown endpoint,阻断项)。
    • 本单是 channel.js 的 READS 只读白名单(另一个 dsh 持 state.lock 时的只读模式)。两条性质不同,#1219 故意不含这条、本单接它 —— 与正文写的一致。

    2. 标签口径

    area:security(authz 白名单就是这层的语义:「谁能读」,按可见面不是 UI 问题:面板打不开是结果,根因在授权判定)。不用 area:host(本体已删、别再打)。

    3. 落点与验收

    正文三条已经够写,补两点:

    • 两个端点一起加:delivery-board 是旧账(#1173 起就在用),delivery-probe 是 #1219 新增的;只加新端点会留下同一类洞。
    • 用例要真的构造只读态(另一个 live pid 持 state.lock),别用桩把 readOnly 直接写成 true——否则「READS 少一项」这个刀口证不出来。刀证:删 READS 里那一项 → 对应用例红。
    • channel.js 若被某个 patches/ds-bot/*.patch 覆盖:有 git 用 generate,无 git 才手改,然后 node scripts/ds-bot-patches.mjs check 必须过。

    risk:T* 只由控制器写(不手写、不转录);core/src/host/** 属 T2;认领评论里带分支名。

  3. Birfy commented on Oct 26, 2026

    @Birfy
    CollaboratorAuthor

    Written-by: Dev3

    Claimed. Branch dev3/fix/1225-reads-delivery, off live main 58bd557574f5c066ff5e9b647c70abb16e8f9070.

    First step: add delivery-board and delivery-probe to READS in core/src/host/channel.js, with one read-only test that also proves a write is still refused.

  4. added
    agent-working
    on Oct 26, 2026
  5. self-assigned this
    on Oct 26, 2026
  6. removed
    agent-ready
    agent-working
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:securitybug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions