test(render-compare): 灰度对比工具包 + 5个P1修复 #237

Merged
xiaoxia merged 3 commits from fix/render-compare-p1 into develop 2026-07-13 07:46:38 +08:00
Owner

新增:灰度对比测试工具包

5个P1修复见下

## 新增:灰度对比测试工具包 5个P1修复见下
xiaoxia force-pushed fix/render-compare-p1 from 376a868ae1 to 12f2fa7000 2026-07-13 01:17:59 +08:00 Compare
xiaoxia force-pushed fix/render-compare-p1 from 12f2fa7000 to 7cfaeae4de 2026-07-13 01:18:02 +08:00 Compare
xiaoxia added 3 commits 2026-07-13 07:03:51 +08:00
新增灰度对比测试工具包 tests/render_compare/,包含:
- video_diff.py: SSIM + PSNR 像素对比
- audio_diff.py: 音频差值对比
- scenarios.py: 10个对比场景
- runner.py: 批量执行器 + StagingAPI + HTML报告
- README.md: 使用文档

5个P1修复:
P1-1 音频差值系统性偏低6dB:amix自动缩放音量导致相似度虚高
  → amix后加volume=2补偿
P1-2 Feature Flag污染线上配置:测试跑完不恢复原值
  → run_all用try/finally保证恢复原始配置,保存失败直接中止
P1-3 SSIM min值计算错误:混入汇总行掩盖最严重差异帧
  → 改为从stats_file(stdout)解析逐帧数据,avg/min都来自真实逐帧
P1-4 probe_has_audio语义反了:探测失败返回True
  → 探测失败返回False,保守认为无音频
P1-5 三套入口阈值不统一:函数默认/Runner默认/CLI默认各不一样
  → 统一到CompareRunner类常量:SSIM=0.95, PSNR=28dB, 音频=0.90
fix: flake8 F811 unused reimport + F541 f-string without placeholders
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m12s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 1m30s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m37s
c56611b17a
xiaoxia force-pushed fix/render-compare-p1 from c522e8e7fe to c56611b17a 2026-07-13 07:03:51 +08:00 Compare
xiaoxia merged commit 788559ff29 into develop 2026-07-13 07:46:38 +08:00
Sign in to join this conversation.