Skip to content

feat(collect): route feishu browser and mcp, drop four channels - #189

Open
titanwings wants to merge 2 commits into
atomic/pr-0-verify-pipelinefrom
atomic/pr-4-collect-channels
Open

titanwings wants to merge 2 commits into
atomic/pr-0-verify-pipelinefrom
atomic/pr-4-collect-channels

Conversation

@titanwings

Copy link
Copy Markdown
Owner

Why

D5 选项 b。飞书 --mode browser 与 --mode mcp 必须到达对应模块。discord、notion、reddit、gmail 不再是契约渠道。丢掉的 --mode 不再静默变成 api。钉钉 --mode browser 必须到达模块里的同意门。栈停在 dot-skill-test,dot-skill 保留。

Scope

  • CHANNELS 与 --help 的 usage 行来自同一张表,为 feishu、slack、dingtalk、x。
  • 飞书接受 api、browser、mcp。钉钉与 x 接受 api、browser。slack 不接受 --mode。非法值退出 2,code collect/usage,remedy 列出合法值。回执 mode 等于用户给的值。
  • collect feishu --mode browser 没有同意时退出 2,status 为 waiting-for-user-consent,补救步骤指向 distilly consent grant --scope collect:feishu:browser。
  • collect dingtalk --mode browser 没有同意时退出 2,status 为 waiting-for-user-consent。
  • collect feishu --mode mcp 在空 HOME 下失败原因是 feishu_config.json,不是 --chat-id。
  • 非契约渠道返回 collect/unknown-channel,remedy 为 known channels: feishu, slack, dingtalk, x。
  • 删除 discord、notion、reddit、gmail 四个模块、两个测试文件,以及只被它们引用的 kit.mjs。
  • CONTRACT §1 第 25 行渠道列表改为四个。collect feishu --mode <api|browser|mcp> 写在命令代码块外。放进代码块会让 entry-surface 把 mode 枚举和渠道枚举比成同一组,产生不能写入基线的新 finding。
  • 基线只删本 PR 点名的行。

Blast Radius

slack 仍不接受 --mode。collect slack --mode browser 退出 2,code collect/usage,remedy 为 legal --mode values: none。tests/consent.test.mjs 未改。钉钉模块仍只支持 api 与 browser。

Verification

T03、T04、T05、T06、T07、T08、T18、T19、T20 由红转绿。

node scripts/run-gates.mjs --id audit-tests。基线父 SHA 为 9c8f1ce。之前 Node 22.14.0 输出 ratchet failing 22, baseline 22,门禁 PASS,6.3s。之后 Node 22.14.0 在 cd99139 输出 ratchet failing 13, baseline 13,7.8s。Node 20.20.2 同样是 ratchet failing 13, baseline 13,8.2s。

删掉的 audit-tests 基线是全部九行 R08 。剩 13 行数据。未删 R16、R17、R23、R24、R28、R38、R48、R49、R56、R58。

删掉的 entry-surface 基线九行。

  • enumerations: -collect: discord
  • enumerations: -collect: reddit
  • enumerations: -collect: notion
  • enumerations: -collect: gmail
  • channels: -collect discord: collect/unknown-channel
  • channels: -collect reddit: collect/unknown-channel
  • channels: -collect notion: collect/unknown-channel
  • channels: -collect gmail: collect/unknown-channel
  • error-codes: +collect/unknown-channel observed at runtime but documented nowhere

剩 5 行 finding。node scripts/run-gates.mjs --id entry-surface 在 Node 22.14.0 与 Node 20.20.2 都是 RESULT PASS。

node scripts/run-gates.mjs --without playwright。Node 22.14.0 为 8/8。Node 20.20.2 为 8/8。npm test 为 379 条,失败 0 条,cancelled 0。Node 22.14.0 与 Node 20.20.2 都是如此。

Node 22.14.0 上 DISTILLY_PLAYWRIGHT_ROOT=/tmp/pw-root node scripts/run-gates.mjs --requires playwright 为 3/3。三条 acceptance 都是 18/18 通过。us-house 含 FAIL · units=2744 speakers=18 attributed=175。

You see,Node 22.14.0,head cd99139。

  • collect --help 第一行是 distilly collect <feishu|slack|dingtalk|x> [options] [--json]。
  • collect discord --json 退出 2,remedy 为 known channels: feishu, slack, dingtalk, x。
  • 空 HOME 下 collect feishu --mode browser --json 退出 2,mode 为 browser,status 为 waiting-for-user-consent。
  • collect feishu --mode mcp --json 的 mode 为 mcp,错误是 no credential at ~/.distilly/feishu_config.json,不含 --chat-id。
  • 空 HOME 下 collect dingtalk --mode browser --json 退出 2,status 为 waiting-for-user-consent。

Rollback

回退 cd99139 与 2435fbe 即恢复四个渠道与旧的静默 api 降级。栈停在 dot-skill-test,dot-skill 保留。

D5 option b. Feishu --mode browser and mcp reach their modules.
discord, notion, reddit, and gmail leave the contract channel list.
CHANNEL_MODES omitted dingtalk, so collect dingtalk --mode browser was rejected as collect/usage before the consent gate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants