Skip to content

fix(telegram): 接入官方 IM 定时正文投递与持久回执 - #4263

Open
FicoHub wants to merge 22 commits into
makecindy:mainfrom
FicoHub:fix/official-telegram-scheduled-delivery
Open

FicoHub wants to merge 22 commits into
makecindy:mainfrom
FicoHub:fix/official-telegram-scheduled-delivery

Conversation

@FicoHub

@FicoHub FicoHub commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

这次改了什么

摘要

本次补齐 POSIX 回执发布的目录同步:.sent / .result 发布并清理临时名后同步父目录及祖先;同步失败保留 claim、不会重发。新增四个反证用例旧实现全部失败,修复后投递套件 30/30、Desktop typecheck 和 Node 22 根 related(Desktop 242.2s、MCP 6.8s、协议 2.0s)通过。最新 head 的 CI 需独立核验;Windows 掉电耐久性 P1 仍开放。

为定时结果及用户明确授权的测试增加官方 Telegram 本人私聊出站入口,保留原文和实际回执。发送前核对当前绑定、连接 epoch、能力协商及授权,先持久认领再发出;结果未知不重发,迟到成功回执不能被旧写入降级。

最新修复在 MCP 和 Host 两层限制 plain 与 HTML 单段源码最多 4096 个 UTF-16 单位。超长内容在写 claim/网络前拒绝,修正正文后同一 key 仍可使用。HTML 采用保守源码预算,标签与实体也计入长度;调用者负责保持完整标签预先分段与展示验证,Host 不截断或改写原文。

变更类型

  • fix 缺陷修复
  • feat 官方本人 DM 独立出站入口

范围

  • 关联需求:定时结果通过已绑定官方 Telegram 本人私聊投递;维护者批准门 #4315 保留。
  • 包含 Host 发送桥、scheduler MCP、owner 范围的持久回执、增量协议校验及能力台账。
  • 本次同步 main,保留上游插件安装/Orca 目录授权与本 PR 的 Telegram 逐次授权;两侧测试均保留。
  • 不修改个人 bot、真实调度、邮箱账本或生产安装包;没有实际发送或历史补发。
  • 旧端缺省字段保持兼容;新客户端遇不支持主动发送的旧服务器拒发。

UI 变化

不涉及新 UI、样式或界面文案,使用现有 Host 授权流程。

怎么验证的

本轮验证

  • 长度反证:旧 Host 新用例 1 failed / 24 passed,旧 MCP 1 failed / 1 passed。
  • 最终 Host 26 passed、MCP 3 passed,覆盖两种 tier 的 4096/4097 UTF-16 边界、代理对字符、16000 长文本、零 claim/零发送、修正后同 key 成功、超长 HTML 字面文本和标签/实体源码。HTML 补充反证在旧 Host 2 failed / 24 passed、旧 MCP 2 failed / 1 passed。
  • 同步主干后授权套件 23 passed,保留 Telegram、插件安装与 Orca 工作目录各自边界。
  • 同步主干后的全量门禁已通过;最终 HTML 修复再次执行根 pnpm test:unit:related,Desktop 全量 224.8 秒、MCP 5.9 秒、协议 1.7 秒及测试 runner 均通过。
  • Desktop typecheck 通过。额外执行 MCP build(tsc --noEmit)发现未改动测试的 9 条类型错误;独立提取提交基线 01a9a16、复用相同依赖编译得到逐条完全相同的 9 条错误(sessionControlTools / submitGithubIssueTool);不称 MCP build 通过。协议包未定义 typecheck script,--if-present 自动跳过。
  • 首次根门禁失败来自本工作区 better-sqlite3 的 Electron/Node ABI 不匹配;已本地重编并通过 Node 内存数据库加载探针,之后重新验证。依赖产物不提交。
  • 相对 main 的最终 diff 检查通过;提交带 DCO。

既有验证与边界

既有反证涵盖并发 claim、SIGKILL/重启、旧 unknown 写入与迟到 sent 竞争、发送前目录同步失败零发送、连接/epoch/binding 在发帧前变化时明确 not_sent。两仓协议的 delivery 字段及回执 entities 校验保留。既有本地跨仓 fixture 回环不是官方 Telegram 实发验收。

风险

