9 Commits

Author SHA1 Message Date
xiaoxia 21c26b5b26 feat(generation): worker孤儿任务自动恢复 + 429限流结构化提示 (#1677) (#1710)
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (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 / Check if frontend-only change (pull_request) Successful in 3s
CI/CD Pipeline / Check push changed paths (push) Successful in 5s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 21s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 23s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 24s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 32s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 32s
CI/CD Pipeline / Build Staging API Image (push) Successful in 32s
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Successful in 7s
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 1m54s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 2m14s
CI/CD Pipeline / Integration Tests (push) Successful in 2m31s
CI/CD Pipeline / Validate - Style (push) Successful in 2m58s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 1m30s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m41s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 1m31s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 1m56s
CI/CD Pipeline / Frontend Unit Tests (push) Successful in 5m29s
CI/CD Pipeline / Validate - Security (push) Successful in 6m18s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 3m14s
AI Code Review / AI Code Review (pull_request) Successful in 6m28s
CI/CD Pipeline / Unit Tests (push) Successful in 8m25s
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Canary Release to Production (push) Failing after 267h38m7s
CI/CD Pipeline / CI Gate (push) Failing after 267h38m11s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 267h38m11s
CI/CD Pipeline / Build Production API Image (push) Failing after 267h38m11s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Failing after 267h42m47s
CI/CD Pipeline / Canary Release to Production (pull_request) Failing after 267h45m1s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 267h45m6s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 267h45m7s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 267h45m10s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 267h45m10s
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Failing after 267h45m15s
CI/CD Pipeline / Retag skipped Staging Web Image (push) Failing after 267h45m15s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 267h45m20s
CI/CD Pipeline / Retag skipped Staging API Image (push) Failing after 267h45m19s
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Failing after 267h45m26s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 267h45m23s
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Failing after 267h45m26s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 267h46m35s
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 267h46m35s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Failing after 267h46m36s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 267h46m35s
CI/CD Pipeline / Validate - Security (pull_request) Failing after 267h46m36s
CI/CD Pipeline / Frontend Lint (push) Failing after 267h46m38s
CI/CD Pipeline / Validate - Style (pull_request) Failing after 267h46m36s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 267h46m39s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 267h46m36s
CI/CD Pipeline / Check push changed paths (pull_request) Failing after 267h46m42s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 267h46m37s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 267h46m37s
CI/CD Pipeline / PR Build Web Image (push) Failing after 267h46m39s
CI/CD Pipeline / PR Build API Image (push) Failing after 267h46m40s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 267h46m43s
CI/CD Pipeline / Deploy Production (push) Failing after 268h12m38s
CI/CD Pipeline / Build Production Web Image (push) Failing after 268h12m42s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 268h19m32s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 268h19m55s
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Failing after 268h19m58s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 268h21m6s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com>
Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
2026-09-05 11:37:49 +08:00
xiaoxia 94aead4342 feat: 任务中心升级(失败重试/错误追踪/列表筛选) (#289)
CI/CD Pipeline / Validate Code Quality And Tests (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 Lint (push) Has been cancelled
CI/CD Pipeline / Build & Push 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 Runtime Images (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
2026-07-14 09:55:53 +08:00
xiaoxia efe7f6b52a feat: 任务队列限流防护
feat: 任务队列限流防护

- 用户级 pending 限流(3 个上限,返回 429)
- 全局队列保护(20 个上限,返回 503)
- 4 处入口全覆盖:批量创建、generation 重试、任务中心两级重试
- 入队前预检查 + 入队后最终校验双层兜底,处理并发竞态
- 阈值统一常量管理,边界语义一致
- 350+ 行单元测试覆盖所有边界场景
2026-07-11 16:29:07 +08:00
灵应 356df4663e fix: 修复素材库诊断/缩略图/视频URL + 剪辑计划错误处理
Deploy / Staging E2E Tests (push) Has been cancelled
Deploy / Deploy Staging (push) Failing after 111h7m48s
CI/CD Pipeline / Frontend Lint (push) Failing after 111h7m57s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 111h7m57s
Deploy / Production Browser E2E (push) Failing after 1769h43m24s
Deploy / Deploy Production (push) Failing after 1769h43m26s
Deploy / Build Production Runtime Images (push) Failing after 1769h43m28s
Task #105: 修复剪辑计划/模板页面报服务器繁忙
- templates.py: list_templates/get_template/list_categories 加 try/except
- templates.py: 新增 POST /{template_id}/toggle-favorite 兼容端点
- edit_plans.py: list_plans 加 try/except,ai_tasks 加 ImportError 守卫

Task #106: 修复素材库诊断按钮 + 缩略图/视频URL
- asset_diagnosis.py: get_project_asset_diagnosis 加 try/except
- assets.py: 注入 storage_service,生成签名 file_url
- asset.py schema: 新增 file_url 字段
- 视频素材 thumbnail_url 为空时复用 file_url 作为封面

其他:
- edit_plans/generation_tasks 支持 source_edit_plan_id
- Alembic 迁移 022: 两表加 source_edit_plan_id 字段
2026-07-04 21:46:32 +08:00
Audit Bot d2578a9093 fix: PR#112 P2 建议修复
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P2-1: list_by_user[:5] → list_recent_by_user(user_id, limit=5) SQL层LIMIT
P2-2: DashboardOverviewResponse 补充 subscription 字段(plan + is_active)

- packages/ports/generation_task_repository.py: 新增 list_recent_by_user
- packages/adapters/sqlalchemy_impl/generation_task_repository.py: 实现
- apps/api/app/schemas/dashboard.py: 新增 SubscriptionInfo + subscription 字段
- apps/api/app/api/routes/dashboard.py: 使用新接口 + 填充 subscription
2026-06-29 18:23:49 +08:00
Audit Bot e723025889 fix: 修复 projects 500 + 实现 dashboard/overview 端点
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Bug 1: GET /api/v1/projects → 500
- _to_project_response() 缺少 owner_user_id 和 shared_users 字段
- 补全 ProjectResponse schema 必填字段

Bug 2: GET /api/v1/dashboard/overview → 404
- 新建 dashboard schema + route
- 添加 count_by_user / count_by_project_ids / sum_storage_by_project_ids 仓储方法
- 注册 /api/v1/dashboard 路由
2026-06-29 18:12:39 +08:00
Audit Bot ea9e536740 feat: 扩展生成任务API支持模板模式
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
方案A: 后端扩展3处API改动,支持前端模板中心化模型。

1. POST /api/v1/generation/tasks — project_id改为可选,新增template_id/asset_ids/title_ids/voice_ids
2. GET /api/v1/generation/tasks + GET /api/v1/tasks — 新增用户级列表(跨project)
3. POST /api/v1/tasks/{task_id}/retry + POST /api/v1/generation/tasks/{task_id}/retry — 简化重试

改动涉及:
- Domain: GenerationTask新增6个字段,放宽create()校验
- Application: CreateGenerationTaskCommand新增字段
- Ports: GenerationTaskRepository新增list_by_user()
- Adapter: SQLAlchemy模型+仓储实现新字段和list_by_user
- Schema: 双模式校验(project模式/模板模式)
- Routes: generation_tasks + task_center双路由注册
- Migration: 015_add_generation_task_extensions

向后兼容:所有旧端点和参数不变。
2026-06-29 17:05:53 +08:00
Xiaoxia AI bfbaddbd9a style: normalize python formatting gates 2026-06-21 06:52:19 +08:00
Xiaoxia AI 758c2c7e13 feat(phase7): align asset flow and scaffold generation pipeline 2026-06-18 19:59:37 +08:00