{"content":"metaso-p2p 开发日志 2026-06-19\n\n提交: fix: replay userinfo backfill oldest first\ncommit: be6f2c7\n\n问题定位:\n- 线上 bot homepage v3 对 idq1j3yu9vmwxkqdqrrt39qxl8u69vs0esjhwg6l5k 返回 profile.homepage = null。\n- 该 bot 实际存在有效 /info/homepage pin 54cc6e79738cee25b533fbc24f70fd06bd94f6d33ae4783af9abed0abc5d59d6i0,payload 指向 metaapp://c06b7a2db6efa241560a2356e9966cf9758dae3ec9c795f614a652b113e30329i0。\n- 同一路径还有一条更旧的空 payload pin 1f2b9154197bb8d035ad96e2f0b35c3e7d3bc2c3e67b1033546e54de0d0738dei0。\n- userinfo backfill 直接按 MANAPI 返回的 newest-first 顺序写入,导致旧空 pin 在回放末尾把新 homepage 覆盖清空。\n\n修复:\n- userinfo backfill 先收集一个 path 的有效 pins,再按 oldest-to-newest 回放到读模型,保持最终状态与链上因果顺序一致。\n- 新增分页回归测试,覆盖 newer homepage / older clear 跨页场景。\n- 扩展测试 MANAPI stub,支持 size+cursor 分页,避免只测单页顺序。\n\n验证:\n- CGO_ENABLED=0 go test ./internal/aggregator/userinfo -run TestBackfillReplaysInfoPinsOldestToNewestAcrossPages -count=1\n- CGO_ENABLED=0 go test ./internal/aggregator/userinfo -count=1\n- CGO_ENABLED=0 go test ./internal/aggregator/bothomepage -count=1\n- git diff --check","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}