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
xiaoxia
b66de19be8
feat: 一键生成链路日志最小集 ( #205 )
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 11s
CI/CD Pipeline / Frontend Lint (push) Successful in 1m54s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (push) Has been skipped
CI/CD Pipeline / Deploy Production (push) Has been skipped
CI/CD Pipeline / Production Browser E2E (push) Has been skipped
2026-07-10 23:57:38 +08:00
灵应
9f0c064f2a
feat: 任务4 视频查重 — 历史+批次双重去重
...
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (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 / Frontend Lint (push) Failing after 45h27m46s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 45h27m46s
- Alembic 033: generation_tasks 加 batch_id 列+索引
- Route: count>1 时生成共享 batch_id
- Repository: list_by_batch() 批次内查询
- dedup.py: check_batch_duplicate() 批次内查重
- Worker: 生成视频后创建 GeneratedVideo 记录 + 双重查重
- 单元测试: 6 个批次查重测试用例
2026-07-07 15:26:41 +08:00
灵应
1ea8fd3989
feat: P2 素材库自动匹配 - 支持 all/random/smart 三种素材选取模式
...
CI/CD Pipeline / Deploy Staging (push) Has been skipped
CI/CD Pipeline / Staging E2E Tests (push) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (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 / Frontend Lint (push) Failing after 45h41m20s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 45h41m20s
- Schema: 新增 asset_select_mode + asset_select_count 字段
- Domain: GenerationTask 新增 asset_select_mode 字段
- Application: Command/UseCase 透传 asset_select_mode
- Route: _select_assets_from_library() 辅助函数 + 创建任务集成
- SQLAlchemy: Model/Repository 映射 asset_select_mode
- Alembic: 032 号迁移
- Worker: _download_library_assets() 支持 asset_ids 过滤
- 单测: 15 个测试覆盖三种模式 + 边界情况
2026-07-07 15:13:05 +08:00
灵应
a101b2170b
fix: 修复 StrEnum 反序列化 — 仓储层 status 字符串转枚举
...
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Staging E2E Tests (push) Failing after 91h12m12s
Deploy / Deploy Staging (push) Failing after 91h14m15s
CI/CD Pipeline / Frontend Lint (push) Failing after 91h14m23s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 91h14m23s
根因:SQLAlchemy Column(String(20)) 读出的是纯 str,
_model_to_entity 直接传给 domain 实体后,路由层 job.status.value
抛 AttributeError(str 没有 .value 属性)→ 500。
修复 3 个缺失枚举转换的仓储:
- tts_job_repository: status=TTSJobStatus(model.status)
- voice_clone_profile_repository: status=VoiceCloneStatus(model.status)
- generation_task_repository: status=GenerationTaskStatus(model.status)
已有正确转换的仓储(edit_plan/edit_plan_clip/edit_template/
asset/job/ingest_job)不受影响。
新增 22 个单测覆盖:
- 所有 StrEnum status 值的枚举转换验证
- .value 属性可正常访问(不再 AttributeError)
- 字符串兼容性比较仍然有效
- 已有正确仓储的回归测试
全量 896 单测全绿。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-05 17:40:04 +08:00
灵应
356df4663e
fix: 修复素材库诊断/缩略图/视频URL + 剪辑计划错误处理
...
Deploy / Staging E2E Tests (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
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
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
xiaoxia
52ff2f80ad
style: apply black formatting to pass CI validation ( #126 )
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
2026-06-30 17:23:08 +08:00
Audit Bot
f9e8d6efdc
fix: 修复 3 个 P0 端点 500 错误的真正根因
...
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/assets → 500:
asset_repository 所有方法为 async def,但调用方为同步上下文,
未 await 导致返回 coroutine 对象而非实际数据。
修复:全部改为 def(同步),与 SQLAlchemy 同步 Session 一致。
Bug 2 — POST /api/v1/generation/tasks → 500:
GenerationTaskModel 仍定义 edit_plan_id 列,但迁移 011 已从数据库
删除该列,INSERT 时报 column does not exist。
修复:从 model、repository、domain entity、application use case、
所有路由中彻底移除 edit_plan_id 引用。
Bug 3 — GET /api/v1/dashboard/overview → 500:
generation_task_repository._to_domain() 访问 model.edit_plan_id,
该列已被迁移 011 删除,触发 AttributeError。
修复:同上,移除 edit_plan_id 引用。
涉及文件:
- packages/adapters/sqlalchemy_impl/asset_repository.py (async→sync)
- packages/ports/asset_repository.py (async→sync 接口)
- packages/adapters/sqlalchemy_impl/models.py (移除 edit_plan_id 列)
- packages/adapters/sqlalchemy_impl/generation_task_repository.py
- packages/domain/generation_task.py
- packages/application/generation_tasks.py
- apps/api/app/api/routes/generation_tasks.py
- apps/api/app/api/routes/task_center.py
2026-06-29 20:10:51 +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
API文档维护Agent
a43ddb4b63
feat: Phase 1 - 核心重构(去Project层/标题库API/配音库API/清理废弃代码)
...
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
## 主要变更
### 1. 清理废弃代码(18个文件删除)
- 删除 TaskModel/MilestoneModel/TaskIssueModel 及相关文件
- 删除 ProjectTitleModel/EditPlanModel/EditPlanClipModel 及相关文件
- 清理 domain/ports/adapters/application/api 各层引用
- 从 GenerationTaskModel 移除 edit_plan_id 字段
### 2. 新建标题库 API(/api/v1/titles)
- Domain: TitleLibraryItem 数据类
- Ports: TitleLibraryRepository 接口
- Adapters: SQLAlchemy 实现(软删除)
- Application: CRUD Use Cases + 配额检查(max_titles: free=50, basic=500, premium=500)
- API: GET/POST/PUT/DELETE 端点
- Schema: Pydantic 请求/响应模型
### 3. 新建配音库 API(/api/v1/voices)
- Domain: VoiceLibraryItem 数据类
- Ports: VoiceLibraryRepository 接口
- Adapters: SQLAlchemy 实现(软删除)
- Application: CRUD Use Cases + 配额检查(max_voiceovers: free=10, basic=100, premium=100)
- API: GET/POST/PUT/DELETE 端点
- Schema: Pydantic 请求/响应模型
### 4. 去掉 Project 层依赖
- 修复 authenticated_user.id → authenticated_user.user.id bug
- asset_libraries.py: project_id 改为可选查询参数
- generated_videos.py: project_id 改为可选查询参数
- 无 project_id 时通过 find_accessible_projects 获取用户可访问的所有项目
### 5. 数据库迁移
- 创建 011_phase1_core_refactor.py
- 删除 6 个废弃表:tasks, milestones, task_issues, project_titles, edit_plans, edit_plan_clips
- 从 generation_tasks 表删除 edit_plan_id 列
### 6. 其他改进
- 迁移 EditingMode 到独立模块 packages/domain/editing_mode.py
- 注册 titles_router 和 voices_router
- 添加 get_title_library_repository 和 get_voice_library_repository 依赖
- 更新 domain/ports __init__.py 导出新实体和仓储接口
## 技术细节
- 遵循六边形架构模式
- 配额检查通过 QuotaRegistry 实现
- 软删除:标题库用 is_active=False,配音库用 status='deleted'
- 配音库支持可选的 project_id 关联
## 破坏性变更
- 删除 6 个废弃表(需先备份数据)
- 删除 /api/v1/edit-plans, /api/v1/project-titles, /api/v1/project-management 端点
- generation_tasks API 不再包含 edit_plan_id 字段
2026-06-28 15:02:10 +08:00
xiaoxia
0422967229
refactor: Remove workspace concept - Projects now directly under User
...
BREAKING CHANGES:
- Removed Workspace, WorkspaceMember, WorkspaceInvitation entities
- Project now has owner_user_id instead of workspace_id
- Added shared_users list to Project for collaboration
- Subscription/quota moved from Workspace to User level
Changes:
- packages/domain/entities.py: Removed Workspace entities, updated Project
- packages/adapters/sqlalchemy_impl/models.py: Updated models
- packages/application/: Removed workspace use cases, updated other use cases
- packages/ports/: Removed workspace repository interfaces
- apps/api/: Updated routes, schemas, dependencies, router
- alembic/versions/007_remove_workspace_concept.py: Database migration
New APIs:
- POST /projects/{id}/share: Share project with user
- DELETE /projects/{id}/share/{user_id}: Unshare project
2026-06-26 19:16:54 +08:00
Xiaoxia AI
0f59b412bc
feat(plans): add edit plan preview workflow
2026-06-24 10:10:25 +08:00
Xiaoxia AI
758c2c7e13
feat(phase7): align asset flow and scaffold generation pipeline
2026-06-18 19:59:37 +08:00