Move database work off the main thread on Node.js 24 and improve message handling and runtime diagnostics. Preserve migration, restart, and concurrency coverage with the async SQLite driver.
阶段 1:把手写多份的「单飞+TTL 记忆化」收进一个 common 原语,消除各处 各自实现「TTL 判定 / inflight 去重 / finally 清理」的漂移风险(底层都是 Tencent 风控:忙碌客户端会为每条消息发一次未缓存 OIDB 拉取,持续爆发触发封号)。 - 新增 common/single-flight-cache.ts:createSingleFlightCache<K,V>({ ttlMs, load, shouldCache?, now? }).get(key, {force});shouldCache 容纳「错误结果不缓存以便 重试」,now 可注入便于测 TTL。7 个单测覆盖新鲜命中/单飞去重/force/TTL 过期/ shouldCache/错误传播/invalidate。 - 迁移 contacts.fetchGroupMemberList(key=groupId, ttl 60s, 默认 shouldCache)与 update-check.getUpdateInfo(全局 key, ttl 6h, shouldCache=!error)。行为严格不变。 对抗性 Agent 逐条对比 HEAD 确认两处等价(含 update-check 时间戳来源毫秒级微差、 对 6h TTL 可忽略)。common 43 / core 467 全绿、typecheck 干净。