Skip to content

fix: 禁止统计兜底图并限次使用主题 - #17

Merged
damingishere-coder merged 4 commits into
masterfrom
codex/fix-disable-stat-image
Sep 5, 2026
Merged

fix: 禁止统计兜底图并限次使用主题#17
damingishere-coder merged 4 commits into
masterfrom
codex/fix-disable-stat-image

Conversation

@damingishere-coder

@damingishere-coder damingishere-coder commented Sep 5, 2026

Copy link
Copy Markdown
Owner

改动摘要

  • 删除日报图片失败路径中的本地统计表/Pillow 信息图兜底,失败时保持不可发送
  • 阻止旧 Level 3、Pillow、失败或结果未知的 PNG 在重试时被当作正常图片复用
  • 手动/自定义主题默认只用于下一次成功生图,可选择 1、2、3、5、10 或 30 次,耗尽后自动恢复每日随机
  • 同一天重试幂等,失败或未知结果不消耗主题次数
  • 生图前剥离摘要擅自补充且原始消息没有依据的数字单位
  • 首次 OCR 事实校验失败后使用纠错 Prompt 重画,省略被拒绝数字而不生成统计表

验证

  • 本地后端完整测试:810 passed
  • 固定随机顺序完整测试:810 passed
  • 前端测试:33 passed
  • 前端生产构建:通过
  • Python compileall:通过
  • GitHub Backend tests:通过
  • GitHub Frontend build + browser E2E:通过

风险

  • 新增 SQLite 群主题剩余次数字段及一次性迁移;升级前的手动主题会获得 1 次剩余额度
  • 图片失败不再提供本地统计图,任务会明确失败并保留发送锁
  • 未经原始消息证明的数字单位会被剥离;事实校验重画可能省略难以准确呈现的数字文字

回滚

  • 回滚本 PR 的 squash 提交可恢复旧代码;若数据库已升级,新增列和迁移标记可保留,不影响旧版本读取现有字段
  • 本 PR 不包含部署、服务重启、历史图片修改或真实微信发送

@damingishere-coder
damingishere-coder merged commit 7171a3c into master Sep 5, 2026
2 checks passed
@damingishere-coder
damingishere-coder deleted the codex/fix-disable-stat-image branch September 5, 2026 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant