Compare commits

...

25 Commits

Author SHA1 Message Date
CI Bot 2167444df0 style: auto-format with black + isort + ruff + prettier [skip ci-format-check]
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 16s
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 18s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 22s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m44s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m50s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (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 / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m1s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m55s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m38s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m32s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m43s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m54s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m30s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m43s
AI Code Review / AI Code Review (pull_request) Successful in 7m17s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m17s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 3m30s
CI/CD Pipeline / Validate - Style (push) Successful in 9m10s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 9m20s
CI/CD Pipeline / Integration Tests (push) Successful in 10m5s
CI/CD Pipeline / Unit Tests (push) Failing after 14m12s
CI/CD Pipeline / Validate - Security (push) Successful in 19m33s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-10-15 12:33:22 +00:00
xiaoxia 638213ab2a fix(viral-video): #2312 E2E四项修复 - XML标签别名兼容/review占位符/OSS ACL/Wan模型归一化
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 3s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 45s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 41s
CI/CD Pipeline / Production Browser E2E (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m8s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m8s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 2m55s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m11s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m27s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 5m8s
CI/CD Pipeline / Integration Tests (push) Failing after 6m29s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m40s
AI Code Review / AI Code Review (pull_request) Successful in 6m58s
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
1. 分镜shot/action字段为空(问题1): _parse_script_xml扩展标签别名兼容,支持中文(镜头/画面/动作/台词/口播/角色/转场/BGM)和英文(camera/scene/dialogue/narration/description/action)变体,clip节点支持<镜头>/<scene>/<segment>别名,运营v6模板任何命名都能正确提取四个字段
2. Review占位符{fusion_result}不兼容(问题2): prompt_loader render_system_prompt和render_user_prompt统一注入占位符别名映射(voiceover_script→fusion_result/script/copy_text, storyboard_input→input_text/brief),DB里v1模板用{fusion_result}也能正确填充文案
3. 克隆音色样本OSS ACL private(问题3): upload_to_oss/storage.upload_file/upload_file_smart新增extra_headers参数,克隆样本上传点传x-oss-object-acl:public-read,DashScope/Wan/Seedance API可公网拉取
4. 选Wan 3.0实际用Seedance(问题4): get_viral_video_model_config增加多策略查找--精确key→归一化(去横杠/下划线/点/空格)匹配→model_id反向匹配→前缀兜底(含'wan'归wan-3.0),防止传wan3.0-video/model_id/大小写变体时误回落seedance-2.5
2026-10-15 20:26:17 +08:00
CI Bot 468f6b74a1 style: auto-format with black + isort + ruff + prettier [skip ci-format-check]
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / Check push changed paths (push) Successful in 7s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 54s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m1s
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m14s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m27s
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m18s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 2m57s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m15s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m32s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 5m3s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m47s
CI/CD Pipeline / Integration Tests (push) Failing after 5m36s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m19s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 3m26s
AI Code Review / AI Code Review (pull_request) Successful in 7m3s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 7m32s
CI/CD Pipeline / Validate - Style (push) Successful in 9m33s
CI/CD Pipeline / Unit Tests (push) Failing after 13m6s
CI/CD Pipeline / Validate - Security (push) Successful in 19m38s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
2026-10-15 11:45:55 +00:00
xiaoxia d1e9cf3ff4 feat(#2312): STEP2全部参数hint完整覆盖(10人设+19结构+8客群+5语言+20营销目的)
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 0s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 4s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 5s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 10s
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 57s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m9s
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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m18s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m37s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m40s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m20s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m20s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m18s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m33s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m51s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 2m56s
AI Code Review / AI Code Review (pull_request) Successful in 7m3s
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
按前端ViralVideoPage.constants.ts逐项核查补齐:

人设(10个全补):
- 新增:通用个人IP/顾问型IP/创始人IP/创业者IP/从业者经验派/避坑顾问型/知识科普型/测评种草型
- 原有保留:老板型IP/专家型IP + 旧版备用(宝妈/店主/专业顾问等)

爆款结构(19个全补):
- 新增:痛点场景植入+给出通关秘籍/反常识开场+扎心现状+制造焦虑/核心难题+化解焦虑+描绘愿景/
  痛点前置+前后对比+给出期许/悬念拉满+揭露危害+明确目的/颠覆认知+现状拆解+赋予价值/
  结果先行+消除顾虑+保留悬念/真实困境+认知反转+传授秘籍/反差事实+案例佐证+戳破真相/
  预埋悬念+标杆案例+引出核心/危机渲染+放大痛点+输出干货/逆袭开场+成功诀窍+低价引流/
  反常识观点+分析危害+描述现状/正反对比+解析原因+简易方法/
  真实场景+内心刻画+共情引导+展望未来/连续否定+代入感受+打破认知+精准戳痛/
  揭秘行业+类比施压+放大焦虑+精准锁客
- 原有保留:反差破局/情绪共鸣+勾起好奇+拔高价值 等 + 旧版备用

目标客户(8个全补):
- 新增:小镇青年/精致妈妈/新锐白领/资深中产/都市蓝领专属hint
- 升级:Z世代/小镇中老年/都市银发从粗关键词匹配升级为专属档
- 不再依赖模糊的18-25/30-45/50+泛匹配,每类客群都有具体的用词/语气/心理描写

台词语言(5个全补):
- 前端传全名('中文(普通话)'/'粤语'/'英语'/'日语'/'韩语'),之前的zh-CN/en-us等code无法匹配
- 新增全名→code的alias映射,粤语加入'嘅/咗/嘞/喺/唔'等粤语助词指引
- 保留旧code兼容

营销目的(20个之前已全覆盖,保持不变)

所有未命中选项走的是'按该人设/结构/客群的口吻组织'这种通用废话,
LLM根本不知道怎么写具体风格。补齐后每个选项都有20-80字的具体写作指引,
明确告诉LLM:开头怎么写、中段怎么推进、结尾怎么收、用什么语气、
什么词不能用、观众心理抓什么点。
2026-10-15 19:38:36 +08:00
xiaoxia f4c611a21f fix(#2312): 克隆音色'应赐恩'完全未生效根因修复
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 4s
CI/CD Pipeline / Check push changed paths (push) Successful in 6s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 7s
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m39s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m48s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m59s
CI/CD Pipeline / CI Gate (pull_request) Successful in 3s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m33s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m59s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m31s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
根因:前端选'我的音色'(克隆音色)时,voice_id传的是CosyVoice注册后的voice_id
(形如cosyvoice_xxx),而不是profile主键UUID。worker端_resolve_voice_sample_audio
只调用_repo.get(profile_id)按主键查,必然查不到→走_tts_voice_sample_fallback→
用默认女声合成长样本→视频里根本不是用户音色。同样的bug也出在_resolve_tts_voice_id。

修复:
1. _resolve_voice_sample_audio:_repo.get()查不到时,追加_repo.find_by_voice_id()兜底;
   空voice_source且voice_id是UUID格式时自动尝试克隆路径;全链路加详细日志
   (voice_id/voice_source/sample URL前120字),便于线上排查
2. _resolve_tts_voice_id(TTS兜底路径):同样加find_by_voice_id回退,保证TTS降级
   路径也能正确用克隆音色合成
3. _step_render入口加关键日志:打印voice_id/voice_source/ref_audio URL前120字,
   一眼看出是用了预置静态样本/克隆样本/TTS兜底
4. 预置音色分支加防御:voice_source空串但voice_id像UUID(克隆profile),继续走
   克隆路径而非直接降级TTS

注:问题1的Wan ratio参数名修复、问题4+5的营销参数hint补充、问题3样本质量升级
(10s/精确seek/24k/128k/淡入淡出)已在之前commit fde6c0b4提交。
本次只提交克隆音色查找修复。
2026-10-15 19:34:30 +08:00
CI Bot 4e4afd80e9 style: auto-format with black + isort + ruff + prettier [skip ci-format-check]
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 2s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 1m14s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m14s
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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m52s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m36s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m13s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m30s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 3m53s
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m33s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
2026-10-15 11:28:35 +00:00
xiaoxia 9dc4ff17a3 feat(#2312): alembic 112恢复运营v6模板为active,存档#2312 v5/v3/v7
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 33s
CI/CD Pipeline / Check push changed paths (push) Successful in 35s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (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 / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 48s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m18s
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m0s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m17s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m36s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m35s
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m8s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m41s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m5s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 3m14s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 3m20s
AI Code Review / AI Code Review (pull_request) Successful in 7m22s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Failing after 13m37s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 2m29s
CI/CD Pipeline / Integration Tests (push) Failing after 6m45s
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
- storyboard: 恢复 v6 is_active=true;v5(我们#2312保底) + v7(运营试配合规版) is_active=false存档
- review: 动态查找非v3的最高运营版本,恢复为active;v3(#2312保底) is_active=false存档
- 全部操作幂等(先检查行存在再update)
- v6不存在/库空等极端场景自动回退到v5/v3保底,不会把可用状态改坏
- 防御注入兜底(prompt_loader)对v6仍然生效,合规底线不丢
2026-10-15 19:07:14 +08:00
xiaoxia fde6c0b483 fix(#2312): 5项staging反馈修复
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m29s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m44s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m53s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m57s
CI/CD Pipeline / CI Gate (pull_request) Successful in 4s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m34s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m41s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m23s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m50s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m22s
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
- [紧急] alembic 111改为保底插入策略,不deactivate运营在后台配置的v6等模板,合规底线靠prompt_loader防御注入兜底;downgrade只删本次插入的#2312版本
- prompt_loader防御注入增强:多指纹组合判定(合规类+医疗类双维度,industry_redlines扩展到4指纹),防止运营改措辞后漏判
- 问题1(9:16出横屏): Wan 3.0 API参数名错误 aspect_ratio→ratio(官方文档用ratio);并在Wan prompt头部加竖/横/正方形构图文字提示作为双保险
- 问题3(克隆音色不像): 音频样本8s→10s(Wan官方建议≥10s);ffmpeg -ss移到-i后精确seek(避免关键帧偏移);采样率16kHz→24kHz、码率96k→128k;首尾50ms淡入淡出防爆音
- 问题4+5(文案不按配置):
  - 补充专家型IP人设hint(行家第一人称、破误区、实在建议、不夸大)
  - 补充情绪共鸣+勾起好奇+拔高价值结构hint(三段式:戳心痛点→悬念引产品→温暖升华)
  - 情绪短片从短剧模式(多角色对话)拆出,改为情感共鸣模式(第一人称真情独白、情绪递进)
  - 小镇中老年/县城中老年/下沉市场客群单独hint(街坊拉家常、实在靠谱、怕踩坑、健康/子女/面子心理)
2026-10-15 19:02:29 +08:00
CI Bot 2ccfbe4a9c style: auto-format with black + isort + ruff + prettier [skip ci-format-check]
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 6s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 7s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 10s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 1m13s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m35s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m42s
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m46s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m37s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m5s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m12s
CI/CD Pipeline / Integration Tests (push) Failing after 3m34s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m36s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (push) Successful in 4m40s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m2s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m58s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Failing after 5m51s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m45s
AI Code Review / AI Code Review (pull_request) Successful in 7m14s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 3m58s
CI/CD Pipeline / Validate - Security (push) Successful in 10m1s
CI/CD Pipeline / Unit Tests (push) Failing after 11m19s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-10-15 10:25:36 +00:00
xiaoxia 4766d9cacb fix(viral-video): #2312 修复DB模板与代码默认不同步导致合规规则静默失效
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 5s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 4s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 5s
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 9s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m17s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Build Staging Web Image (push) Successful in 1m14s
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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m28s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m23s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m2s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m22s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m41s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m40s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 4m6s
CI/CD Pipeline / CI Gate (pull_request) Successful in 32s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 5m17s
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
之前 #2308(三字段拆分)/#2311(音频重构)/#2312(合规红线) 多次更新 prompts.py
代码默认模板,但没有写 alembic migration 同步到 viral_video_prompt_templates
表——DB里仍停留在 108 迁移插入的 storyboard v4(多角色对话版,没有<shot>/
<visual>/<action_details>三字段拆分,更没有 GLOBAL_CONSTRAINTS/医疗红线/
{industry_redlines}占位符)+ review v1保底版,生产环境实际跑的是旧模板,
新加的合规规则全部不生效。

修复:
1. 新增 alembic 111:deactivate旧storyboard/review→插入v5 storyboard
   (三字段拆分+GLOBAL_CONSTRAINTS+{industry_redlines}占位符+8条硬约束+
   NEGATIVE_RULES医疗禁令) + v3 review(医疗/养生/健康红线5维度审核)
2. prompt_loader.render_system_prompt 加防御性注入:DB模板若缺少
   '不承诺效果'指纹则自动追加GLOBAL_CONSTRAINTS;若缺少{industry_redlines}
   占位符则把传入的红线内容直接追加到末尾。避免未来再出现'代码加了规则
   但DB旧模板没带'的静默失效(双保险)。

文件:
- alembic/versions/111_vv_compliance_prompts.py: 新迁移,升级storyboard到v5/review到v3
- packages/application/viral_video/prompt_loader.py: render_system_prompt 加防御注入
- (前一提交 7935cb6a 已包含 prompts.py/reviewer.py/viral_video.py 的合规改动)
2026-10-15 18:19:43 +08:00
xiaoxia 2d25e9989a fix(lipsync): 预合成模式补齐 script_text,修复 Ditto 任务 script_len=0 (#2312)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 13s
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 20s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m8s
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m16s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m9s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m43s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (push) Failing after 4m10s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 3m26s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 4m55s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Failing after 5m28s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
fix(lipsync): 预合成模式补齐 script_text,修复 Ditto 任务 script_len=0 (#2312)
2026-10-15 18:11:21 +08:00
CI Bot ddfd38efcf style: auto-format with black + isort + ruff + prettier [skip ci-format-check]
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 9s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 12s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Failing after 2m21s
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / PR Build API Image (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
CI/CD Pipeline / Integration Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been cancelled
PR Automation / Auto Approve on CI Green (pull_request) Has been cancelled
Preview Deploy / Deploy Preview Environment (pull_request) Has been cancelled
2026-10-15 10:10:57 +00:00
xiaoxia 7935cb6a25 fix(viral-video): #2312 文案生成防医疗合规风险+自动重试
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 0s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check push changed paths (push) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 2m3s
CI/CD Pipeline / Build Staging API Image (push) Successful in 2m6s
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m19s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 19s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m50s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m34s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m23s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 3m40s
CI/CD Pipeline / CI Gate (pull_request) Successful in 4s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m21s
CI/CD Pipeline / Integration Tests (push) Successful in 4m37s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 5m28s
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
问题:养生/理疗类门店(如御众堂)生成的文案含「老师帮你看看」「一搭手就知道」
「别急着贴膏药」「颈肩腰腿哪儿酸哪儿胀」等诊疗暗示/诊断话术/贬低正规医疗的
违规内容,在出片前审核阶段才被拦截,用户体验差。

修复(三道防线,生成时就规避):
1. 【Prompt 侧】GLOBAL_CONSTRAINTS 之前定义了但没注入 storyboard 模板——现在
   实际注入;同时增加第6-8条医疗红线(不得出现诊疗/疗效/诊断暗示/效果承诺)。
2. 【行业自适应】新增 HEALTH_INDUSTRY_KEYWORDS + HEALTH_INDUSTRY_REDLINES,
   命中养生/健康/理疗/按摩/中医/产后/御众堂等关键词时,向 system prompt
   额外注入8条行业红线(禁止诊疗暗示/诊断/疗效承诺/医疗术语/贬低正规医疗/
   问诊式话术),从源头引导 LLM 只写放松/舒服/松快/解乏等感受类词。
3. 【本地规则兜底】reviewer 新增 _MEDICAL_REDLINE_PATTERNS(9组正则),
   本地快速扫描:包治/根治/一X就好/特效神药/一搭手就知道/老师帮你看看/
   别急着贴膏药/疗程对症/哪儿酸哪儿胀问诊式话术等,命中即 error。
4. 【自动重试闭环】阶段2 generate-copy 在生成后立即跑 LLM 深度审核(之前
   只在阶段3 confirm-copy 才跑),不通过则把 error issues 作为反馈拼入
   下一轮 prompt 让 LLM 针对性修复,最多自动重试 2 次;成功直接放行给用户,
   失败保留当前文案让用户确认,阶段3仍会再跑一次审核兜底。
5. Review prompt v2→v3:显式加入医疗/养生红线维度(诊断暗示/疗效承诺/
   医疗术语/冒充医生/贬低正规医疗),审核颗粒度更细。
6. Storyboard 版本 v4→v5(对应 prompt 内容变更)。

文件:
- packages/application/viral_video/prompts.py: GLOBAL_CONSTRAINTS 扩写+注入;
  新增 HEALTH_INDUSTRY_REDLINES/HEALTH_INDUSTRY_KEYWORDS;review prompt v3;
  NEGATIVE_RULES 加医疗禁令;storyboard 注入 {industry_redlines} 占位符
- packages/application/viral_video/reviewer.py: 新增 _MEDICAL_REDLINE_PATTERNS
  9组医疗违规正则;_check_compliance 扫描医疗红线
- apps/worker/worker_app/tasks/viral_video.py: 引入新常量;
  _step_script_generation 新增 extra_compliance_feedback 参数;
  阶段2 run_viral_video_generate_copy 加入合规自动重试循环(最多2次)
2026-10-15 18:04:45 +08:00
xiaoxia df8d32391d fix(docker): #2311 worker镜像补COPY scripts目录,seed_preset_voice_samples可在容器内直接执行
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check push changed paths (push) Successful in 3s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 1m14s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m19s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m36s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 2m7s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m46s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m36s
CI/CD Pipeline / Build Staging API Image (push) Successful in 3m57s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 6m43s
AI Code Review / AI Code Review (pull_request) Successful in 7m13s
CI/CD Pipeline / Integration Tests (push) Successful in 8m22s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (push) Successful in 9m0s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 10m9s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 2m1s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 2m18s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 3m29s
CI/CD Pipeline / Unit Tests (push) Failing after 21m3s
CI/CD Pipeline / Validate - Security (push) Successful in 22m9s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 26m1s
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
api.Dockerfile已有COPY scripts/,worker.Dockerfile漏了。
staging部署时通过docker cp手动将脚本注入容器验证功能正常,
补上后新环境部署即可直接在容器内执行python scripts/seed_preset_voice_samples.py。
2026-10-15 17:18:59 +08:00
xiaoxia 006e58ae54 refactor(viral-audio): #2311 短音色样本模式重构音频链路 (#2311)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 5s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 2m4s
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 2m18s
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 2m37s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 37s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 29s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Build Staging Web Image (push) Successful in 2m46s
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 / CI Gate (pull_request) Successful in 3s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 3m10s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m25s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m46s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m46s
CI/CD Pipeline / Integration Tests (push) Successful in 7m32s
AI Code Review / AI Code Review (pull_request) Successful in 7m30s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 2m50s
CI/CD Pipeline / Validate - Style (push) Successful in 8m5s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 8m18s
CI/CD Pipeline / Unit Tests (push) Failing after 13m56s
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
refactor(viral-audio): #2311 短音色样本模式重构音频链路

- 预置音色直接读OSS静态样本(零TTS)
- 克隆音色ffmpeg预处理缓存
- TTS只做兜底
- Wan max_duration 15→30
- 删除atempo/截断逻辑
- seed_preset_voice_samples.py部署脚本
2026-10-15 16:58:49 +08:00
xiaoxia 7f825b7e55 fix(viral-prompt): #2310 占位符保留日志降级DEBUG,疑似真bug才WARNING (#2310)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 0s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 3s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 41s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m34s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m14s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m19s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m22s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m27s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 4m46s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 11s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m33s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 7m8s
AI Code Review / AI Code Review (pull_request) Successful in 7m13s
CI/CD Pipeline / Validate - Style (push) Successful in 7m11s
CI/CD Pipeline / Integration Tests (push) Successful in 8m31s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m24s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 3m27s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 3m29s
CI/CD Pipeline / Unit Tests (push) Successful in 14m15s
CI/CD Pipeline / Validate - Security (push) Successful in 15m6s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-10-15 14:19:02 +08:00
xiaoxia 410d686579 fix(viral): #2307 补充——TTS硬限按model细分(Seedance2.0=14.5s/2.5=29s/Wan=14.5s)cherry-pick (#2309)
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 3s
CI/CD Pipeline / Check push changed paths (push) Successful in 3s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m17s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / PR Build Worker Image (pull_request) Successful in 1m24s
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m24s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m17s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m55s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 32s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m21s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (push) Successful in 3m22s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 3m23s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m46s
CI/CD Pipeline / Integration Tests (push) Failing after 4m58s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m42s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m19s
AI Code Review / AI Code Review (pull_request) Successful in 6m49s
CI/CD Pipeline / Validate - Security (push) Successful in 8m4s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m51s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 5m2s
CI/CD Pipeline / Unit Tests (push) Successful in 11m46s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-10-15 13:15:59 +08:00
xiaoxia 4879029c46 fix(viral): #2307 TTS音频时长按模型硬限对齐+max_chars按实际语速重校+reviewer超时收紧 (#2307)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 2s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 4s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 59s
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 42s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m32s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m32s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 31s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 3s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m6s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m18s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m23s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 3m26s
CI/CD Pipeline / Validate - Style (push) Successful in 4m40s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m19s
CI/CD Pipeline / Integration Tests (push) Successful in 5m50s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 6m5s
AI Code Review / AI Code Review (pull_request) Successful in 6m59s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m8s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 4m31s
CI/CD Pipeline / Validate - Security (push) Successful in 8m17s
CI/CD Pipeline / Unit Tests (push) Successful in 12m4s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-10-15 12:22:28 +08:00
xiaoxia 6cfab71d6e fix(viral-parser): #2308 分镜字段映射修复——<shot>/<visual>/<action_details>三字段拆分 (#2308)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (push) Successful in 4s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 4s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 5s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m43s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m16s
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 56s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (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 / Validate - Python (mypy + alembic) (push) Successful in 4m35s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 2m25s
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m1s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 2m8s
CI/CD Pipeline / Integration Tests (push) Successful in 3m53s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 5s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 24s
CI/CD Pipeline / Validate - Style (push) Successful in 5m33s
AI Code Review / AI Code Review (pull_request) Successful in 6m54s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m42s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m49s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 1m15s
CI/CD Pipeline / Validate - Security (push) Successful in 9m17s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m5s
CI/CD Pipeline / Unit Tests (push) Successful in 12m12s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com>
Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
2026-10-15 12:07:38 +08:00
xiaoxia 96786c4f85 fix(viral-script): finish=length救回逻辑挪到StopIteration(chunk分支死代码) (#2306)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (push) Successful in 2s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 3s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m17s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m26s
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 34s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m39s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 17s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m4s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m16s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m28s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 4m25s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Failing after 4m57s
CI/CD Pipeline / Validate - Style (push) Successful in 4m58s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m25s
CI/CD Pipeline / Integration Tests (push) Successful in 6m6s
AI Code Review / AI Code Review (pull_request) Successful in 7m3s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m2s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 4m11s
CI/CD Pipeline / Validate - Security (push) Successful in 10m23s
CI/CD Pipeline / Unit Tests (push) Successful in 12m15s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-10-15 10:42:46 +08:00
xiaoxia bf4b11c49d fix(viral-script): last_finish_reason跨调用泄漏+finish=length内容救回+pro档固定加+early-break门槛 (#2305)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 57s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m31s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m48s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m7s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 1m32s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Failing after 3m38s
CI/CD Pipeline / Integration Tests (push) Successful in 3m40s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m45s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (push) Successful in 4m11s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 2m14s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 5m18s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m51s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
AI Code Review / AI Code Review (pull_request) Successful in 7m17s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m9s
CI/CD Pipeline / Validate - Security (push) Successful in 8m41s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 4m41s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 4m46s
CI/CD Pipeline / Unit Tests (push) Successful in 12m37s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com>
Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
2026-10-15 10:04:06 +08:00
xiaoxia 5b6079964e fix(ai_client): enable_thinking→thinking参数翻译+流式禁SDK重试,根治v6分镜reasoning超时 (#2304)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 3s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m13s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m28s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m42s
CI/CD Pipeline / Build Staging API Image (push) Successful in 1m48s
CI/CD Pipeline / CI Gate (pull_request) Successful in 11s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m10s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 3m9s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 1m19s
CI/CD Pipeline / Integration Tests (push) Successful in 3m34s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m15s
CI/CD Pipeline / Validate - Style (push) Failing after 4m46s
CI/CD Pipeline / Validate - Security (push) Successful in 5m48s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 6m8s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m3s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 6m32s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
AI Code Review / AI Code Review (pull_request) Successful in 7m0s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m18s
CI/CD Pipeline / Unit Tests (push) Successful in 11m22s
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Successful in 22m12s
2026-10-15 03:13:24 +08:00
xiaoxia 0e668fda8c fix(viral-script): 分镜生成关豆包思考模式+放宽超时,根治reasoning超时fallback (#2303)
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 3s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 8s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 53s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m3s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 1m57s
CI/CD Pipeline / CI Gate (pull_request) Successful in 1s
CI/CD Pipeline / Build Staging API Image (push) Successful in 2m44s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 3m9s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 3m36s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m51s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (push) Successful in 3m57s
CI/CD Pipeline / Validate - Style (push) Successful in 4m29s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Successful in 2m3s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m48s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m6s
CI/CD Pipeline / Validate - Security (push) Successful in 6m19s
AI Code Review / AI Code Review (pull_request) Successful in 6m51s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 2m20s
CI/CD Pipeline / Unit Tests (push) Successful in 11m31s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 26m56s
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Successful in 27m4s
2026-10-15 02:00:58 +08:00
xiaoxia b4b6b32211 fix(viral-prompt): 修正_safe_format告警文案误导,区分样例花括号保留与真回落 (#2302)
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m4s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m34s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (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 / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 49s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 6s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m12s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 1m30s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m12s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m37s
CI/CD Pipeline / Integration Tests (push) Successful in 3m45s
CI/CD Pipeline / Build Staging API Image (push) Successful in 3m36s
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 4m47s
CI/CD Pipeline / Validate - Style (push) Successful in 5m1s
AI Code Review / AI Code Review (pull_request) Successful in 6m53s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 2m56s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m54s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m3s
CI/CD Pipeline / Validate - Security (push) Successful in 10m51s
CI/CD Pipeline / Unit Tests (push) Successful in 11m40s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Successful in 22m19s
2026-10-15 00:43:09 +08:00
xiaoxia 50e833eeeb fix(web): Google Fonts 延迟到 window.load 后注入,彻底排除E2E load事件阻塞 (#2301)
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 1s
CI/CD Pipeline / Validate - Style (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
CI/CD Pipeline / Check push changed paths (push) Successful in 6s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been skipped
CI/CD Pipeline / Validate - Security (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m4s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (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 / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (push) Successful in 40s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 1m34s
CI/CD Pipeline / CI Gate (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 44s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m5s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m12s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 3m4s
CI/CD Pipeline / Build Staging API Image (push) Successful in 3m50s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been skipped
CI/CD Pipeline / Integration Tests (push) Successful in 4m18s
CI/CD Pipeline / Validate - Style (push) Successful in 5m23s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m35s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 6m1s
AI Code Review / AI Code Review (pull_request) Successful in 6m49s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m36s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m8s
CI/CD Pipeline / Staging E2E Tests (push) Successful in 3m14s
CI/CD Pipeline / Validate - Security (push) Successful in 13m3s
CI/CD Pipeline / Unit Tests (push) Successful in 18m18s
CI/CD Pipeline / Build Production API Image (push) Has been skipped
CI/CD Pipeline / Build Production Worker Image (push) Has been skipped
CI/CD Pipeline / CI Gate (push) Has been skipped
CI/CD Pipeline / Build Production Web Image (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-10-14 22:56:14 +08:00
22 changed files with 2065 additions and 337 deletions
@@ -0,0 +1,257 @@
"""#2312 storyboard v5 (GLOBAL_CONSTRAINTS+健康行业红线) + review v3 (医疗合规维度) — 保底插入版
问题:#2308三字段拆分、#2311音频重构、#2312合规修复都只更新了代码默认 prompts.py,
没有写 alembic 同步 viral_video_prompt_templates 表。但后台管理端
(/viral-prompt-templates)允许运营在线编辑模板,运营手改的内容不能被迁移覆盖。
策略(重要):
- 本迁移**不** deactivate 任何已有的 active 模板;运营配置的 v6 等高版本保持原样。
- 仅当某个 prompt_type 当前**没有**任何 is_active=true 的模板时(即空库/异常状态),
才把本次插入的 v5/v3 设为 is_active=true 作为保底。
- 已存在 active 模板时,本迁移插入的 v5/v3 以 is_active=false 存档,不影响线上。
- 合规底线不靠本迁移覆盖模板来生效,而是由 prompt_loader.render_system_prompt 的
防御性注入(代码侧自动追加 GLOBAL_CONSTRAINTS + 行业红线)兜底,这样:
① 运营未来在后台随便改模板都不会丢合规底线;
② 新库/空库拿到的保底模板本身就合规。
- 配套 reviewer.py 的本地医疗正则兜底 + 阶段 2 LLM 审核自动重试,形成三层防线。
Revision ID: 111_vv_compliance_prompts
Revises: 110_add_tone_to_viral_video_jobs
Create Date: 2026-10-15
"""
from sqlalchemy import text
from alembic import op
revision = "111_vv_compliance_prompts"
down_revision = "110"
branch_labels = None
depends_on = None
# ── v5 storyboard(编导级分镜 v3.2-合规增强版)────────────────────────────
V5_STORYBOARD_SYSTEM = (
"你是一名懂短视频的编导和口播文案高手。你会拿到图片的真实观察、营销目的和用户参数,"
'请一次性完成对营销意图的理解,并产出可直接拍摄/生成的分镜脚本。不要单独输出"意图解析",'
"意图要直接体现在台词和分镜里。\n\n"
"## 输出格式(XML,严格按结构输出,不要输出额外解释)\n"
"<script>\n"
" <copy_display_markdown><![CDATA[直接展示给用户看的成片文案,用 Markdown 写成流畅叙述]]></copy_display_markdown>\n"
" <clips>\n"
' <clip index="1">\n'
" <time_range>0-3秒</time_range>\n"
" <voiceover>这一镜的口播台词</voiceover>\n"
" <shot>景别、机位高度、焦段、光圈、运镜(6项摄影参数,简短,如『中近景平视,50mm f/1.8,缓慢推镜』)</shot>\n"
" <visual>画面主体、场景、光线、氛围(只写画面内容,不含景别/运镜参数,如『暖光木色门店,店员微笑递茶,背景虚化』)</visual>\n"
" <action_details>人物动作、表情、物品操作细节(真人出镜镜头必填,纯产品/空镜填空线『-』)</action_details>\n"
" <reference_image_index>0</reference_image_index>\n"
" </clip>\n"
" </clips>\n"
" <voiceover_script>把所有 clip 的voiceover 连成完整口播稿</voiceover_script>\n"
" <theme>一句话主题</theme>\n"
" <negative>【反套路化要求】\n"
'禁止使用"家人们谁懂啊""绝绝子""宝子们""家人们""太绝了""yyds"等烂大街网络词;\n'
'禁止"很近"等错别字,应使用"最近";\n'
"禁止固定模板化开头;语言要像真人朋友之间的分享,自然、具体、有信息量。\n"
"禁止医疗诊疗类词汇(治疗/治愈/根治/疗效/特效/药到病除/一用就好/对症/偏方/秘方/一搭手就知道/帮你看看等)。\n"
"禁止效果承诺(包治/根治/立刻见效/永不复发/一用就好等)。</negative>\n"
"</script>\n\n"
"【必须遵守的硬约束】\n"
'1. 不编造时间:不写"今年最新""2024 爆款"等会过时的时间表述。\n'
'2. 不承诺效果:不写"保证""一定""100%有效""包治百病"等绝对化用语,不写任何效果承诺。\n'
"3. 不编造价格、销量、认证、奖项:除非用户在文案中明确给出,否则一律不写。\n"
"4. 符合广告法及平台社区规范,不触碰医疗/养生/金融等敏感行业红线。\n"
"5. 只描述图片中真实可见的内容,看不到的不瞎猜。\n"
"6. 不出现医疗/诊疗/治疗/治愈/疗效/根治/对症/药效/偏方/秘方/药到病除/一用就好/立刻见效/特效/克星/急救/救星/神药/祖传/宫廷秘方/一贴灵/一抹就好等宣称诊疗或疗效的词汇。\n"
'7. 养生/按摩/理疗/推拿/养生馆/调理类门店文案:只写"放松""舒缓""缓解疲劳""舒服""松快""解乏""轻松""舒展""按完轻松多了"等感受类表达,严禁暗示治病、治病根、诊疗、根治、对症、疗效、专家诊断、老师一搭手就知道问题在哪等越界表述。\n'
'8. 不冒充医生/专家/老师做诊疗判断,不写"老师帮你看看""一搭手就知道""哪儿疼治哪儿""对症调理"等暗示诊断/治疗的表述。\n\n'
"{industry_redlines}\n\n"
"## 写作要求\n"
"1. 口播台词:像真人面对镜头说话,短句、口语化、有停顿有情绪,开头 3 秒给出钩子;不要书面腔,不要机械报参数。\n"
"2. <shot> 只写6项摄影参数(景别/机位高度/焦段/光圈/运镜),简短不超过20字;<visual> 写观众会看到的画面主体/场景/光线/氛围;<action_details> 写人物动作/表情/物品操作细节(真人出镜必填)。三字段各司其职,不要混写。\n"
'3. copy_display_markdown:直接展示给最终用户的文案,用 Markdown 写成自然、流畅、有感染力的成片文案,可用小标题与短句组织;不要做字段列表,不要出现"镜头一/台词:"这类制作说明。\n'
"4. 内容必须来自图片观察与用户给出的信息,不编造卖点、不夸大、不使用绝对化用语和虚假承诺。\n"
"5. reference_image_index 填本镜参考图片序号(从 0 开始),没有合适参考图填 -1。\n"
"6. 分镜数量与时长匹配总时长,节奏紧凑。\n"
"7. 【字数/镜头数/时间轴硬约束】:严格遵守 user_prompt 里给出的 {duration_constraint_text},宁少勿多。\n"
"8. 每个 clip 必须分配一个 reference_image_index(从 0 开始的图片序号),没有合适图片填 -1。\n"
"9. 必须严格按<marketing_purpose><target_audience><persona><viral_structure><language><industry>指定的参数写文案和分镜,不能忽略任何一项用户参数。\n"
'10. 禁止使用"很近"等错别字,统一使用"最近"。'
)
V5_STORYBOARD_USER = (
"<marketing_purpose>{marketing_purpose}</marketing_purpose>\n"
"<industry>{industry}</industry>\n"
"<image_analysis>\n{image_summary}\n</image_analysis>\n"
"<user_parameters>\n"
"<theme_hint>{theme_hint}</theme_hint>\n"
"<duration>{duration}秒</duration>\n"
"<aspect_ratio>{aspect_ratio}</aspect_ratio>\n"
"<tone>{tone}</tone>\n"
"<target_audience>{target_audience}</target_audience>\n"
"<persona>{persona_hint}</persona>\n"
"<viral_structure>{viral_structure_hint}</viral_structure>\n"
"<language>{language_hint}</language>\n"
"<extra_requirements>{extra_requirements}</extra_requirements>\n"
"</user_parameters>\n"
"{video_style_section}\n"
"<duration_constraints>\n{duration_constraint_text}\n</duration_constraints>\n"
"请严格按 XML 结构输出分镜脚本。"
)
V5_STORYBOARD_EXAMPLE = (
"<script>\n"
" <copy_display_markdown><![CDATA[# 在御众堂,把松弛的自己一点点找回来\n"
"产后妈妈最懂那种力不从心,推开门,暖光和一杯热茶先接住了你。\n"
"最近连抱娃都觉得腰发硬,过来躺一会儿,按完整个背都松了,带娃也有力气了。]]></copy_display_markdown>\n"
" <clips>\n"
' <clip index="1">\n'
" <time_range>0-4秒</time_range>\n"
" <voiceover>生完娃,是不是连照镜子的勇气都没了?</voiceover>\n"
" <shot>中近景平视,50mm f/2.0,缓慢推镜</shot>\n"
" <visual>暖光浴室镜前,妈妈略显疲惫地看向镜中自己,镜灯打在侧脸</visual>\n"
" <action_details>妈妈手扶洗手台,微微低头再抬眼看镜,眼眶微红</action_details>\n"
" <reference_image_index>0</reference_image_index>\n"
" </clip>\n"
' <clip index="2">\n'
" <time_range>4-10秒</time_range>\n"
" <voiceover>推开门,暖光和一杯热茶先接住了你。</voiceover>\n"
" <shot>中景平视,35mm f/2.8,镜头缓慢平移</shot>\n"
" <visual>门店前台暖光木色装修,茶水冒热气,背景柔和虚化</visual>\n"
" <action_details>店员微笑双手递上茶杯,妈妈伸手接过,指尖轻触杯沿</action_details>\n"
" <reference_image_index>1</reference_image_index>\n"
" </clip>\n"
' <clip index="3">\n'
" <time_range>10-15秒</time_range>\n"
" <voiceover>来御众堂躺一会儿,整个人都松了。</voiceover>\n"
" <shot>近景缓慢拉远至中景,85mm f/1.8,匀速后拉</shot>\n"
" <visual>护理床暖光打在妈妈侧脸,最后画面露出御众堂品牌LOGO</visual>\n"
" <action_details>妈妈闭眼放松,嘴角微微上扬,肩膀缓缓下沉</action_details>\n"
" <reference_image_index>2</reference_image_index>\n"
" </clip>\n"
" </clips>\n"
" <voiceover_script>生完娃,是不是连照镜子的勇气都没了?推开门,暖光和一杯热茶先接住了你。来御众堂躺一会儿,整个人都松了。</voiceover_script>\n"
" <theme>产后妈妈走进御众堂重拾状态</theme>\n"
' <negative>模糊、畸变、夸大疗效、绝对化用语、"很近"等错别字</negative>\n'
"</script>"
)
# ── v3 review(文案审核 v3-医疗合规加强版)─────────────────────────────────
V3_REVIEW_SYSTEM = (
"你是一名短视频广告合规审核与文案优化专家。请审核下面这段口播文案:\n"
"1) 广告法与平台合规(绝对化用语、虚假承诺、导流违规、套路烂梗词);\n"
'2) **医疗/养生/健康红线(重点审查)**:是否出现诊疗暗示("帮你看看""一搭手就知道""老师诊断""检查"等)、'
'疗效/治愈承诺("治好""根治""见效""一用就好""药到病除""特效""克星""永不复发"等)、'
'医疗术语("疗程""对症""膏药""针灸""中药""偏方""秘方""诊疗""治疗""就诊"等)、'
'冒充医生/专家/老师做诊断、贬低正规医疗("别贴膏药""别吃药""别去医院"等);\n'
'3) 养生/按摩/理疗/推拿/保健类文案是否用了纯感受类表达(放松/舒缓/舒服/松快/解乏/轻松),而不是"治病/根治/疗效"类表达;\n'
"4) 口播是否自然、口语化、无书面腔;\n"
'5) 是否有明显错别字(例如把"最近"写成"很近")。\n\n'
"只输出 XML,结构:\n"
"<review>\n"
" <passed>true 或 false</passed>\n"
" <issues>\n"
' <issue dimension="违规词/夸大承诺/错别字/其他" severity="error或warning">具体问题</issue>\n'
" </issues>\n"
"</review>\n"
"没有问题时 issues 留空、passed 为 true。不要输出 rewrite/rewrite_suggestion 字段。"
)
V3_REVIEW_USER = "<voiceover_script>\n{voiceover_script}\n</voiceover_script>\n\n请审核以上口播文案。"
V3_REVIEW_EXAMPLE = (
"<review>\n"
" <passed>false</passed>\n"
" <issues>\n"
' <issue dimension="夸大承诺" severity="error">使用绝对化用语"100%有效",违反广告法</issue>\n'
' <issue dimension="违规词" severity="warning">使用套路词"绝绝子"</issue>\n'
" </issues>\n"
"</review>"
)
def _has_active(conn, prompt_type: str) -> bool:
row = conn.execute(
text("SELECT COUNT(*) FROM viral_video_prompt_templates WHERE prompt_type = :pt AND is_active = true"),
{"pt": prompt_type},
).scalar()
return bool(row and row > 0)
def _version_exists(conn, prompt_type: str, version: int) -> bool:
row = conn.execute(
text("SELECT id FROM viral_video_prompt_templates WHERE prompt_type = :pt AND version = :v"),
{"pt": prompt_type, "v": version},
).fetchone()
return row is not None
def _insert(conn, prompt_type: str, version: int, name: str, sys_p: str, usr_p: str, ex_p: str, active: bool) -> None:
conn.execute(
text(
"INSERT INTO viral_video_prompt_templates (name, prompt_type, version, system_prompt, user_prompt_template, example_output, is_active)"
" VALUES (:name, :pt, :ver, :sys, :usr, :ex, :active)"
),
{"name": name, "pt": prompt_type, "ver": version, "sys": sys_p, "usr": usr_p, "ex": ex_p, "active": active},
)
def _next_version(conn, prompt_type: str, minimum: int) -> int:
mx = (
conn.execute(
text("SELECT COALESCE(MAX(version), 0) FROM viral_video_prompt_templates WHERE prompt_type = :pt"),
{"pt": prompt_type},
).scalar()
or 0
)
return max(minimum, int(mx) + 1)
def upgrade():
conn = op.get_bind()
# storyboard v5:如果同 version 已存在(前次失败重跑)就跳过
sb_ver = 5
if not _version_exists(conn, "storyboard", sb_ver):
sb_active = not _has_active(conn, "storyboard")
_insert(
conn,
"storyboard",
sb_ver,
"编导级分镜v3.2-合规增强版(#2312)",
V5_STORYBOARD_SYSTEM,
V5_STORYBOARD_USER,
V5_STORYBOARD_EXAMPLE,
active=sb_active,
)
# review v3
rv_ver = 3
if not _version_exists(conn, "review", rv_ver):
rv_active = not _has_active(conn, "review")
_insert(
conn,
"review",
rv_ver,
"文案审核v3-医疗合规加强版(#2312)",
V3_REVIEW_SYSTEM,
V3_REVIEW_USER,
V3_REVIEW_EXAMPLE,
active=rv_active,
)
# 注意:不 deactivate 任何已有模板。运营在后台编辑的高版本(如 v6)保持 active。
# 合规底线由 prompt_loader.render_system_prompt 的防御性注入兜底:
# 检测到模板缺"不承诺效果"指纹则自动追加 GLOBAL_CONSTRAINTS,
# 缺 {industry_redlines} 占位符则直接追加行业红线内容,
# 因此不管 active 模板是 v5/v6/未来 v7,都会被自动补上合规底线。
def downgrade():
conn = op.get_bind()
# 删除本次迁移插入的 v5/v3 行(按 name 精确匹配,不误删运营自定义)
conn.execute(
text("DELETE FROM viral_video_prompt_templates WHERE name LIKE :n AND version IN (5, 3)"),
{"n": "%#2312%"},
)
# 不改动其他任何版本的 is_active 状态,避免误恢复被运营手动停用的版本。
+125
View File
@@ -0,0 +1,125 @@
"""#2312 恢复运营v6模板为active + 存档#2312合规模板
背景:旧版 alembic 111(commit 7935cb6a)错误地 _deactivate_all() 了所有现有模板,
把运营在后台 /viral-prompt-templates 配置的 v6(编导级分镜 v6)is_active 改成了 false,
并把 #2312 合规版(storyboard version=5 / review version=3)设为 active,覆盖了运营配置。
本迁移(112)的任务:
1. storyboard 类型:恢复 v6 为 is_active=true,把 #2312 插入的 v5 和运营试配的 v7 设为 is_active=false
2. review 类型:找到运营配置的最高版本(不是我们 alembic 插的 v3),恢复其 is_active=true;
把我们 alembic 插入的 v3 设为 is_active=false
3. 全部操作加 IF EXISTS 防护,幂等可重入。
4. 防御注入兜底依然生效(prompt_loader 自动追加合规底线到任何 active 模板),
运营 v6 恢复后仍会被自动追加 GLOBAL_CONSTRAINTS + 行业红线,合规不丢。
Revision ID: 112_restore_v6_prompt
Revises: 111_vv_compliance_prompts
Create Date: 2026-10-15
"""
from sqlalchemy import text
from alembic import op
revision = "112_restore_v6_prompt"
down_revision = "111_vv_compliance_prompts"
branch_labels = None
depends_on = None
# 我们 alembic 111 插入的版本号(用于识别哪些是代码插入的保底版本)
_OUR_SB_VERSION = 5 # #2312 storyboard v5
_OUR_RV_VERSION = 3 # #2312 review v3
# 运营期望恢复为 active 的版本
_OPERATOR_SB_ACTIVE_VERSION = 6 # 编导级分镜 v6
# 运营在旧111之后可能试配过的合规版本(需要存档)
_OPERATOR_SB_ARCHIVE_VERSIONS = [7]
def _has_row(conn, prompt_type: str, version: int) -> bool:
row = conn.execute(
text("SELECT id FROM viral_video_prompt_templates " "WHERE prompt_type=:pt AND version=:v"),
{"pt": prompt_type, "v": version},
).fetchone()
return row is not None
def _set_active(conn, prompt_type: str, version: int, active: bool) -> int:
"""设置某个 (type, version) 的 is_active;返回受影响行数(0 表示该行不存在)。"""
res = conn.execute(
text("UPDATE viral_video_prompt_templates SET is_active=:a " "WHERE prompt_type=:pt AND version=:v"),
{"a": bool(active), "pt": prompt_type, "v": version},
)
return res.rowcount or 0
def _ensure_only_one_active(conn, prompt_type: str, active_version: int) -> None:
"""确保 prompt_type 类型下只有 active_version 一个是 is_active=true。
其他所有该类型模板统一设为 false。"""
conn.execute(
text("UPDATE viral_video_prompt_templates SET is_active=false " "WHERE prompt_type=:pt AND version!=:av"),
{"pt": prompt_type, "av": active_version},
)
# 再确保目标行是 true(之前可能本来就是 false)
conn.execute(
text("UPDATE viral_video_prompt_templates SET is_active=true " "WHERE prompt_type=:pt AND version=:av"),
{"pt": prompt_type, "av": active_version},
)
def upgrade():
conn = op.get_bind()
# ── 1. storyboard:恢复运营 v6 ──────────────────────────────────────
if _has_row(conn, "storyboard", _OPERATOR_SB_ACTIVE_VERSION):
_ensure_only_one_active(conn, "storyboard", _OPERATOR_SB_ACTIVE_VERSION)
# 额外保险:v5/v7 明确设为 false(_ensure_only_one_active 已做,再次确认)
for v in [_OUR_SB_VERSION] + _OPERATOR_SB_ARCHIVE_VERSIONS:
if _has_row(conn, "storyboard", v):
_set_active(conn, "storyboard", v, False)
else:
# 极端情况:v6 不存在(库没跑过旧111或者被删了),保持 #2312 v5 active 作为保底
# 不做任何变更,避免把一个能用的状态改坏
conn.execute(
text("UPDATE viral_video_prompt_templates SET is_active=true " "WHERE prompt_type=:pt AND version=:v"),
{"pt": "storyboard", "v": _OUR_SB_VERSION},
)
# ── 2. review:恢复运营版本,存档我们的 v3 ──────────────────────────
# 找 review 类型下、不是我们插入的 v3 的最高版本号
op_row = conn.execute(
text("SELECT MAX(version) FROM viral_video_prompt_templates " "WHERE prompt_type=:pt AND version!=:ev"),
{"pt": "review", "ev": _OUR_RV_VERSION},
).fetchone()
op_max_ver = op_row[0] if op_row else None
if op_max_ver is not None and _has_row(conn, "review", int(op_max_ver)):
# 有运营版本,恢复它为 active,我们 v3 存档
_ensure_only_one_active(conn, "review", int(op_max_ver))
if _has_row(conn, "review", _OUR_RV_VERSION):
_set_active(conn, "review", _OUR_RV_VERSION, False)
else:
# 没有运营版本(空库/新库),保持我们 v3 作为保底 active
conn.execute(
text("UPDATE viral_video_prompt_templates SET is_active=true " "WHERE prompt_type=:pt AND version=:v"),
{"pt": "review", "v": _OUR_RV_VERSION},
)
def downgrade():
"""downgrade 回滚到旧111跑完后的状态:我们的 v5/v3 为 active,其他全部 false。
注意:这会再次 deactivate 运营 v6,仅用于回滚测试场景,生产不要执行 downgrade。"""
conn = op.get_bind()
# storyboard
conn.execute(
text("UPDATE viral_video_prompt_templates SET is_active=false WHERE prompt_type=:pt"),
{"pt": "storyboard"},
)
if _has_row(conn, "storyboard", _OUR_SB_VERSION):
_set_active(conn, "storyboard", _OUR_SB_VERSION, True)
# review
conn.execute(
text("UPDATE viral_video_prompt_templates SET is_active=false WHERE prompt_type=:pt"),
{"pt": "review"},
)
if _has_row(conn, "review", _OUR_RV_VERSION):
_set_active(conn, "review", _OUR_RV_VERSION, True)
+6
View File
@@ -623,6 +623,12 @@ class LipsyncService:
# 预合成模式:script_text 可空(因为 timings 已自带句子文本),但仍建议传
if not isinstance(sentence_timings, list) or len(sentence_timings) == 0:
raise MediaKitError("预合成模式 sentence_timings 不能为空", code="InvalidInput")
# 文案为空时从 sentence_timings 拼接兜底(Ditto 情绪分析依赖 script_text;
# 前端 #1875 起预合成 payload 不带 script_text,导致 job.script_text 落库为空)
if not (script_text or "").strip():
script_text = "".join(
str(item.get("text") or "") for item in sentence_timings if isinstance(item, dict)
).strip()
# 0.5 lip_sync 计费预扣(全局 points 开关 + 功能开关均开才扣)
prepaid_credits = 0.0
+47 -21
View File
@@ -4,31 +4,57 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- 标题字体(#2001 / #font-selection 修复):完全非阻塞加载中文字体
- 使用 preload + 动态 rel 切换的"无阻塞字体加载"模式:
浏览器以 preload 低优先级拉取 CSS,不会阻塞 render/DOMContentLoaded/load 任一事件
- onload 后切换 rel=stylesheet 字体才生效,首屏用系统字体兜底(Noto Sans SC → PingFang SC → Microsoft YaHei → sans-serif)
- 解决境内访问 Google Fonts 挂起时首屏白屏 + Playwright load 事件超时(E2E 也受益) -->
<link
rel="preload"
as="style"
href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@400;700;900&family=ZCOOL+KuaiLe&family=ZCOOL+XiaoWei&family=ZCOOL+QingKe+HuangYou&family=Ma+Shan+Zheng&family=Long+Cang&family=Liu+Jian+Mao+Cao&family=Zhi+Mang+Xing&display=swap"
/>
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@400;700;900&family=ZCOOL+KuaiLe&family=ZCOOL+XiaoWei&family=ZCOOL+QingKe+HuangYou&family=Ma+Shan+Zheng&family=Long+Cang&family=Liu+Jian+Mao+Cao&family=Zhi+Mang+Xing&display=swap"
media="print"
onload="this.media='all'; this.onload=null"
/>
<noscript
><link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@400;700;900&family=ZCOOL+KuaiLe&family=ZCOOL+XiaoWei&family=ZCOOL+QingKe+HuangYou&family=Ma+Shan+Zheng&family=Long+Cang&family=Liu+Jian+Mao+Cao&family=Zhi+Mang+Xing&display=swap"
/></noscript>
<!-- 标题字体(#2001 / #font-selection 修复):Google Fonts 中文字体完全延迟加载
关键设计:所有 Google Fonts 子资源(CSS + 字体文件)必须在 window load 之后才发起请求。
- 原因:fonts.googleapis.com/gstatic.com 在境内访问间歇性挂起,若在关键路径内
(<link rel=stylesheet>/preload/preconnect 等任何会被计入文档子资源完成的形式),
会拖死 window.load 事件,导致 Playwright page.goto 默认 waitUntil:'load' 90s 超时,
同时真实用户首屏也可能因等字体而白屏。
- 实现:head 里完全不出现 Google 域的 <link>,首屏用系统字体兜底
(font-family fallback 链:Noto Sans SC → PingFang SC → Microsoft YaHei → sans-serif);
页面 load 后通过 requestIdleCallback 动态注入 <link rel=stylesheet>,字体异步加载生效。
- noscript 降级:JS 禁用时仍然阻塞加载(可接受,这类用户极少)。
- 参考:运维 2026-10-14 E2E 失败根因分析,#2300 preload/media=print 方案不治本,
preload 与 media=print 样式表仍计入子资源完成,会阻塞 load 事件。 -->
<title>小虾 SaaS - 自动化视频剪辑平台</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<!-- Google Fonts 延迟注入:必须在 main.tsx 之后,用独立 <script>(非 module)在页面解析
完成时注册 load 回调;window.load 触发后再 requestIdleCallback 插 <link>,
确保字体请求不进入首屏关键路径,也不阻塞 Playwright load 等待 -->
<script>
;(function () {
var FONT_HREF =
"https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@400;700;900&family=ZCOOL+KuaiLe&family=ZCOOL+XiaoWei&family=ZCOOL+QingKe+HuangYou&family=Ma+Shan+Zheng&family=Long+Cang&family=Liu+Jian+Mao+Cao&family=Zhi+Mang+Xing&display=swap"
function inject() {
if (document.getElementById("__gfonts_link")) return
var l = document.createElement("link")
l.id = "__gfonts_link"
l.rel = "stylesheet"
l.href = FONT_HREF
l.setAttribute("data-lazy", "1")
document.head.appendChild(l)
}
function schedule() {
if ("requestIdleCallback" in window) {
requestIdleCallback(inject, { timeout: 2000 })
} else {
setTimeout(inject, 500)
}
}
if (document.readyState === "complete") {
schedule()
} else {
window.addEventListener("load", schedule, { once: true })
}
})()
</script>
<noscript
><link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700;900&family=Noto+Serif+SC:wght@400;700;900&family=ZCOOL+KuaiLe&family=ZCOOL+XiaoWei&family=ZCOOL+QingKe+HuangYou&family=Ma+Shan+Zheng&family=Long+Cang&family=Liu+Jian+Mao+Cao&family=Zhi+Mang+Xing&display=swap"
/></noscript>
</body>
</html>
@@ -255,6 +255,8 @@ const AiAvatarPage: React.FC = () => {
audio_url: state.ttsPreview.audioUrl!,
audio_duration: state.ttsPreview.duration,
sentence_timings: state.ttsPreview.sentenceTimings,
// 预合成也必须带文案:后端落库 job.script_text,Ditto 情绪分析依赖它
script_text: state.scriptText,
enable_video_loop: true,
}
} else {
@@ -108,7 +108,7 @@ export const FALLBACK_VIDEO_MODELS: ViralVideoModel[] = [
display_name: "Wan 3.0 — 通义万相全能",
supports_audio: true,
supported_resolutions: ["480p", "720p", "1080p"],
max_duration: 15,
max_duration: 30,
},
]
export const RESOLUTION_ORDER = ["480p", "720p", "1080p", "4k"]
@@ -79,7 +79,7 @@ export const StoryboardCard: React.FC<StoryboardCardProps> = ({
<div className="vv-copy-box vv-copy-loading">
<VVSpinner />
<span className="vv-copy-loading-text">{stageMsg}</span>
<span className="vv-copy-loading-hint">预计 10-30 秒,请稍候</span>
<span className="vv-copy-loading-hint">预计 5-15 秒,请稍候</span>
</div>
)
}
+7 -3
View File
@@ -302,11 +302,15 @@ def _legacy_upload_to_oss(local_path: Path, storage_key: str) -> str | None:
return None
def upload_to_oss(local_path: Path | str, storage_key: str) -> str | None:
"""上传文件到 OSS,返回公网 URL。"""
def upload_to_oss(
local_path: Path | str,
storage_key: str,
extra_headers: dict | None = None,
) -> str | None:
"""上传文件到 OSS,返回公网 URL。extra_headers 可传 x-oss-object-acl 等自定义头。"""
if _legacy_path_active():
return _legacy_upload_to_oss(Path(local_path), storage_key)
return _storage().upload_file_smart(local_path, storage_key)
return _storage().upload_file_smart(local_path, storage_key, extra_headers=extra_headers)
def get_signed_download_url(storage_key_or_url: str, expires_seconds: int = 3600) -> str | None:
File diff suppressed because it is too large Load Diff
+2
View File
@@ -37,6 +37,8 @@ COPY alembic.ini /app/alembic.ini
COPY alembic/ /app/alembic/
COPY migrations/ /app/migrations/
COPY packages/ /app/packages/
# #2311: 预置音色样本 seed 脚本等运维/部署脚本需在容器内可用
COPY scripts/ /app/scripts/
# PR #1844 起,worker 还需要加载 apps.api.app.tasks.lipsync_tts,
# 该 task 依赖 app.services.* 与 app.core.celery_app(PYTHONPATH=/app/apps/api 下解析)。
# 为避免后续新增 task 再次漏 COPY,直接把整个 apps/api/app/ 复制进 worker 镜像。
@@ -30,14 +30,20 @@ _warned: dict[str, float] = {}
_warn_lock = threading.Lock()
def _warn_once(key: str, template_type: str, e: BaseException | str | None = None) -> None:
def _warn_once(key: str, context: str, detail: BaseException | str | None = None) -> None:
"""冷却告警通用方法:5 分钟内同 key 只打一次,避免日志刷屏。
- key: 告警分组键(去重用)
- context: 本条告警的简短场景描述(直接拼进日志,不要再写死 'fallback to default' 字样)
- detail: 具体异常或描述
"""
now = time.monotonic()
with _warn_lock:
last = _warned.get(key, 0.0)
if now - last < _WARN_COOLDOWN_SECONDS:
return
_warned[key] = now
logger.warning("viral_video prompt template %s fallback to default: %s", template_type, e)
logger.warning("viral_video prompt %s: %s", context, detail)
@dataclass
@@ -85,10 +91,10 @@ def _get_session():
url = str(get_shared_settings().database_url)
except Exception as e: # noqa: BLE001
_warn_once("session_config", "db_config", e)
_warn_once("session_config", "db config failed (will fallback)", e)
return None
if not url:
_warn_once("session_url", "db_url", "database_url empty")
_warn_once("session_url", "db_url empty (will fallback)", "database_url empty")
return None
url = url.replace("postgresql+asyncpg://", "postgresql+psycopg://")
if url.startswith("postgresql://") and "psycopg" not in url:
@@ -128,14 +134,14 @@ def _load_from_db(prompt_type: str) -> Optional[PromptTemplate]:
is_active=bool(row[6]),
)
except Exception as e: # noqa: BLE001 - 表不存在/DB 不可用时静默回落
_warn_once(f"load_db:{prompt_type}", prompt_type, e)
_warn_once(f"load_db:{prompt_type}", f"db load failed for {prompt_type} (will fallback to code default)", e)
return None
finally:
if session is not None:
try:
session.close()
except Exception as e: # noqa: BLE001
_warn_once(f"session_close:{prompt_type}", prompt_type, e)
_warn_once(f"session_close:{prompt_type}", f"session close failed for {prompt_type}", e)
def get_template(prompt_type: str, *, force_refresh: bool = False) -> Optional[PromptTemplate]:
@@ -151,7 +157,11 @@ def get_template(prompt_type: str, *, force_refresh: bool = False) -> Optional[P
template = _load_from_db(prompt_type) or _fallback(prompt_type)
if template is None:
_warn_once(f"no_template:{prompt_type}", prompt_type, "no template in db or code defaults")
_warn_once(
f"no_template:{prompt_type}",
f"NO TEMPLATE for {prompt_type} (neither db nor code defaults)",
"no template in db or code defaults",
)
if template is not None:
with _lock:
_cache[prompt_type] = (now, template)
@@ -213,21 +223,78 @@ def _safe_format(text: str, kwargs: dict) -> str:
out.append(c)
i += 1
if errors:
# 模板里花括号炸format是配置bug(如v5事故里{duration.1格式写全6项参数}),
# 提升到 ERROR 级别,避免被warning海淹没
logger.error(
"[viral][prompt] 模板格式化有%d个占位符无法渲染(示例:%s),"
"已原样保留——请检查system/user_prompt_template中花括号是否为样例文本而非变量",
# 模板里花括号炸format分两种:
# 1. 配置bug(如v5事故{duration.1格式写全6项参数}非法属性访问)→ 需要排查
# 2. 样例文本花括号(如{大远景/远景/全景}给LLM看的景别选项、JSON示例、XML说明)→ 原样保留属正常
# 注意:本函数只原样保留,不会让template回落到DEFAULT_TEMPLATES;
# 真正的回落到代码默认模板只在DB查询失败/无激活模板时发生(见_load_from_db/get_template),
# 那里会打独立ERROR日志并带job_id(见viral_video.py中DEFAULT_TEMPLATES检测块)。
# #2310: 降级为WARNING,因为大部分是DB模板中的样例花括号正常保留,不是bug;
# 仅在错误数异常多(>10)或包含明显属性访问错误(.xxx/[xxx])时提级到WARNING加关注
_has_real_bug = any("." in e or "[" in e for e in errors[:5])
_log_fn = logger.warning if _has_real_bug else logger.debug
_log_fn(
"[viral][prompt] 模板格式化有%d个花括号原样保留(示例:%s)——"
"样例文本(景别选项/JSON示例)可忽略;若应为变量请检查占位符拼写",
len(errors),
errors[0],
)
_warn_once("safe_format", "format", f"{len(errors)}个占位符异常(首条{errors[0]})")
_warn_once(
"safe_format",
f"format-keep({len(errors)}placeholders)",
f"{len(errors)}个占位符原样保留(首条{errors[0]}),未回落默认模板",
)
return "".join(out)
def render_system_prompt(template: PromptTemplate, **kwargs) -> str:
"""system_prompt 含运行时变量时填充;example_output 存在时作为 few-shot 样例追加到末尾。"""
"""system_prompt 含运行时变量时填充;example_output 存在时作为 few-shot 样例追加到末尾。
#2312 防御:DB 配置的模板(viral_video_prompt_templates)若漏掉 GLOBAL_CONSTRAINTS 或
# industry_redlines 占位符,代码侧兜底追加,避免再次出现"代码加了规则但 DB 旧模板没带"
# 的静默失效问题(#2312 根因:#2308/#2311/#2312 连续改了 prompts.py 默认值但没写 alembic)。
"""
# #2312 E2E问题2: 占位符别名兼容——运营DB模板可能用{fusion_result}等历史命名,
# 代码传 voiceover_script=。自动补别名避免"未提供待审核文案"。
_alias_map = {
"voiceover_script": ("fusion_result", "script", "copy_text"),
"storyboard_input": ("input_text", "brief", "用户需求"),
}
for _src_key, _aliases in _alias_map.items():
if _src_key in kwargs and kwargs[_src_key]:
for _alias in _aliases:
kwargs.setdefault(_alias, kwargs[_src_key])
body = _safe_format(template.system_prompt, kwargs)
# 防御性注入:GLOBAL_CONSTRAINTS 核心规则——若 DB 模板完全没有这些关键词则追加。
# 判定指纹用多个关键词组合,避免运营改了措辞后漏判。
if template.prompt_type in ("storyboard",) and body:
try:
from packages.application.viral_video.prompts import GLOBAL_CONSTRAINTS
_need_global = True
_fp_compliance = ("不承诺", "效果", "绝对化")
_fp_medical = ("医疗", "诊疗", "根治", "疗效", "治愈")
_has_c = any(k in body for k in _fp_compliance)
_has_m = any(k in body for k in _fp_medical)
if _has_c and _has_m:
_need_global = False
if _need_global:
body = body.rstrip() + "\n\n" + GLOBAL_CONSTRAINTS
except Exception:
pass
# {industry_redlines} 占位符缺失时,把运行时传入的红线内容直接追加到末尾。
ir = kwargs.get("industry_redlines", "")
_ir_fps = (
"【养生/健康/理疗行业合规红线",
"【上次生成审核未通过的具体问题",
"【通用合规】",
"(非医疗健康行业,遵守通用广告法",
)
_already_has_ir = any(k in body for k in _ir_fps)
if ir and "{industry_redlines}" not in body and not _already_has_ir:
body = body.rstrip() + "\n\n" + ir
example = (template.example_output or "").strip()
if not example:
return body
@@ -238,6 +305,15 @@ def render_system_prompt(template: PromptTemplate, **kwargs) -> str:
def render_user_prompt(template: PromptTemplate, **kwargs) -> str:
r"""填充 user_prompt_template 占位符;example_output 存在时作为 few-shot 样例追加到 user 消息末尾,
配合 \_build_example_exchange 拼多轮 messages,LLM 收到完整「示例输入→示例输出」对齐格式。"""
# #2312 E2E问题2: 同 render_system_prompt,补占位符别名
_alias_map = {
"voiceover_script": ("fusion_result", "script", "copy_text"),
"storyboard_input": ("input_text", "brief", "用户需求"),
}
for _src_key, _aliases in _alias_map.items():
if _src_key in kwargs and kwargs[_src_key]:
for _alias in _aliases:
kwargs.setdefault(_alias, kwargs[_src_key])
body = _safe_format(template.user_prompt_template, kwargs)
example = (template.example_output or "").strip()
if not example:
+82 -18
View File
@@ -15,19 +15,67 @@ example_output / is_active。
from __future__ import annotations
# 所有文案类 Prompt 自动注入的硬约束
# 所有文案类 Prompt 自动注入的硬约束(#2312: 加强医疗/养生行业红线)
GLOBAL_CONSTRAINTS = """【必须遵守的硬约束】
1. 不编造时间:不写"今年最新""2024 爆款"等会过时的时间表述。
2. 不承诺效果:不写"保证""一定""100%有效""包治百病"等绝对化用语。
2. 不承诺效果:不写"保证""一定""100%有效""包治百病"等绝对化用语,不写任何效果承诺。
3. 不编造价格、销量、认证、奖项:除非用户在文案中明确给出,否则一律不写。
4. 符合广告法及平台社区规范。
5. 只描述图片中真实可见的内容,看不到的不瞎猜。"""
4. 符合广告法及平台社区规范,不触碰医疗/养生/金融等敏感行业红线。
5. 只描述图片中真实可见的内容,看不到的不瞎猜。
6. 不出现医疗/诊疗/治疗/治愈/疗效/根治/对症/药效/偏方/秘方/药到病除/一用就好/立刻见效/特效/克星/急救/救星/神药/祖传/宫廷秘方/一贴灵/一抹就好等宣称诊疗或疗效的词汇。
7. 养生/按摩/理疗/推拿/养生馆/调理类门店文案:只写"放松""舒缓""缓解疲劳""舒服""松快""解乏""轻松""舒展""按完轻松多了"等感受类表达,严禁暗示治病、治病根、诊疗、根治、对症、疗效、专家诊断、老师一搭手就知道问题在哪等越界表述。
8. 不冒充医生/专家/老师做诊疗判断,不写"老师帮你看看""一搭手就知道""哪儿疼治哪儿""对症调理"等暗示诊断/治疗的表述。"""
# 医疗/养生/保健/理疗行业强约束(当 industry 命中 HEALTH_INDUSTRY_KEYWORDS 时额外注入)
HEALTH_INDUSTRY_REDLINES = """【养生/健康/理疗行业合规红线(本行业必须严格遵守)】
1. 严禁暗示诊疗/治疗/治愈:禁止出现"治疗""治愈""治好""根治""对症""诊疗""看病""就诊""疗效""药效""见效""克星""救星""药到病除""一用就好""立刻见效""特效""一贴灵""一抹就好"等词。
2. 严禁诊断暗示:禁止出现"帮你看看""一搭手就知道""哪儿有问题""查出""诊断""判断"等暗示专业诊断的表述;工作人员不能被描述成具备诊断能力的"老师""大夫""医生""专家"。
3. 严禁功效承诺:禁止承诺"能治好""贴了就好""按完就不疼""根治""永不复发""药到病除""立刻缓解"等。
4. 身体部位疼痛描述只能作为**顾客主观感受的共情钩子**,不能接"我们能治/能好/能根除"的承诺。正确示范:「肩膀酸了吧?来这儿按一按,松快松快」;错误示范:「肩颈疼别忍着,让老师帮你看看,一搭手就知道问题在哪」。
5. 门店/服务只能描述成"放松""舒缓""缓解疲劳""舒服""松快""解乏""轻松""舒展""休息一下"这类纯感受/体验类词。
6. 不要出现"膏药""针灸""艾灸""中药""方子""疗程""对症""偏方""秘方""祖传""宫廷秘方"等医疗/药方相关词。
7. 不要引导"别贴膏药""别吃药""别去医院"等贬低正规医疗的表述。
8. 不要使用"颈肩腰腿,哪儿酸哪儿胀"这类像中医问诊的话术,改为"肩膀酸、腰背紧,想松快一下"等消费者自我感受的口语化表达。"""
# 判定健康/养生行业的关键词(命中其一即注入 HEALTH_INDUSTRY_REDLINES)
HEALTH_INDUSTRY_KEYWORDS: tuple[str, ...] = (
"养生",
"健康",
"理疗",
"推拿",
"按摩",
"艾灸",
"针灸",
"正骨",
"康复",
"中医",
"经络",
"穴位",
"肩颈",
"腰腿",
"筋骨",
"调理",
"保健",
"SPA",
"spa",
"养生馆",
"按摩店",
"御众堂",
"月子",
"产后修复",
"产康",
"足疗",
"足浴",
"盲人按摩",
)
# 负向提示(注入 storyboard / 视频生成负面词)
NEGATIVE_RULES = """【反套路化要求】
禁止使用"家人们谁懂啊""绝绝子""宝子们""家人们""太绝了""yyds"等烂大街网络词;
禁止使用"很近"等错别字,应使用"最近";
禁止固定模板化开头;语言要像真人朋友之间的分享,自然、具体、有信息量。"""
禁止"很近"等错别字,应使用"最近";
禁止固定模板化开头;语言要像真人朋友之间的分享,自然、具体、有信息量。
禁止医疗诊疗类词汇(治疗/治愈/根治/疗效/特效/药到病除/一用就好/对症/偏方/秘方/一搭手就知道/帮你看看等)。
禁止效果承诺(包治/根治/立刻见效/永不复发/一用就好等)。"""
# 输出禁用套路词(测试/reviewer/worker 三处共享)
# 注:广告法绝对化用语(如"最""第一""100%")在 worker 侧 _quick_compliance_blacklist_check 单独做本地替换,
@@ -113,7 +161,9 @@ _STORYBOARD_SYSTEM = (
<clip index="1">
<time_range>0-3秒</time_range>
<voiceover>这一镜的口播台词</voiceover>
<visual>具体、有画面感的镜头描述(主体/动作/镜头运动/景别/光线)</visual>
<shot>景别、机位高度、焦段、光圈、运镜(6项摄影参数,简短,如『中近景平视,50mm f/1.8,缓慢推镜』)</shot>
<visual>画面主体、场景、光线、氛围(只写画面内容,不含景别/运镜参数,如『暖光木色门店,店员微笑递茶,背景虚化』)</visual>
<action_details>人物动作、表情、物品操作细节(真人出镜镜头必填,纯产品/空镜填空线『-』)</action_details>
<reference_image_index>0</reference_image_index>
</clip>
</clips>
@@ -124,9 +174,15 @@ _STORYBOARD_SYSTEM = (
+ """</negative>
</script>
"""
+ GLOBAL_CONSTRAINTS
+ """
{industry_redlines}
## 写作要求
1. 口播台词:像真人面对镜头说话,短句、口语化、有停顿有情绪,开头 3 秒给出钩子;不要书面腔,不要机械报参数。
2. 画面描述:写清"观众会看到什么",有动作、有镜头运动、有景别和光线,具体可拍;不堆砌形容词,不写无法实现的画面。
2. <shot> 只写6项摄影参数(景别/机位高度/焦段/光圈/运镜),简短不超过20字;<visual> 写观众会看到的画面主体/场景/光线/氛围;<action_details> 写人物动作/表情/物品操作细节(真人出镜必填)。三字段各司其职,不要混写。
3. copy_display_markdown:直接展示给最终用户的文案,用 Markdown 写成自然、流畅、有感染力的成片文案,可用小标题与短句组织;不要做字段列表,不要出现"镜头一/台词:"这类制作说明。
4. 内容必须来自图片观察与用户给出的信息,不编造卖点、不夸大、不使用绝对化用语和虚假承诺。
5. reference_image_index 填本镜参考图片序号(从 0 开始),没有合适参考图填 -1。
@@ -167,19 +223,25 @@ _STORYBOARD_EXAMPLE = """<script>
<clip index="1">
<time_range>0-4秒</time_range>
<voiceover>生完娃,是不是连照镜子的勇气都没了?</voiceover>
<visual>中近景,暖光下一位妈妈略显疲惫地看向镜中,镜头缓缓推近</visual>
<shot>中近景平视,50mm f/2.0,缓慢推镜</shot>
<visual>暖光浴室镜前,妈妈略显疲惫地看向镜中自己,镜灯打在侧脸</visual>
<action_details>妈妈手扶洗手台,微微低头再抬眼看镜,眼眶微红</action_details>
<reference_image_index>0</reference_image_index>
</clip>
<clip index="2">
<time_range>4-10秒</time_range>
<voiceover>推开门,暖光和一杯热茶先接住了你。</voiceover>
<visual>中景,门店前台暖光木色装修,店员微笑递上茶水,镜头平移扫过环境</visual>
<shot>中景平视,35mm f/2.8,镜头缓慢平移</shot>
<visual>门店前台暖光木色装修,茶水冒热气,背景柔和虚化</visual>
<action_details>店员微笑双手递上茶杯,妈妈伸手接过,指尖轻触杯沿</action_details>
<reference_image_index>1</reference_image_index>
</clip>
<clip index="3">
<time_range>10-15秒</time_range>
<voiceover>来御众堂躺一会儿,整个人都松了。</voiceover>
<visual>特写,妈妈闭眼放松做护理,暖光打在侧脸,最后镜头拉远露出品牌LOGO</visual>
<shot>近景缓慢拉远至中景,85mm f/1.8,匀速后拉</shot>
<visual>护理床暖光打在妈妈侧脸,最后画面露出御众堂品牌LOGO</visual>
<action_details>妈妈闭眼放松,嘴角微微上扬,肩膀缓缓下沉</action_details>
<reference_image_index>2</reference_image_index>
</clip>
</clips>
@@ -190,9 +252,11 @@ _STORYBOARD_EXAMPLE = """<script>
# ── 模板3:文案审核(合规/质量门禁)───────────────────────────────────
_REVIEW_SYSTEM = """你是一名短视频广告合规审核与文案优化专家。请审核下面这段口播文案:
1) 广告法与平台合规(绝对化用语、虚假承诺、医疗功效宣称、导流违规、套路烂梗词);
2) 口播是否自然、口语化、无书面腔;
3) 是否有明显错别字(例如把"最近"写成"很近")。
1) 广告法与平台合规(绝对化用语、虚假承诺、导流违规、套路烂梗词);
2) **医疗/养生/健康红线(重点审查)**:是否出现诊疗暗示("帮你看看""一搭手就知道""老师诊断""检查"等)、疗效/治愈承诺("治好""根治""见效""一用就好""药到病除""特效""克星""永不复发"等)、医疗术语("疗程""对症""膏药""针灸""中药""偏方""秘方""诊疗""治疗""就诊"等)、冒充医生/专家/老师做诊断、贬低正规医疗("别贴膏药""别吃药""别去医院"等);
3) 养生/按摩/理疗/推拿/保健类文案是否用了纯感受类表达(放松/舒缓/舒服/松快/解乏/轻松),而不是"治病/根治/疗效"类表达;
4) 口播是否自然、口语化、无书面腔;
5) 是否有明显错别字(例如把"最近"写成"很近")。
只输出 XML,结构:
<review>
@@ -229,18 +293,18 @@ DEFAULT_TEMPLATES: list[dict] = [
"is_active": True,
},
{
"name": "编导级分镜 v3.1",
"name": "编导级分镜 v3.2",
"prompt_type": "storyboard",
"version": 4,
"version": 5,
"system_prompt": _STORYBOARD_SYSTEM,
"user_prompt_template": _STORYBOARD_USER,
"example_output": _STORYBOARD_EXAMPLE,
"is_active": True,
},
{
"name": "文案审核 v2",
"name": "文案审核 v3",
"prompt_type": "review",
"version": 2,
"version": 3,
"system_prompt": _REVIEW_SYSTEM,
"user_prompt_template": _REVIEW_USER,
"example_output": _REVIEW_EXAMPLE,
+52 -1
View File
@@ -39,6 +39,44 @@ _EXAGGERATION_PATTERNS = [
r"一喷(就|全|100)",
]
# 本地规则:医疗/养生/诊疗红线(#2312:出片前最后一道本地兜底,命中即 error)
# 注意:这些词/句式出现在养生/理疗/按摩/保健/康复类文案中几乎必然违规,直接挡
# 本地规则做快速兜底,LLM 审核是主防线(review prompt v3 已加强医疗维度,语义判断更准)
_MEDICAL_REDLINE_PATTERNS = [
# 疗效/治愈/根治/效果承诺
(r"包治(百病|各种|颈肩|腰腿|风湿|颈椎|腰椎)?", "出现诊疗承诺:'{hit}',暗示包治违反广告法与医疗合规"),
(r"根[治除](?!本)", "出现根治/根除表述:'{hit}',非医疗机构不得承诺根治"),
(r"(永不复发|药到病除)", "出现疗效承诺:'{hit}'"),
(
r"一(?:用|贴|抹|喷|吃|服|针|喝)[^,。!?]{0,3}(?:就|即|立)(?:好|见效|灵|愈|止痛)",
"出现'一X就好'类即时疗效承诺:'{hit}'",
),
(r"(?:立刻|马上|立即|瞬间|当天|一次就)(?:见效|止痛|不痛|康复|止?痛|治好)", "出现即时效果承诺:'{hit}'"),
(r"特[效药贴针酒]|神药|神贴|神针|妙药", "出现神/特效类违规表述:'{hit}'"),
# 诊断暗示(工作人员"搭手就知道""帮你看看哪有问题")
(r"一搭手就知道", "出现诊断暗示:'{hit}',非医疗机构按摩师/老师不能做诊断"),
(
r"(?:老师|师傅|大夫|医生|专家|医师)(?:帮你|给你|为你|一)(?:看看|检查|诊断|判断|瞧瞧|搭手)",
"出现诊断暗示:'{hit}',工作人员不能被描述为做诊断",
),
(r"(?:帮你|给你|为你)(?:看看(?:问题|毛病|病|哪儿|哪)?|检查(?:一下)?|诊断)", "出现诊断暗示:'{hit}'"),
# 贬低正规医疗/引导弃医
(
r"别(?:急着|忙着|光|总|一直)?(?:贴膏药|吃药|上医院|去医院|看医生|打针|拖|扛|忍(?:着|着不)?|硬扛)|不要(?:急着|忙着)?(?:贴膏药|吃药|上医院|去医院|看医生|打针)",
"出现贬低/规避正规医疗的引导:'{hit}'",
),
# 医疗术语(按摩/养生门店正常营销不应出现)
(
r"(?:疗[程效]|对症(?:下药)?|诊疗|就诊|就医|医嘱|病(?:灶|情|症)|处[方箋])",
"出现医疗术语:'{hit}',非医疗机构文案应使用感受类表达",
),
(
r"哪儿酸哪儿胀|哪(?:儿|里)(?:疼|酸|胀|痛|不舒服|不适)[^,。!?]{0,8}(?:就知道|一看就知|老师|师傅|大夫|把下脉)",
"出现中医问诊式诊断话术:'{hit}',应改为顾客自我感受表达",
),
(r"(?:偏方|秘方|宫廷秘方|祖传秘方)", "出现偏方/秘方类违规表述:'{hit}'"),
]
# 本地规则:套路烂梗/明显错别字(与 prompts.COMPLIANCE_BLACKLIST 同步)
_VIOLATION_PATTERNS = [re.escape(p) for p in COMPLIANCE_BLACKLIST] + [
r"最(好|强|牛|便宜|美|棒)", # 广告法极限词(最X)
@@ -123,7 +161,7 @@ class Reviewer:
messages,
temperature=0.2,
max_tokens=1024,
timeout=25,
timeout=15, # #2307: 25s过长,超时降级放行
)
if not raw:
return None
@@ -173,6 +211,19 @@ class Reviewer:
text="出现违规/套路词或错别字:" + self._hit(text, pattern),
)
)
# #2312: 医疗/养生/诊疗红线扫描(命中即 error)
for pattern, msg_tpl in _MEDICAL_REDLINE_PATTERNS:
m = re.search(pattern, text)
if m:
hit = m.group(0)
issues.append(
ReviewIssue(
dimension="医疗合规",
severity="error",
location="voiceover_script",
text=msg_tpl.format(hit=hit),
)
)
return issues
@staticmethod
+32 -3
View File
@@ -159,10 +159,39 @@ VIRAL_VIDEO_MODEL_CONFIG: dict[str, dict] = {
def get_viral_video_model_config(model_key: str | None) -> dict:
"""获取模型配置,未知 key 回落到默认 seedance-2.5。"""
key = (model_key or "").strip().lower()
if key and key in VIRAL_VIDEO_MODEL_CONFIG:
"""获取模型配置,未知 key 回落到默认 seedance-2.5。
#2312 E2E问题4: 支持多种别名/变体查找,防止前端或内部传model_id/大小写/横杠变体
# (如 wan3.0-video / Wan-3.0 / wan_3_0 等)误回落 seedance-2.5。
"""
raw = (model_key or "").strip()
if not raw:
return VIRAL_VIDEO_MODEL_CONFIG["seedance-2.5"]
key = raw.lower()
if key in VIRAL_VIDEO_MODEL_CONFIG:
return VIRAL_VIDEO_MODEL_CONFIG[key]
# 别名归一化:横杠/下划线/点/空格统一去掉,做模糊匹配
_norm = key.replace("-", "").replace("_", "").replace(".", "").replace(" ", "")
# 同时支持 model_id 反向查找(防止传 wan3.0-video 这类 model_id 串)
for _k, _cfg in VIRAL_VIDEO_MODEL_CONFIG.items():
_k_norm = _k.replace("-", "").replace("_", "").replace(".", "").replace(" ", "")
if _k_norm == _norm:
return _cfg
_mid = str(_cfg.get("model_id", "")).lower().replace("-", "").replace("_", "").replace(".", "")
if _mid and _mid == _norm:
return _cfg
# wan 系列兜底(任何包含 wan 的未知key归到 wan-3.0,而不是 seedance)
if "wan" in key:
logger = __import__("logging").getLogger(__name__)
logger.warning("[points_rules] 未知wan模型key=%r,归一化为wan-3.0", model_key)
return VIRAL_VIDEO_MODEL_CONFIG["wan-3.0"]
# seedance 系列同理
if "seedance" in key and "2.0" in key and "fast" in key:
return VIRAL_VIDEO_MODEL_CONFIG["seedance-2.0-fast"]
if "seedance" in key and "mini" in key:
return VIRAL_VIDEO_MODEL_CONFIG["seedance-2.0-mini"]
if "seedance" in key and "2.0" in key:
return VIRAL_VIDEO_MODEL_CONFIG["seedance-2.0"]
return VIRAL_VIDEO_MODEL_CONFIG["seedance-2.5"]
+14 -1
View File
@@ -21,7 +21,8 @@ class PresetVoice:
description: 音色描述
gender: 性别(male/female)
language: 语言代码(如 zh-CN)
preview_url: 预览音频 URL(可选)
preview_url: 预览音频 URL(可选,前端试听用,短文本)
sample_audio_url: 音色样本音频 URL(#2311,reference_audio用,8秒固定文案,部署预生成)
tags: 标签列表
"""
@@ -31,6 +32,9 @@ class PresetVoice:
gender: str
language: str = "zh-CN"
preview_url: str = ""
sample_audio_url: str = (
"" # #2311: 用于reference_audio的8秒静态音色样本公网URL(部署时由seed_preset_voice_samples.py预生成)
)
tags: list[str] | None = None
def to_dict(self) -> dict:
@@ -42,6 +46,7 @@ class PresetVoice:
"gender": self.gender,
"language": self.language,
"preview_url": self.preview_url,
"sample_audio_url": self.sample_audio_url,
"tags": self.tags or [],
}
@@ -56,6 +61,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="female",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/a8fb29a2-7d44-9f16-9dab-f17fa806cf3d.mp3?Expires=1785716123&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=c74kFX%2BcDpmuBny2dPBkvak01oY%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longxiaochun_v3_sample.mp3",
tags=["知性", "女声", "助手"],
),
PresetVoice(
@@ -65,6 +71,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="female",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/d065a6da-de0d-9ad2-b64a-00aaf9aa3dea.mp3?Expires=1785716203&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=9hRh7xbmS8eDdiBDDFUatvad1jg%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longxiaoxia_v3_sample.mp3",
tags=["沉稳", "女声", "播报"],
),
PresetVoice(
@@ -74,6 +81,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="male",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/b139d925-4669-979d-89db-2dc16945b577.mp3?Expires=1785730686&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=X2p%2FA7Dm%2BTNfeFilW%2FQO9VoYPLQ%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longsanshu_v3_sample.mp3",
tags=["沉稳", "男声", "有声书"],
),
PresetVoice(
@@ -83,6 +91,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="female",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/1ea86db3-4dc9-927e-9b76-c83d89f6788c.mp3?Expires=1785716207&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=Vg0ckgSgPzgNQ%2FNdeJzrE%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longyue_v3_sample.mp3",
tags=["温暖", "女声", "广告"],
),
PresetVoice(
@@ -92,6 +101,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="male",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/6b47a5ce-ae21-995a-ac8b-5e55ed04ec45.mp3?Expires=1785716209&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=zm6WGmthpwTjf8PzgNQ%2FNdeJzrE%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longshu_v3_sample.mp3",
tags=["沉稳", "男声", "教育"],
),
PresetVoice(
@@ -101,6 +111,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="female",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/13bf9f6a-72a9-949c-a896-ec3e6b46338b.mp3?Expires=1785730692&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=pxrP2rYmOumc4dw9TD8TZf%2B27gk%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longyingjing_v3_sample.mp3",
tags=["冷静", "女声", "纪录片"],
),
PresetVoice(
@@ -110,6 +121,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="male",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/5e69f0c1-45fa-92ca-ae5c-38272f231efb.mp3?Expires=1785730692&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=uREIiIUFrN7CpJ7avXKWCo04A6I%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longshuo_v3_sample.mp3",
tags=["干练", "男声", "科技"],
),
PresetVoice(
@@ -119,6 +131,7 @@ PRESET_VOICES: list[PresetVoice] = [
gender="female",
language="zh-CN",
preview_url="http://dashscope-result-bj.oss-cn-beijing.aliyuncs.com/prod/cosyvoice-v3-flash/20260802/1320180660510733/a38e4c05-25bf-9640-92d6-0b4a14555cdb.mp3?Expires=1785716215&OSSAccessKeyId=LTAI5tGzqbGcEmE58b221XQy&Signature=WtbsqqfR4A6OhpL%2B%2Fe0lh7YBMWM%3D",
sample_audio_url="https://xiaoxia-autocut.oss-cn-hangzhou.aliyuncs.com/static/voice-samples/preset/longtian_v3_sample.mp3",
tags=["活泼", "女声", "短视频"],
),
]
+2
View File
@@ -26,6 +26,7 @@ class StoragePort(ABC):
file_or_path: str | Path | object,
storage_key: str,
content_type: str = "application/octet-stream",
extra_headers: dict | None = None,
) -> str:
"""上传文件到存储,返回公开 URL。
@@ -33,6 +34,7 @@ class StoragePort(ABC):
file_or_path: 本地文件路径(str/Path)或类文件对象
storage_key: 目标存储键
content_type: MIME 类型
extra_headers: 额外请求头(如 x-oss-object-acl)
Returns:
公开访问 URL
+35 -14
View File
@@ -286,6 +286,11 @@ class DoubaoClient:
if not self.is_available:
return None
# #2304 追加修复:每次调用必须重置 finish_reason 标记,避免跨调用泄漏导致误判截断(Bug:
# attempt1 收到 finish=length 后 last_finish_reason='length',attempt2 开头 chunk 处理后
# 立即读到这个陈旧值误判截断、丢弃好内容)。
self.last_finish_reason = ""
url = f"{self.base_url}/chat/completions"
headers = {
"Authorization": f"Bearer {self.api_key}",
@@ -302,6 +307,11 @@ class DoubaoClient:
if self.extra_params:
payload.update(self.extra_params)
if kwargs:
# #2303 追加修复:豆包 ark 端点不认 enable_thinking 布尔参数,
# 必须用 thinking={"type":"disabled"} 才会真正关闭 reasoning(A/B实测TTFT从100s+→2s)。
# 调用方传 enable_thinking=False 时,统一翻译为标准字段。
if kwargs.pop("enable_thinking", None) is False:
payload["thinking"] = {"type": "disabled"}
payload.update(kwargs)
last_error: Optional[Exception] = None
@@ -405,10 +415,21 @@ class DoubaoClient:
if self.extra_params:
payload.update(self.extra_params)
if kwargs:
# 同同步路径:enable_thinking=False 翻译为 thinking={"type":"disabled"}
_thinking_disabled = kwargs.pop("enable_thinking", None) is False
payload.update(kwargs)
if _thinking_disabled:
payload["thinking"] = {"type": "disabled"}
# 每次调用 reset finish_reason 标记(同 chat_completion,避免跨 attempt 泄漏误判截断)
self.last_finish_reason = ""
_t0 = time.time()
for attempt in range(self.max_retries + 1):
# #2303 追加修复:流式路径 SDK 内重试对 read timeout 翻倍耗时(单 attempt 外层120s +
# SDK 重试120s*2 ≈ 360-420s),把两个 attempt 总预算吃光。外层 _step_script_generation
# 已实现 fast→fast→pro 三级attempt兜底,这里禁 SDK 内重试,超时/错误直接抛给外层。
_stream_max_retries = 0
for attempt in range(_stream_max_retries + 1):
try:
_req_timeout = httpx.Timeout(connect=10.0, read=120.0, write=30.0, pool=10.0)
if timeout:
@@ -439,6 +460,8 @@ class DoubaoClient:
continue
delta = choices[0].get("delta") or {}
content_piece = delta.get("content") or ""
# reasoning_content 由豆包 seed-2-1-pro 思考模式返回,
# 对模板填充式生成无用(会占满 deadline),调用方可传 enable_thinking=False 关闭
if content_piece:
yield content_piece
finish_reason = choices[0].get("finish_reason")
@@ -453,19 +476,13 @@ class DoubaoClient:
)
return
except Exception as e:
if attempt < self.max_retries:
wait = 0.5 * (2**attempt)
logger.warning(
"豆包流式API失败,%.1fs后重试 (%d/%d, elapsed=%.1fs): %s",
wait,
attempt + 1,
self.max_retries + 1,
time.time() - _t0,
e,
)
time.sleep(wait)
continue
logger.error("豆包流式API最终失败: elapsed=%.1fs err=%s", time.time() - _t0, e)
# 流式路径禁 SDK 内重试(外层 attempt 机制兜底,避免单 attempt 被 SDK 重试拖到 300s+)
err_msg = str(e).lower()
is_timeout = any(k in err_msg for k in ("timeout", "timed out", "deadline", "超时", "read timeout"))
if is_timeout:
logger.warning("[doubao] 流式 read timeout elapsed=%.1fs,交外层attempt处理", time.time() - _t0)
else:
logger.error("豆包流式API失败: elapsed=%.1fs err=%s", time.time() - _t0, e)
return
def vision_completion(
@@ -536,8 +553,12 @@ class DoubaoClient:
if self.extra_params:
payload.update(self.extra_params)
if kwargs:
if kwargs.pop("enable_thinking", None) is False:
payload["thinking"] = {"type": "disabled"}
payload.update(kwargs)
self.last_finish_reason = "" # reset,避免跨调用泄漏
req_timeout = self._resolve_timeout(timeout or self.timeout)
last_error: Optional[Exception] = None
_t0 = time.time()
+1 -1
View File
@@ -180,7 +180,7 @@ class DashScopeClient:
"audio": bool(generate_audio),
}
if ratio and ratio != "adaptive":
params["aspect_ratio"] = ratio
params["ratio"] = ratio
payload: dict[str, Any] = {
"model": model,
+12 -3
View File
@@ -183,22 +183,26 @@ class SharedStorageService(StoragePort):
file_or_path: str | Path | object,
storage_key: str,
content_type: str = "application/octet-stream",
extra_headers: dict | None = None,
) -> str:
if self.bucket is None:
raise RuntimeError("OSS storage is not configured")
try:
headers: dict = {"Content-Type": content_type}
if extra_headers:
headers.update(extra_headers)
if isinstance(file_or_path, (str, Path)):
self.bucket.put_object_from_file(
storage_key,
str(file_or_path),
headers={"Content-Type": content_type},
headers=headers,
)
else:
file_or_path.seek(0)
self.bucket.put_object(
storage_key,
file_or_path,
headers={"Content-Type": content_type},
headers=headers,
)
return f"{self.public_url}/{storage_key}"
except Exception as e:
@@ -208,6 +212,7 @@ class SharedStorageService(StoragePort):
self,
local_path: str | Path,
storage_key: str,
extra_headers: dict | None = None,
) -> Optional[str]:
local_path = Path(local_path)
if not local_path.exists():
@@ -230,6 +235,9 @@ class SharedStorageService(StoragePort):
use_multipart = False
file_size = 0
headers: dict = {}
if extra_headers:
headers.update(extra_headers)
if use_multipart:
logger.info(
"大文件分片上传(internal): key=%s size=%.1fMB part=%dMB threads=%d",
@@ -245,9 +253,10 @@ class SharedStorageService(StoragePort):
multipart_threshold=OSS_MULTIPART_THRESHOLD,
part_size=OSS_PART_SIZE,
num_threads=OSS_MULTIPART_NUM_THREADS,
headers=headers or None,
)
else:
self.bucket.put_object_from_file(storage_key, str(local_path))
self.bucket.put_object_from_file(storage_key, str(local_path), headers=headers or None)
result["url"] = f"{self.public_url}/{storage_key}"
except Exception as e:
result["error"] = e
+204
View File
@@ -0,0 +1,204 @@
#!/usr/bin/env python3
"""#2311 部署脚本:为所有预置音色生成 8 秒静态音色样本并上传 OSS。
用途:
部署 release 时执行,为 8 个 CosyVoice 预置音色各合成一段 8s 固定样本 mp3,
上传到 OSS 永久路径 static/voice-samples/preset/{voice_id}_sample.mp3(公共读),
并回填 packages/domain/preset_voices.py 中 PresetVoice.sample_audio_url 字段。
出片流程通过 PresetVoice.sample_audio_url 直接读取,零 TTS、零冷启动。
用法(在 API/Worker 容器内执行):
cd /path/to/project && python scripts/seed_preset_voice_samples.py
可选参数:
--dry-run 只打印要做的操作,不实际上传/回填
--force 强制重新生成(即使 OSS 已有文件也覆盖)
--no-public 上传后不设公共读 ACL(默认公共读)
"""
from __future__ import annotations
import argparse
import logging
import os
import re
import sys
import tempfile
import urllib.request
from pathlib import Path
import oss2 # type: ignore
logging.basicConfig(level=logging.INFO, format="%(asctime)s [%(levelname)s] %(message)s")
logger = logging.getLogger(__name__)
# 固定 8 秒样本文案(覆盖中文四声、开合齐撮、常见声母韵母)
VOICE_SAMPLE_SCRIPT_ZH = "你好,很高兴认识你。今天天气真不错,我们一起来看看吧。"
VOICE_SAMPLE_SCRIPT_EN = "Hi there, nice to meet you. The weather is great today, let's take a look together."
# OSS 路径前缀
OSS_PREFIX = "static/voice-samples/preset/"
def _project_root() -> Path:
"""定位项目根目录(兼容容器/软链/不同 cwd 场景)。"""
script_dir = Path(__file__).resolve().parent
candidate = script_dir.parent
if (candidate / "packages" / "domain" / "preset_voices.py").exists():
return candidate
cur = Path.cwd().resolve()
for _ in range(8):
if (cur / "packages" / "domain" / "preset_voices.py").exists():
return cur
if cur.parent == cur:
break
cur = cur.parent
raise RuntimeError("无法定位项目根目录,请在项目根目录或 scripts/ 下执行本脚本")
PROJECT_ROOT = _project_root()
PRESET_VOICES_PY = PROJECT_ROOT / "packages" / "domain" / "preset_voices.py"
sys.path.insert(0, str(PROJECT_ROOT))
def _get_cosyvoice_service():
from packages.application.cosyvoice_service import CosyVoiceService
return CosyVoiceService()
def _get_oss_bucket():
endpoint = os.environ.get("OSS_ENDPOINT", "")
ak = os.environ.get("OSS_ACCESS_KEY_ID", "")
sk = os.environ.get("OSS_ACCESS_KEY_SECRET", "")
bucket_name = os.environ.get("OSS_BUCKET_NAME", "")
if not (endpoint and ak and sk and bucket_name):
try:
from packages.shared.config import get_shared_settings
s = get_shared_settings()
endpoint = endpoint or getattr(s, "oss_endpoint", "")
ak = ak or getattr(s, "oss_access_key_id", "")
sk = sk or getattr(s, "oss_access_key_secret", "")
bucket_name = bucket_name or getattr(s, "oss_bucket_name", "")
except Exception as e:
logger.warning("从settings读取OSS配置失败: %s", e)
if not (endpoint and ak and sk and bucket_name):
logger.error("缺少 OSS 凭证,请设置 OSS_ENDPOINT/OSS_ACCESS_KEY_ID/OSS_ACCESS_KEY_SECRET/OSS_BUCKET_NAME")
sys.exit(3)
ep_host = endpoint.replace("https://", "").replace("http://", "").rstrip("/")
auth = oss2.Auth(ak, sk)
bucket = oss2.Bucket(auth, f"https://{ep_host}", bucket_name)
public_base = f"https://{bucket_name}.{ep_host}"
return bucket, public_base
def main() -> int:
ap = argparse.ArgumentParser(description="#2311 预生成预置音色静态样本")
ap.add_argument("--dry-run", action="store_true")
ap.add_argument("--force", action="store_true")
ap.add_argument("--no-public", action="store_true")
args = ap.parse_args()
from packages.domain.preset_voices import PRESET_VOICES
logger.info("项目根目录: %s", PROJECT_ROOT)
logger.info("预置音色总数: %d", len(PRESET_VOICES))
cosy = _get_cosyvoice_service()
bucket, public_base = _get_oss_bucket()
voice_to_url: dict[str, str] = {}
tmpdir = Path(tempfile.mkdtemp(prefix="preset_voice_sample_"))
for voice in PRESET_VOICES:
voice_id = voice.voice_id
lang = voice.language or "zh-CN"
script = VOICE_SAMPLE_SCRIPT_EN if lang.lower().startswith("en") else VOICE_SAMPLE_SCRIPT_ZH
oss_key = f"{OSS_PREFIX}{voice_id}_sample.mp3"
public_url = f"{public_base}/{oss_key}"
exists = False
try:
exists = bucket.object_exists(oss_key)
except Exception as e:
logger.warning("[%s] 检查OSS存在失败: %s", voice_id, e)
if exists and not args.force:
logger.info("[%s] OSS已有样本,跳过: %s", voice_id, public_url)
voice_to_url[voice_id] = public_url
continue
if args.dry_run:
logger.info("[DRY][%s] 将合成「%s...」→ oss://%s", voice_id, script[:20], oss_key)
voice_to_url[voice_id] = public_url
continue
logger.info("[%s] 合成中...", voice_id)
try:
result = cosy.synthesize_speech(text=script, voice_id=voice_id, format="mp3")
except Exception as e:
logger.error("[%s] TTS合成失败: %s", voice_id, e, exc_info=True)
continue
local_mp3 = tmpdir / f"{voice_id}_sample.mp3"
try:
urllib.request.urlretrieve(result.audio_url, str(local_mp3))
size = local_mp3.stat().st_size
if size < 4096:
logger.error("[%s] 文件太小(%d),跳过", voice_id, size)
continue
logger.info("[%s] 下载完成: %d bytes", voice_id, size)
except Exception as e:
logger.error("[%s] 下载合成音频失败: %s", voice_id, e, exc_info=True)
continue
logger.info("[%s] 上传 oss://%s", voice_id, oss_key)
try:
headers = {"Content-Type": "audio/mpeg"}
bucket.put_object_from_file(oss_key, str(local_mp3), headers=headers)
if not args.no_public:
bucket.put_object_acl(oss_key, oss2.OBJECT_ACL_PUBLIC_READ)
logger.info("[%s] 上传完成 → %s", voice_id, public_url)
voice_to_url[voice_id] = public_url
except Exception as e:
logger.error("[%s] OSS上传失败: %s", voice_id, e, exc_info=True)
continue
if not voice_to_url:
logger.warning("没有成功生成任何样本")
return 1
if args.dry_run:
logger.info("[DRY] 将回填 %d 个 sample_audio_url 到 %s", len(voice_to_url), PRESET_VOICES_PY)
for vid, url in voice_to_url.items():
logger.info(" %s → %s", vid, url)
return 0
text = PRESET_VOICES_PY.read_text(encoding="utf-8")
orig = text
for voice_id, url in voice_to_url.items():
block_pat = re.compile(
r'(PresetVoice\([^)]*?voice_id="' + re.escape(voice_id) + r'"[^)]*?sample_audio_url=)"[^"]*"',
re.DOTALL,
)
new_text, n = block_pat.subn(rf'\1"{url}"', text, count=1)
if n == 0:
logger.warning("[%s] 回填sample_audio_url失败(正则未匹配),请手动添加", voice_id)
continue
text = new_text
if text != orig:
PRESET_VOICES_PY.write_text(text, encoding="utf-8")
logger.info("✅ 已回填 %d 条 sample_audio_url 到 %s", len(voice_to_url), PRESET_VOICES_PY)
logger.info("下一步:git diff packages/domain/preset_voices.py 确认后 commit & push")
else:
logger.info("preset_voices.py 未变化(可能全部已回填过)")
return 0
if __name__ == "__main__":
sys.exit(main())
+81
View File
@@ -486,6 +486,87 @@ class TestLipsyncServiceUnit:
assert call_kwargs.kwargs["audio_url"] == "https://example.com/direct-audio.mp3"
assert job.audio_url == "https://example.com/direct-audio.mp3"
def test_create_job_presynth_backfills_script_text(self, mock_mediakit, mock_cosyvoice):
"""预合成模式 script_text 为空时,从 sentence_timings 拼接兜底.
背景:前端 #1875 起预合成 payload 不带 script_text,导致 job.script_text
落库为空,Ditto 任务 script_len=0、情绪分析被跳过。
"""
from app.services.lipsync_service import LipsyncService
mock_db = MagicMock()
svc = LipsyncService(
mock_db,
client=mock_mediakit,
cosyvoice_service=mock_cosyvoice,
voice_clone_repo=MagicMock(),
)
svc.settings.use_gpu_lipsync = False
timings = [
{"index": 0, "text": "大家好,", "start_time": 0.0, "end_time": 1.0},
{"index": 1, "text": "欢迎来到直播间。", "start_time": 1.0, "end_time": 2.5},
]
job = svc.create_job(
user_id="user-1",
video_url="https://example.com/video.mp4",
audio_url="https://example.com/audio.mp3",
audio_duration=2.5,
sentence_timings=timings,
script_text="", # 前端预合成 payload 不带文案
)
assert job.script_text == "大家好,欢迎来到直播间。"
def test_create_job_presynth_keeps_supplied_script_text(self, mock_mediakit, mock_cosyvoice):
"""预合成模式显式传了 script_text 时,保留原文不做拼接."""
from app.services.lipsync_service import LipsyncService
mock_db = MagicMock()
svc = LipsyncService(
mock_db,
client=mock_mediakit,
cosyvoice_service=mock_cosyvoice,
voice_clone_repo=MagicMock(),
)
svc.settings.use_gpu_lipsync = False
timings = [
{"index": 0, "text": "分句一", "start_time": 0.0, "end_time": 1.0},
]
job = svc.create_job(
user_id="user-1",
video_url="https://example.com/video.mp4",
audio_url="https://example.com/audio.mp3",
audio_duration=1.0,
sentence_timings=timings,
script_text="原始文案,含标点。",
)
assert job.script_text == "原始文案,含标点。"
def test_create_job_presynth_empty_timings_falls_back_to_direct(self, mock_mediakit, mock_cosyvoice):
"""sentence_timings 空列表时 is_pre_synth=False,退化为直接音频模式(语义固化)."""
from app.services.lipsync_service import LipsyncService
mock_db = MagicMock()
svc = LipsyncService(
mock_db,
client=mock_mediakit,
cosyvoice_service=mock_cosyvoice,
voice_clone_repo=MagicMock(),
)
svc.settings.use_gpu_lipsync = False
job = svc.create_job(
user_id="user-1",
video_url="https://example.com/video.mp4",
audio_url="https://example.com/audio.mp3",
sentence_timings=[],
script_text="",
)
# 直接音频模式:无 timings 可拼,script_text 保持空(不报错)
assert job.script_text == ""
mock_mediakit.submit_lipsync.assert_called_once()
class TestErrorHandling:
"""v3: 音色解析与错误码在 service 层处理,路由层做 HTTP 状态码映射."""
@@ -0,0 +1,165 @@
"""#2308 parser字段映射单测:
1. 新schema XML(<shot>+<visual>+<action_details>)字段正确映射
2. 旧schema XML(<visual>混写)能拆分出cam/visual/action
3. markdown中文分镜字段正确提取
"""
from __future__ import annotations
import sys
from unittest.mock import MagicMock
import pytest
@pytest.fixture
def mock_job():
job = MagicMock()
job.duration = 15
job.video_ratio = "9:16"
job.marketing_purpose = "品牌推广"
job.image_analysis = {"images": []}
job.images = []
job.user_copy_text = ""
job.fusion_level = "ai_polish"
return job
def _import_wv(monkeypatch):
for mod in ["worker_app.celery_app", "worker_app.db"]:
monkeypatch.setitem(sys.modules, mod, MagicMock())
import celery
monkeypatch.setattr(celery, "shared_task", lambda **kw: (lambda f: f))
from worker_app.tasks import viral_video as wv
return wv
# === 1. 新schema(v3.1+):独立 <shot>/<visual>/<action_details> ===
NEW_SCHEMA_XML = """<script>
<copy_display_markdown><![CDATA[来御众堂放松一下]]></copy_display_markdown>
<clips>
<clip index="1">
<time_range>0-4秒</time_range>
<voiceover>生完娃,是不是连照镜子都没勇气了?</voiceover>
<shot>中近景平视,50mm f/2.0,缓慢推镜</shot>
<visual>暖光浴室镜前,妈妈略显疲惫地看向镜中自己,镜灯打在侧脸</visual>
<action_details>妈妈手扶洗手台,微微低头再抬眼看镜,眼眶微红</action_details>
<reference_image_index>0</reference_image_index>
</clip>
<clip index="2">
<time_range>4-10秒</time_range>
<voiceover>推开门,暖光和一杯热茶先接住了你。</voiceover>
<shot>中景平视,35mm f/2.8,缓慢平移</shot>
<visual>门店前台暖光木色装修,茶水冒热气,背景柔和虚化</visual>
<action_details>店员微笑双手递上茶杯,妈妈伸手接过,指尖轻触杯沿</action_details>
<reference_image_index>1</reference_image_index>
</clip>
</clips>
<voiceover_script>生完娃,是不是连照镜子都没勇气了?推开门,暖光和一杯热茶先接住了你。</voiceover_script>
<theme>产后妈妈走进御众堂</theme>
</script>"""
def test_new_schema_xml_field_mapping(monkeypatch, mock_job):
wv = _import_wv(monkeypatch)
r = wv._parse_script(NEW_SCHEMA_XML, mock_job)
assert r is not None
assert len(r["shots"]) == 2
s0 = r["shots"][0]
# shot_type 应是纯摄影参数
assert "缓慢推镜" in s0["shot_type_angle_movement"]
assert "妈妈" not in s0["shot_type_angle_movement"]
# scene_and_dialogue 只放对白
assert s0["scene_and_dialogue"] == "生完娃,是不是连照镜子都没勇气了?"
# action_details 有内容
assert "手扶洗手台" in s0["action_details"]
# visual 字段有画面
assert "暖光" in s0["visual"]
assert "推镜" not in s0["visual"]
# === 2. 旧schema(无<shot>/<action_details>标签,<visual>混写):兼容拆分 ===
OLD_SCHEMA_XML = """<script>
<clips>
<clip index="1">
<time_range>0-4秒</time_range>
<voiceover>生完娃,是不是连照镜子都没勇气了?</voiceover>
<visual>中近景平视,暖光下妈妈略显疲惫地看向镜中,镜头缓缓推近,妈妈手扶洗手台微微低头</visual>
<reference_image_index>0</reference_image_index>
</clip>
</clips>
<voiceover_script>生完娃,是不是连照镜子都没勇气了?</voiceover_script>
<theme>测试</theme>
</script>"""
def test_old_schema_xml_splits_visual(monkeypatch, mock_job):
wv = _import_wv(monkeypatch)
r = wv._parse_script(OLD_SCHEMA_XML, mock_job)
assert r is not None
s0 = r["shots"][0]
# 摄影参数段应含景别/运镜关键词
assert "中近景" in s0["shot_type_angle_movement"] or "推" in s0["shot_type_angle_movement"]
# action_details 应含动作动词
assert s0["action_details"], "action_details不应为空(旧schema兼容应从<visual>拆出动作)"
assert "手扶" in s0["action_details"] or "低头" in s0["action_details"]
# scene_and_dialogue 只放对白,不重复画面
assert s0["scene_and_dialogue"] == "生完娃,是不是连照镜子都没勇气了?"
# === 3. markdown 中文分镜字段 ===
MARKDOWN_INPUT = """## 视频主题:御众堂探店
### 镜头1
- 时间范围:0-4秒
- 景别/角度与运镜:中近景平视,缓慢推镜
- 画面:暖光下妈妈看向镜中,镜灯打在侧脸
- 动作与真人细节:妈妈手扶洗手台,微微低头
- 口播:"生完娃,是不是连照镜子都没勇气了?"
### 镜头2
- 时间范围:4-10秒
- 景别:中景平视
- 运镜:缓慢平移
- 画面:门店前台暖光木色装修
- 动作:店员递茶,妈妈伸手接过
- 口播:"推开门,暖光和一杯热茶先接住了你"
"""
def test_markdown_field_extraction(monkeypatch, mock_job):
wv = _import_wv(monkeypatch)
r = wv._parse_script(MARKDOWN_INPUT, mock_job)
assert r is not None
assert len(r["shots"]) == 2
s0 = r["shots"][0]
assert "中近景" in s0["shot_type_angle_movement"]
assert "妈妈手扶洗手台" in s0["action_details"]
assert s0["scene_and_dialogue"] == "生完娃,是不是连照镜子都没勇气了?"
# === 4. _split_visual_field 单元测试 ===
def test_split_visual_field(monkeypatch):
wv = _import_wv(monkeypatch)
# 典型旧schema混写:"中近景平视,暖光下一位妈妈略显疲惫地看向镜中,镜头缓缓推近,妈妈手扶洗手台微微低头"
cam, vis, act = wv._split_visual_field(
"中近景平视,暖光下妈妈略显疲惫地看向镜中,镜头缓缓推近,妈妈手扶洗手台微微低头"
)
assert cam and "中近景" in cam
# 动作/表情段应被拆到 act(含"妈妈"主语+动词)
assert act and ("手扶" in act or "疲惫" in act or "看向" in act)
# 画面描述允许为空(当动作段本身承载了主要画面信息时),或含"暖光"
assert (not vis) or ("暖光" in vis) or ("妈妈" in vis)
def test_split_visual_short(monkeypatch):
wv = _import_wv(monkeypatch)
cam, vis, act = wv._split_visual_field("特写固定镜头")
# 切不开时整体归camera/visual,action为空
assert "特写" in cam
if __name__ == "__main__":
pytest.main([__file__, "-v"])