风险分类

  • 协议兼容
  • 权限 / 用户数据
  • 跨平台差异

影响与回滚

  • Windows 耐久性 P1 仍未解决:当前文件 fsync 路径尚无新目录层级+claim 的原生断电恢复证据,不能把 macOS 单测或 Windows CI 当掉电保证。原 thread 保持开放。
  • POSIX 同步 claim 文件及目录/祖先目录;任何发送前失败阻止发送。未知结果可能永久未知;服务端没有持久 outbox,不保证 exactly-once 或必达。
  • HTML 原始源码长度与解析后的可见文本不同;本轮保守限制源码 4096,因此部分可见文本未超长的 HTML 也会提前拒绝。调用者应保持标签完整地分段、冻结展示稿并核对实际正文/entities,不新增 HTML 解析器或静默截断。
  • 目标仅限服务端已下发的本人 DM;不接收任意 chat_id、不增加 token、不降低既有授权。服务端需核验绑定、设备、lane、epoch 与期限。
  • 此入口在被控 Desktop 执行,无新增 device-link 通道或手机版 UI;SSH 不在其本地 hook 传输适用范围。普通远程/手机控制不复制一套发送实现。
  • 保留整个投递日志目录;回滚旧客户端可能只看到 started,禁止据此补发。
  • 维护者正式批准、真实绑定/多端 Telegram 验收及标准发布仍待完成。本轮未合并 PR、部署或更改生产安装。
  • 最新 CI 必须以本轮最终 head 为准,历史绿灯不替代新结果。

提交前检查

  • 已审查完整 diff 与受影响消费者
  • 每个提交带 DCO
  • 未提交凭据、私人聊天或授权文件
  • 已补回归与能力台账,区分源码验证和真实投递

主干冲突修复(2026-09-16 20:00)

同步 main 143e12c,解决 hook-control/manager.ts 的 Telegram 发送入口与主干 Slack 通讯控制入口冲突,两侧行为与测试均保留。最新主干已包含上轮三处源码字符串断言修正,本地使用已验证 SQLite ABI127 的 Node 22.22.3,避免 Node25 ABI 不匹配。

Windows 认领目录掉电耐久性 P1、#4315 产品批准与真实 Telegram 实发验收仍保留;本次没有实发消息,也没有将合并冲突修复等同于上述问题已解决。

验证:Desktop typecheck 通过;@cindy/mcps、@cindy/slack-hook-protocol 无 typecheck script,按仓库 if-present 规则跳过;根 related 自动选择完整适用工作区并全部通过(Desktop 321.7s,maker-core 157.9s)。新 head 9f83581 CI 单独等待核验。

2026-09-16 发送前断线 P1 修复

  • Telegram delivery 显式区分 transport 提交前拒绝与写入异常:socket 已非 OPEN 时返回 not_sent 并释放 pending;写入抛错/提交后断线仍为 unknown,禁止盲重投。默认 transport 调用语义保持兼容。
  • 真实 loopback WebSocket 集成覆盖检查后关闭、写入抛错与相同 opId 再试。旧 manager 与旧 transport 两组反证各失败 1 例;修复后定向通过。Desktop typecheck、根 related 全部适用范围通过(Desktop 374.0s)。
  • 新 head CI 待核验。Windows 目录掉电耐久性 P1、维护者确认:PR #4263 官方 Telegram 定时主动投递改动规则与核心出站路径 #4315 产品批准和真实 Telegram 安装验收仍未完成,未实际发送 Telegram。

@FicoHub
FicoHub marked this pull request as ready for review September 11, 2026 08:17
@FicoHub
FicoHub requested a review from a team as a code owner September 11, 2026 08:17
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-11T00:14:51.377750Z fbde3c9 New commits
🔒 Security Review ✅ Completed 2026-09-16T14:32:56.340057Z d1417c6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 858623e9b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/lizi-mcps/src/scheduler/telegramDelivery.ts Outdated
Comment thread apps/desktop/src/main/hook-control/telegramDelivery.ts Outdated
@greptile-apps

greptile-apps Bot commented Sep 11, 2026

Copy link
Copy Markdown

Greptile Summary

