Hindsight 0.9.1 生产切换与真实四链路验收
- HTML: https://decision.ht1072.top/2026-08-17-hindsight-091-production-cutover-success.html
- Local HTML:
[已移除本地路径] - Generated: 2026-08-17T17:01:59+08:00
Hindsight 0.9.1 生产切换与真实四链路验收
结论
生产 Hindsight 已从 0.9.0 切换到 0.9.1,真实 retain → recall → consolidation → reflect 四链路通过,临时验收 bank 已删除,写入 cron 已恢复。
本次切换只改 Hindsight 版本,不改 LLM/embedding/reranker 模型、不改数据库拓扑、不改 bank、provider 或 cron 定义。
切换前保护
- 新鲜生产 dump:
[已移除本地路径] - dump SHA-256:
ed0bd5515226f6e1491dcd84dd9a5a562213aecb4df22bd27ec62432b796bcf4 - 完整生产 0.9.0 venv 备份:
[已移除本地路径] - systemd drop-in 备份:
[已移除本地路径] - env 备份:
[已移除本地路径] - 暂停任务:retain、consolidate、open-session snapshot retain。
切换动作
systemd ExecStart 从:
[已移除本地路径]
切换到:
[已移除本地路径]
服务重启后:
API version: 0.9.1
health: healthy
database: connected
MainPID: 3903852
Alembic: c4f7a91b2d38
迁移链:
b3e8d1c6f4a9 → d9c1a7b4e2f6 → c4f7a91b2d38
真实数据面验收
临时 bank:live-091-smoke-20260817-144135
- create:HTTP 200
- retain:HTTP 200,约 6.97s
- recall:HTTP 200,约 0.318s,精确命中
LIVE_091_OK_20260817 - consolidation:completed
- reflect:HTTP 200,约 6.525s,精确返回
LIVE_091_OK_20260817 - pending/failed:0/0
- cleanup:HTTP 200,
deleted_count=7
证据:
[已移除本地路径]
运行态
切换后:
- service active/running;
- RSS 约 1.2–1.35GB,低于 MemoryHigh 2GB;
- PostgreSQL pool healthy;
- 生产
hermesbank pending/failed 0/0; - retain、consolidate、open-session snapshot retain cron 已恢复 scheduled;
- journal error scan 只出现 LiteLLM 远程价格表读取超时后回退本地表的 warning,不影响业务链。
已知边界
- 简单 Reflect 已通过,但复杂 Reflect 在 0.9.0 和 0.9.1 上都可能因
lunatool-call 通道失败撞到 300s wall;切换没有解决该通道问题。 - 正确 RecallRequest 下,生产 0.9.1 单实例热缓存基线约为 P50 5.99s、P95 6.95s、P99 6.99s;耗时主要集中在 cross-encoder 对 300 个候选 rerank。
- 性能优化只在 clone 做参数矩阵,不直接修改 live。
回滚
若后续出现结构、retain、recall、consolidation 或 reflect 功能回归:
- 暂停三个 Hindsight 写入 cron;
- stop API;
- 用迁移前 dump 恢复到新数据库并 swap;
- 恢复
venv.pre091和原 drop-in; - 启动 0.9.0;
- 验证 version/head/stats/四链路后恢复 cron。
不能只切回旧 venv,因为生产数据库 Alembic 已迁移到 0.9.1 head。