Files
mnote/bugs/03-rust-web/process/3-17-sse-push-skips-polling-fallback-v1.md
T
lix-2026 3311bd0366 chore: document architecture gaps and add dev hot reload
- add npm dev:hot wrapper using cargo-watch and page reload polling

- add mnote-web dev hot reload endpoint and coverage

- record current architecture review and tracked bug findings across realtime, tree, editor, and AI runtimes

Verification:

- node scripts/task-dev-hot-plan-test.js

- node --check scripts/dev-hot.js

- cargo test -p mnote-web dev_hot -- --nocapture
2026-05-17 23:09:56 +08:00

1.2 KiB

3-17 [process][bug] SSE push 模式跳过 polling safety net v1

发现时间:2026-05-17

状态:[process]

关联主线:03-rust-web

1. 问题定义

SSE route 注释和架构口径暗示 polling 可作为 safety net,但实现中只要 stream_delta_rx.is_some(),循环就进入 push/heartbeat 分支并跳过 polling。

2. 证据

  • sse.rs 附近说明 SSE 事件路径。
  • sse.rs 附近在 stream_delta_rx 存在时走 heartbeat / push 分支。

3. 影响

  • broadcast 丢失、进程重启、跨进程实例不共享 channel 时,SSE 连接可能无法靠 Convex bridgeLogs 追上。
  • fallback 名义存在,但实际恢复能力不足。
  • 客户端可能长期停在旧 snapshot。

4. 建议修复

  • push 模式也应按 cursor 周期性检查 bridgeLogs,或在 heartbeat 周期中合并轻量 polling。
  • 增加测试:模拟 stream_delta_rx 无消息但 bridgeLogs 有新事件,SSE 应产出 delta/resync。
  • 明确 pollMs 与 push channel 同时存在时的优先级。

5. 状态

已确认 push 分支跳过 polling fallback,尚未修复。