本 PR 为 scheduler/routine 增加经官方 Telegram hook 主动投递 owner 私聊正文的能力,包括能力与进程 epoch 协商、目标选择、持久幂等回执、迟到结果对账及协议字段扩展。

  • 新增 schedule_telegram_status/send/receipt MCP 工具并接入 Desktop Host bridge。
  • 在网络发送前落盘 started claim,未知结果不自动重发。
  • 要求服务端协商 telegram-dm-send-v1 和唯一发送 epoch。
  • 回执新增实际正文、entities、chatId、tier 与 delivery state。
  • 当前仍存在工具授权边界、回执并发更新和协议运行时校验问题。

Confidence Score: 2/5

当前不宜合并:无门控的 MCP 发送入口可被任意 agent session 调用,而且持久回执存在会丢失成功状态的并发覆盖。

两个阻塞问题分别影响官方 Bot 出站权限边界和核心幂等回执的单调持久性;此外,新增 delivery 协议字段缺少运行时校验。

Files Needing Attention: packages/lizi-mcps/src/scheduler/telegramDelivery.ts、apps/desktop/src/main/hook-control/telegramDelivery.ts、packages/slack-hook-protocol/src/types.ts、packages/slack-hook-protocol/src/parse.ts

Security Review

新增的 Telegram 发送工具位于无门控 scheduler MCP provider 中,且没有校验调用来源是定时任务或用户明确授权的测试。任何可访问该 MCP 的 agent session 都能取得 owner DM target,并通过官方 Bot 发送任意正文。

Important Files Changed

Filename Overview
apps/desktop/src/main/hook-control/telegramDelivery.ts 新增官方 Telegram 投递 bridge 与持久幂等日志,但无锁回执更新可被并发旧状态覆盖。
apps/desktop/src/main/hook-control/manager.ts 增加能力、epoch、目标门控和在途回执匹配,连接断开时按未知结果收口。
packages/lizi-mcps/src/scheduler/telegramDelivery.ts 新增 status/send/receipt 工具,但发送入口缺少任务来源、session 所有权或明确授权门控。
packages/slack-hook-protocol/src/parse.ts 新增 Telegram 实际回执校验,但没有验证新加入的 send delivery 元数据。
packages/slack-hook-protocol/src/types.ts 扩展发送 capability、epoch、delivery 和实际消息回执类型,运行时校验尚未完整同步。

Sequence Diagram

sequenceDiagram
    participant A as cc/codex Session
    participant MCP as Scheduler MCP
    participant B as Telegram Delivery Bridge
    participant J as Owner-scoped Journal
    participant H as Hook Manager
    participant S as Telegram Server

    A->>MCP: schedule_telegram_status
    MCP->>B: status()
    B-->>A: capability + owner DM target
    A->>MCP: schedule_telegram_send(text, target, key)
    MCP->>B: send(input)
    B->>J: 原子创建 started claim
    B->>H: msg.op(send + binding + epoch + deadline)
    H->>S: WebSocket frame
    S-->>H: msg.op.result
    H->>B: onResult(receipt)
    B->>J: 更新 sent / unknown / not_sent
    B-->>A: 持久回执
Loading
Prompt To Fix All With AI
### Issue 1
packages/lizi-mcps/src/scheduler/telegramDelivery.ts:39
**发送入口缺少授权门控**

`cindy_scheduler` provider 明确允许任意 cc/codex session 使用 `schedule_*` 工具,而这里直接将调用方提供的 `text` 交给 bridge,没有像其他 scheduler 写工具一样绑定 session,也没有校验调用来自定时任务或经过用户明确授权。调用方可以先通过 status 获取当前 target,再以官方 Bot 身份向 owner 私聊发送任意内容,超出了“定时结果或明确授权测试”的权限范围。请在工具层加入可验证的任务来源、session 所有权或明确授权门控。

**How this was verified:** The scheduler provider explicitly allows every cc/codex session, while this handler forwards caller-controlled text to the authenticated owner-DM bridge without any task-origin or authorization check.

### Issue 2
apps/desktop/src/main/hook-control/telegramDelivery.ts:179-181
**并发更新会降级成功回执**

