Skip to content

palette: search the whole message text, not just the outline preview #3139

Closed

Description

@HugoXK

Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.

Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 3bed2a9b737b41e59a949f9907097f75
Branch: dev/1-palette-fulltext
Base: 16915af
At: 2026-11-17T05:30:26Z

缺陷

palette 的全文搜索只覆盖有界预览(outline 尾 120 字),超过该预算的历史行永远搜不到;chats.search 端点不存在,palette 也无法按全文命中落到具体 turn。用户能看到一段历史,却搜不出它。

红先(base 16915af98,实现前逐条亲跑)

  1. core/test/chat-index-writers.test.js「the whole-text search finds a line past the outline budget, with its turn (P-820)」→ TypeError: host.rt.searchHomeChat is not a function
  2. 同文件「chats.search answers through the channel with only the caller's chats (P-820)」→ 真 /api/bot 路由答 {"ok":false,"error":{"code":"bot/not-found","message":"Unknown endpoint chats.search"}}
  3. core/test/authz.test.js「chats.search is a signed-in member read (P-820)」→ 签到 actor 同样被 bot/not-found: Unknown endpoint chats.search 拒
  4. core/test/palette-preview.test.js「P-820: a hit past the outline preview budget is found by the whole-text group」→ 存档 outline 尾 120 字裁断('x'.repeat(119)+'…')后按投影谓词搜 needle 0 命中(对照组 NEEDLE 在前 120 内命中),palette 全程不问 host(actual []),没有「Messages (full text)」组

期望

  1. 尾 300 字处的 NEEDLE 能命中,并带上它所在的 turn(预览预算之外的正文可搜)。
  2. 点击命中项走 openSession(chat, {turn}) 落到该 turn。
  3. chats.search 是签到的成员级只读端点,经真路由只回调用者自己的会话:双成员 seed 下 owner-2 签到只回 bot b 的行,owner-1 的 solo 不回;只读窗口也能搜。

范围

palette 全文搜索接线:host 索引(lines.turn / marks.turnNo 列、INDEX_VERSION 4→5 走既有重建路径,searchHomeChat 与 searchOwnChat 共用 matchedRows 核,searchOwnChat 逐字节不变)、chats.search 端点走 view(actor) 口径裁剪并进 READS 白名单、palette 新增全文组与 i18n 文案、对应测试。T3(core/src/host/channel.js)。分支 dev/1-palette-fulltext,base 16915af98。

验证

core lint + arch-docs(13 changed files,双 subsystem 文档已更)、lint-plugins、build-client --check、patches check + canonical 全过;core 套件 3276/3277,唯一红是既知环境项 bench.sh shows a failed pnpm install(mkdir: not found,同 base 纯净 detached worktree 复现同红);其余 11 步逐条全绿。

查重:上游 issue/PR 搜 palette fulltext、chats.search 均 0 命中;live main 16915af98 上 searchHomeChat 与 chats.search 不存在,无同题在飞单。

Activity

  1. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: 3bed2a9b737b41e59a949f9907097f75
    At: 2026-11-17T07:02:21Z

  2. HugoXK commented on Nov 17, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: 3bed2a9b737b41e59a949f9907097f75
    At: 2026-11-17T08:45:18Z

  3. HugoXK commented on Nov 18, 2026

    @HugoXK
    ContributorAuthor

    Heartbeat

    Written-by: FlyBot Lead
    Still-working: 3bed2a9b737b41e59a949f9907097f75
    At: 2026-11-18T00:12:50Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions