fix(web): keep consultation conclusions across turns and surface cache hits (BUG-555, BUG-556)

Session history was silently clipped to the first 4000 characters of the last 12 messages, so follow-ups could not see timing or audit tables. Keep an append-only tail plus a checkpoint summary, retry overflow in the same request, and expose cache hit rate in admin usage.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-06 15:16:18 +08:00
co-authored by Cursor
parent 9ce7a374ed
commit bf8ad0d1ff
29 changed files with 1295 additions and 100 deletions
+6
View File
@@ -279,3 +279,9 @@ Prevention: make the gateway request official raw evidence without relying on an
`manman-linux` runner 以 `:host` 模式注册在一台同时运行 Nacos/MySQL/Redis/xxl-job 的跳板机上,质量门每次 push 都在该宿主机本地 build 两个按 SHA 打标的镜像且从不回收,累积 1453 个镜像后根分区 99G 用满 94G、Avail 归零。`docker compose up -d --wait postgres` 阶段 `initdb``No space left on device`23 个数据库集成测试级联失败,`publish` 连续 5 次 skipped`staging` 上 4 个提交无法发布。ERR-103 当初据以搬迁的「`xiaoxin` 缺少 Docker Compose v2」是误诊:真实原因是 `xiaoxin``/root/.docker/cli-plugins/docker-compose` 有一个零字节文件遮蔽了系统插件(用户级插件目录优先),Docker Engine 本身一直正常。
Prevention: 构建与测试 runner 不得与其他服务共用宿主文件系统;门禁必须在开跑前自行回收磁盘并在余量不足时 fail-closed 报出磁盘原因,而不是让下游 fixture 代为暴露。判定某台 runner「不支持 Docker Compose」之前,必须先看 `docker info` 的 client plugins 报错与用户级 `~/.docker/cli-plugins` 是否存在遮蔽文件;把能力缺失归因到整台机器会导致错误的迁移决策,本次代价是发布中断。
## ERR-106 | 本机 Docker 用户网络地址池耗尽,`test:db` compose fixture 无法建网 | observed 2026-09-06
`docker compose --project-name jyotisha-postgres-* up -d --wait postgres``failed to create network …_app: all predefined address pools have been fully subnetted`。Docker daemon 正常,本机同时存在着十余个遗留 `jyotisha-postgres-*-postgres-1``jyotisha-local-preview-postgres-1``npm run test:db --test-concurrency=1` 仍每测新建 compose 项目网络。咨询上下文单未做 `docker network prune`(会清共享宿主资源)。
Prevention: 需要真实库测时先清本任务自己的 fixture 网络,或在默认 `bridge` 上起一次性 Postgres 做迁移语法检查;不得把地址池耗尽写成「本机无 Docker」。新迁移至少用 `psql --set ON_ERROR_STOP=1 -f` 在可写实例上跑通 ALTER/GRANT。