这里先读取持久记录以确认它尚非 `sent`,随后再用内存中的旧 `row` 覆盖文件,两个操作之间没有锁或版本校验。如果迟到回执恰好在这期间将记录更新为 `sent`,最终写入会把它重新降级为 `unknown` 或 `not_sent`。`onResult` 也对同一文件执行独立的读取和覆盖写,而且同一 owner profile 明确支持多进程共享,因此该竞态也可能跨进程发生,导致真实成功回执丢失。请使用跨进程锁、版本化 CAS,或在同一临界区内重新读取并按单调状态合并。

### Issue 3
packages/slack-hook-protocol/src/types.ts:1372-1373
**投递元数据缺少运行时校验**

新增的 `MessageOpAction.delivery` 只有 TypeScript 类型,没有进入 `validateMessageOp` 的运行时校验。解析器会接受缺失字段、错误类型或非有限 `expiresAt` 等畸形对象,并原样交给消费者,使共享协议无法可靠保证新增的 binding、epoch 和 deadline 契约,也让问题只能在下游才暴露。请在 `msg.op` 的 `send` 分支校验对象形状和 deadline 的数值约束,并补充相应的负向协议测试;是否已经过期仍可由执行端按当前时间判断。

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Reviews (1): Last reviewed commit: "chore(telegram): 清理主动投递文件末尾空行" | Re-trigger Greptile

Comment thread packages/lizi-mcps/src/scheduler/telegramDelivery.ts Outdated
Comment thread apps/desktop/src/main/hook-control/telegramDelivery.ts
Comment thread packages/slack-hook-protocol/src/types.ts
@MagicLizi

Copy link
Copy Markdown
Contributor

本 PR 命中维护者确认门(规则文档 + 核心出站路径),暂不进入自动代码审查或合并。

改动包括官方 Telegram 定时主动投递(Host 桥、scheduler MCP、持久回执、协议能力协商),以及 docs/product-rules/telegram-bot-parity.md 台账口径更新。规则含义有变化,核心路径约 630 行,不能按 bugfix / 机械编辑豁免。

请维护者直接在本 PR 上 Approve;需要作者修改则 Request Changes。讨论 issue:#4315

