Commit Graph

15 Commits

Author SHA1 Message Date
xiaoxia 531aacb57e fix(code-quality): 第二批 - B904 raise-without-from 批量修复 (71个) (#353)
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 Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web 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 Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (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-15 11:51:45 +08:00
CI Bot 1a57878f76 chore(backend): Phase 3 清理 — 未使用依赖删除 + pyflakes 警告清零 + 测试文件冗余清理
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 1m12s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 2m17s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1m33s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 3m14s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (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
1. 未使用依赖清理:
   - 从 requirements-base.txt 移除 cryptography 和 pyOpenSSL

2. pyflakes 警告清零 (apps/ + packages/ + tests/):
   - 移除 17 处未使用的 import (F401)
   - 修复 26 处未使用的局部变量 (F841):
     * 有副作用的赋值转为裸调用
     * 无副作用的赋值直接删除
   - 修复 1 处未使用的异常变量 (F841)
   - 修复 1 处空 except 块

3. 测试文件冗余清理:
   - 删除 tests/integration/test_project_management.py (模块级 skip,测试不存在的模块)
   - 删除 tests/integration/fixtures/duplication_routes_fixed.py (未被引用)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 16:14:46 +08:00
xiaoxia 9b2e782abd fix(worker): 修复 dedup fingerprint JSON 序列化失败 - np.float32 转原生 float (#239)
CI/CD Pipeline / Validate Code Quality And Tests (push) Successful in 1m19s
CI/CD Pipeline / Frontend Lint (push) Successful in 50s
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 / Integration Tests (push) Successful in 1m14s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (push) Successful in 48m23s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 3m16s
CI/CD Pipeline / Staging API Integration Tests (push) Successful in 6m20s
2026-07-13 08:54:58 +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
灵应 8935196fcd style: 后端代码black格式化
Deploy / Staging E2E Tests (push) Has been skipped
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 138h4m33s
CI/CD Pipeline / Frontend Lint (push) Failing after 138h4m39s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 138h4m39s
2026-07-03 18:49:54 +08:00
灵应 ed7de72b0c refactor(dedup): 优化查重算法 — XOR 汉明距离 + 简化判定逻辑
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 189h16m18s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Failing after 189h16m21s
Deploy / Deploy Staging (push) Failing after 189h16m52s
CI/CD Pipeline / Frontend Lint (push) Failing after 189h17m22s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 189h17m26s
- hamming_distance: 替换 zfill+字符比较为 XOR bit 计数 (bin(h1^h2).count('1'))
- check_duplicate: 移除直方图融合和 best_match,返回第一个匹配
- compute_phash: 补充详细中文算法注释(DCT 步骤说明)
- 修复 similarity 精度:移除 round(x, 4) 保留完整浮点精度

所有 74 个测试通过(8 个 cv2 依赖跳过)。
2026-07-01 15:37:05 +08:00
灵应 ee8c60a143 perf(duplication): 查重模块代码优化 — 修复6个代码质量问题
1. 修复 hamming_distance 不等长哈希处理(hex() 前导零丢失)
2. 集成颜色直方图到 check_duplicate(此前计算但未使用,浪费 CPU)
3. check_duplicate 改为返回最佳匹配而非首个匹配
4. 修复仓库删除顺序(先删片段再删记录,防止孤儿数据)
5. 域模型添加 can_retry()/reset_for_retry(),仅 failed 状态允许重试
6. 列表接口暴露 offset/limit 分页参数
2026-07-01 14:48:15 +08:00
xiaoxia fff644deac fix: resolve bandit security issues and fix vitest configuration (#132)
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 210h18m25s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h18m51s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h18m54s
2026-06-30 18:35:20 +08:00
xiaoxia 1217d8cef0 style: apply isort formatting to pass CI validation (#129)
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 210h35m44s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h36m11s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h36m17s
2026-06-30 18:17:44 +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
API文档维护Agent e3fb518ab2 refactor: remove all workspace_id references from codebase
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- Remove workspace_id from Pydantic models in project_management routes
- Remove workspace_id from SQLAlchemy and SQLite project management repos
- Remove workspace_id from worker tasks (storage keys, entity creation)
- Remove workspace_id from video dedup and title usage modules
- Remove workspace_id from generation and ingest worker tasks
- Clean workspace_id from all test files and scripts
- Remove workspace-specific test files (list_workspaces, workspace repos)

Task: #14 workspace_id 残留清理
2026-06-27 22:52:09 +08:00
Celery Worker Fix Agent 8210806632 fix: 修复 Celery Worker 任务注册和导入问题
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
1. 修复 Worker 启动入口: celery_app → worker_app.celery_app
   - 旧 celery_app.py 不导入任何任务模块,导致 Worker 注册 0 个任务
   - 删除旧版 apps/worker/celery_app.py,统一使用 worker_app/celery_app.py

2. 为缺少装饰器的任务补充 @celery_app.task:
   - classification.py: classify_asset() 添加装饰器
   - generation.py: generate_video() 添加装饰器,修正签名匹配 API 调用方式

3. 确保 voice_extraction 任务被正确注册:
   - 添加 voice_extraction 到 celery_app imports
   - 修复 voice_extraction.py 中错误的相对导入 (.celery_app → worker_app.celery_app)
   - 修复 dedup.py 中指向已删除模块的导入

4. 修复 worker_app/celery_app.py:
   - 添加 broker_connection_retry_on_startup=True
   - imports 中添加 voice_extraction 和 dedup 模块

5. 修复 Dockerfile:
   - CMD 改为 celery -A worker_app.celery_app
   - 添加非 root 用户 celery 运行 Worker

6. 新建 packages/shared/config.py 和 storage.py 兼容层
   - 为 worker 任务模块提供统一的 config/storage 访问入口
2026-06-27 19:31:07 +08:00
CI Bot c98ab4c1ef feat: decouple API and Worker cross-service dependencies 2026-06-27 10:22:25 +08:00
CI Bot a97e3e72e9 fix: 修复 dedup.py 语法错误和 pHash DCT 实现,修复 chunked_upload.py 缩进错误 2026-06-26 22:46:21 +08:00
CI Test bd9e9fba45 chore: squash merge feature/voice-dedup into develop (resolve conflicts)
- Add voice extraction and deduplication functionality
- Add dedup.py for video deduplication
- Add voice_extraction.py task for worker
- Resolve CI/CD and deploy workflow conflicts with develop version
- Keep new voice dedup features from feature branch
2026-06-26 21:23:39 +08:00