Skip to content

docs(plan): IM 反向桥接(飞书先行)提案 - #1414

Closed
DeliciousBuding wants to merge 1 commit into
masterfrom
docs/spec-im-bridge
Closed

docs(plan): IM 反向桥接(飞书先行)提案#1414
DeliciousBuding wants to merge 1 commit into
masterfrom
docs/spec-im-bridge

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

状态: PROPOSAL(管理员已批立项,设计待批)

摘要

产出完整的 IM 反向桥接 SPEC,覆盖 9 个核心设计问题,分三阶段 PR 计划(Phase 1 数据模型+飞书后端+推送,Phase 2 审批卡回调,Phase 3 多渠道抽象 trait 化)。

核心输出

关键决策

  1. 桥接器住 hub-server(非 edge/desktop),理由:云端常驻 + 有账号体系 + 审批经 hub 路由
  2. 飞书单渠道先行
  3. IM 侧限 allow_once/deny,allow_always 类高权限决策锁在自有端
  4. IM 只是通知面,审批真相在 hub(IM 发送失败不阻塞 web/mobile 路径)
  5. 与 Mobile 互补:IM=降级触达,Mobile=完整体验

审查要点

  • 9 问的回答是否覆盖完整
  • 数据模型设计是否合理(4 张新表)
  • 事件过滤逻辑(fail-closed + debounce + 豁免清单)
  • Phase 1 工作量评估与验收方式
  • 安全红线清单是否完整

不 merge——设计待管理员审批。

状态: PROPOSAL(管理员已批立项,设计待批)

产出完整的 IM 反向桥接 SPEC,覆盖 9 个核心设计问题:
- Q1 多租户数据模型与并发边界
- Q2 飞书凭据 AES-256-GCM 加密存储
- Q3 审批信任边界(签名校验 + open_id 绑定 + 审计)
- Q4 事件流接入点(fail-closed + debounce 5s + 豁免)
- Q5 推送内容分级与敏感信息脱敏
- Q6 渠道内交互面(飞书审批卡 + 按钮回调)
- Q7 与 Mobile 互补矩阵(IM=降级触达, Mobile=完整审批)
- Q8 失败语义(IM 不阻塞 hub 审批真相)
- Q9 分三阶段 PR 计划(Phase 1 推送, Phase 2 回调, Phase 3 多渠道)

追踪: #1407
Copilot AI review requested due to automatic review settings July 26, 2026 16:18

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DeliciousBuding, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 83fdb828-9bec-4d65-8c6d-3f17aaca94a5

📥 Commits

Reviewing files that changed from the base of the PR and between aab56cd and 220d8a9.

📒 Files selected for processing (1)
  • docs/plan/proposal-im-bridge.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/spec-im-bridge

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DeliciousBuding

Copy link
Copy Markdown
Collaborator Author

独立审查结论(fable,只读,不 merge)

Verdict: NEEDS_FIX — 方向对,与现有身份/飞书 SSOT 有硬冲突,不宜按现状批准。

信任边界

  • 已对:IM 仅 allow_once/denyallow_always 锁自有端;Hub 合同 allow|deny
  • 须补:决策词统一;高风险策略与 authorization-model(高风险回 Web/ID)二选一写死;open_id → TokenDance 绑定 → Hub user → owner 全链 fail-closed;approval 幂等。

安全阻断

  1. Critical 身份:绑定真相在 TokenDanceID/oauth_bindings,禁止 hub 自建主绑定 + open_id 当主身份。
  2. High 生产入口:HTTPS Webhook(验签/解密/幂等/3s)为主;WS 仅 dev。
  3. High 密钥:encrypt_key/verification_token 与 app_secret 同级加密。
  4. High 3s+幂等:先 ack 再异步 DecideTaskApproval。
  5. High 租户:MVP 平台 bot + 用户绑定;per-user bot 后续。
  6. Med:签名步骤对齐官方;卡片 payload 白名单。

批次修订

Phase 0 设计补丁 → Phase 1 推送 only(瘦身)→ Phase 2 审批闭环 → Phase 3 多通道。

其他

最低修复清单齐后再 APPROVE_AS_PROPOSAL。未 merge。

@DeliciousBuding

Copy link
Copy Markdown
Collaborator Author

Approved design (admin): IM 反向桥接 立项已批, design approved (飞书单渠道先行). Author marked 不 merge — closing; implementation via #1407.

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