@MagicLizi MagicLizi added awaiting-discussion 等待维护者讨论(review-pr) touches:core 改动碰到架构核心路径(review-pr 自动维护,仅展示) touches:rules 改动碰到规则 / 规范文档(review-pr 自动维护,仅展示) labels Sep 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7ec17bc49

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/hook-control/telegramDelivery.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b32415502b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/hook-control/manager.ts Outdated
Comment on lines +188 to +190
try {
try { fs.writeFileSync(fd, JSON.stringify(row)); fs.fsyncSync(fd); }
finally { fs.closeSync(fd); }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Durably sync the claim's directory before sending

On filesystems where syncing a newly created file does not also persist its parent-directory entry, fsyncSync(fd) can leave the claim absent after a power loss. If Telegram accepted the network send before that loss, the next process sees no journal for the same idempotency key and sends the message again, defeating the durable-before-network guarantee and producing duplicate user-visible messages. The claim's directory entry must be made durable before deps.send is reached.

AGENTS.md reference: AGENTS.md:L76-L79

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bef4572 已实际推入本 PR:POSIX 在写入并 fsync 认领文件后同步认领目录及祖先目录,失败时不进入 send;相关回归、类型检查和根 related 门禁已有通过记录。Windows 的 Node/libuv 不支持目录 fsync,本提交沿用既有平台处理,未做 Windows 断电持久化实测,因此这条跨平台耐久性反馈暂保留未解决,等待明确其剩余保证;不将其归为仅等 reviewer。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

补充本轮平台查证,保持此 thread 未解决:微软的文件缓存说明确实要求通过 FlushFileBuffers 或 FILE_FLAG_WRITE_THROUGH 落下元数据(https://learn.microsoft.com/en-us/windows/win32/fileio/file-caching);但本实现创建多级目录后的 Windows 断电恢复保证仍没有原生证据。Node 22 官方文档列出的 Windows file-open 常量不含 O_SYNC/O_DSYNC(https://nodejs.org/docs/latest-v22.x/api/fs.html#file-open-constants),因此不能直接套 POSIX 数值标记或空置目录 fsync 就称修复。POSIX 回归已覆盖目录/祖先同步失败时零发送;Windows 还需对新目录+claim的实际持久边界验证,必要的存储实现调整另按兼容/回滚约束评审。本轮先处理独立的 plain 长度 P1,不将此项列为仅等 reviewer 或声称掉电安全。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bef457293b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/lizi-mcps/src/scheduler/telegramDelivery.ts Outdated
Signed-off-by: ficowang <fico@xd.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 01a9a16286

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/hook-control/telegramDelivery.ts Outdated
Signed-off-by: ficowang <fico@xd.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1fc7a99192

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/hook-control/telegramDelivery.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9f83581eaf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/hook-control/manager.ts Outdated
Signed-off-by: ficowang <fico@xd.com>
Signed-off-by: ficowang <fico@xd.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@FicoHub

FicoHub commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

mergeable 变 CONFLICTING 后已同步主干(f14663d60):冲突仅在 mcpToolApprovalPolicy.test.ts,主干新增的 pre-run 审批用例与本 PR 的 Telegram 外发审批用例并存保留;该测试 34/34、desktop typecheck、根 related 通过。Windows fsync 耐久性 P1(hkg4H)仍待处理,本机无 Windows。

@FicoHub

FicoHub commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

合 main 后 CI:Windows (2/2) 失败为 src/main/__tests__/endpointManifestCache.test.ts › 固定 .tmp 路径被 FIFO 占位也不影响写入 与 src/main/maker-ipc/__tests__/sessionTurnLease.test.ts 三条(CAS/generation 时序),本 PR 未触碰这两个文件(diff 仅 Telegram 投递与审批策略测试),属 Windows 跑道波动;Linux 两分片与其余 8 项通过。Windows fsync P1(hkg4H)仍待处理。

@FicoHub

FicoHub commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

已同步主干(8478f4670):#5134 合入后 SchedulerMcpDeps / mcp-providers.ts 两处均为双方各自新增字段的内容冲突,合并时同时保留本 PR 的 telegramDelivery 与主干的 withAccountDataAccess,无逻辑改动。验证:desktop typecheck 通过;telegramDelivery / transport-manager / mcpToolApprovalPolicy 179 用例与 schedulerTelegramDelivery 3 用例通过;@cindy/mcps tsc --noEmit 的 10 处既有测试文件类型错误在 origin/main 上完全一致,与本 PR 无关。Windows 掉电耐久性 P1 线程仍开放。

冲突处理(两侧均保留):
- hook-control/manager.ts:Telegram helloFeatures 同时声明 telegram-dm-send-v1
  与主干新增的 progress/final/card ops 及 commands 能力。
- slack-hook-protocol/parse.ts:msg.op.result 同时校验本分支的 deliveryState /
  sentMessage 与主干的 errorCode / channelErrorCode(均为可选字段)。
- telegram-bot-parity.md 缺口 2:以主干现状为基础,并入定时主动正文 send 的说明。

Signed-off-by: ficowang <fico@xd.com>
…-scheduled-delivery-sync

Signed-off-by: ficowang <fico@xd.com>

# Conflicts:
#	apps/desktop/src/main/mcp-integrations/mcp-providers.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e9f288f5ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/desktop/src/main/hook-control/ipc.ts
账号删除边界(clearPersisted: true)只注销了投递桥,owner 作用域下的
telegram-delivery-receipts(.sent 中含实际发送的 Telegram 正文与 entities)
会残留。现记录桥的目录,在删除账号时于注销桥之后清除;普通登出与退出仍保留
日志以便幂等重放。

Signed-off-by: ficowang <fico@xd.com>
@FicoHub

FicoHub commented Oct 11, 2026

Copy link
Copy Markdown
Contributor Author

CI 归因(head fbde3c9):唯一失败是 Linux unit tests (2/2) 中 src/main/remote-agent/__tests__/groupRelay.test.ts 的 afterEach 清理(ENOTEMPTY: directory not empty, rmdir /tmp/cindy-group-relay-*,第 209 行)。这是供应商组中转测试的后台写入与清理之间的竞态,与本 PR 改动无关;同一失败此前也出现在 #4264 上。修复已单独提交为 #5776(仅改该测试的清理步骤,带重试)。其余检查均通过。

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

Labels

awaiting-discussion 等待维护者讨论(review-pr) touches:core 改动碰到架构核心路径(review-pr 自动维护,仅展示) touches:rules 改动碰到规则 / 规范文档(review-pr 自动维护,仅展示)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants