Files
xiaoxia-saas/apps/api
xiaoxia 2b0c1c78be
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 / Deploy Staging (Watchtower auto-deploy) (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 / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 44s
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
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m10s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 1m47s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m48s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m49s
AI Code Review / AI Code Review (pull_request) Failing after 2m38s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m31s
CI/CD Pipeline / Validate - Code Quality (pull_request) Failing after 3m37s
CI/CD Pipeline / Unit Tests (pull_request) Has been cancelled
CI/CD Pipeline / Integration 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 / 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 / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
fix: 统一封面生成路径,确保封面带标题
根因:封面图片生成有3条路径,只有路径B(extract_and_upload_cover_frames)
有标题叠加,但其产物(render_result.cover_candidates)被_render_video丢弃,
导致封面API永远拿不到带标题的候选帧,fallback到路径C远程抽帧(无标题)。

修改内容:
1. _render_video 返回值从 tuple[Path,float] 改为 tuple[Path,float,list[dict]]
   将 render_result.cover_candidates 传递给调用方
2. generate_video 渲染完成后将 cover_candidates 持久化到
   GenerationTask.metadata(JSON列),无需DB migration
3. generation_cover API 从 GenerationTask.metadata 读取 cover_candidates
   替代原来从 plan.config 读取(从来没人写入过)
4. 删除路径A: 移除 RenderAdapter 中 generate_and_upload_thumbnail 调用
   (无标题且产物从未被使用)
5. 清理死代码: 删除 extract_first_frame、generate_and_upload_thumbnail
   函数及 RenderAdapterResult.thumbnail_url 字段
6. 路径C(_extract_frames_with_ffmpeg)保留作为兜底不变

标题传递链路验证:
custom_title → task_info → _render_video → virtual_plan.config[title]
→ render_adapter plan_config → extract_and_upload_cover_frames(title_text)
→ _overlay_title_on_image → 最终封面候选帧带标题

影响文件:
- apps/worker/worker_app/tasks/generation.py
- apps/worker/video_processing/render_adapter.py
- apps/worker/video_processing/thumbnail_generator.py
- apps/api/app/api/routes/generation_cover.py
2026-08-14 16:36:30 +08:00
..
2026-06-15 15:17:40 +08:00
2026-07-11 16:29:07 +08:00
2026-06-15 15:17:40 +08:00

xiaoxia-saas API

结构

  • app/core/:配置与基础能力
  • app/api/:路由组织
  • app/schemas/:请求响应模型
  • app/dependencies.py:依赖注入入口
  • main.pyFastAPI 启动入口

当前可用接口

  • GET /api/health
  • GET /api/projects?workspace_id=...
  • POST /api/projects