Commit Graph

1195 Commits

Author SHA1 Message Date
xiaoxia 560856cf22 fix: resolve all flake8 errors and apply Prettier formatting (#131)
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 210h26m26s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h27m0s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h27m7s
2026-06-30 18:26:53 +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 d1f3a82967 fix: resolve TypeScript type error in EditingPlanner (#130)
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
CI/CD Pipeline / Frontend Lint (push) Failing after 210h37m15s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h37m18s
2026-06-30 18:17:14 +08:00
xiaoxia 60c68ac586 fix: resolve all ESLint warnings for clean lint output (#128)
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 210h47m24s
CI/CD Pipeline / Frontend Lint (push) Failing after 210h47m48s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 210h47m52s
2026-06-30 18:06:41 +08:00
xiaoxia 8d2028feb5 Update SSH test workflow with enhanced debugging
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Test SSH Secret / test-ssh (push) Failing after 210h59m11s
Deploy / Deploy Staging (push) Failing after 210h59m42s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h0m9s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h0m14s
2026-06-30 17:54:20 +08:00
xiaoxia cd37f77cb3 ci: re-test SSH secrets
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Test SSH Secrets / Test Staging SSH (push) Failing after 211h6m37s
Deploy / Deploy Staging (push) Failing after 211h7m11s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h7m38s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h7m43s
2026-06-30 17:46:46 +08:00
xiaoxia 6173342e14 ci: improve SSH test with diagnostics
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Test SSH Secrets / Test Staging SSH (push) Failing after 211h14m37s
Deploy / Deploy Staging (push) Failing after 211h15m10s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h15m35s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h15m41s
2026-06-30 17:38:53 +08:00
xiaoxia 99f67dc52f ci: update test workflow to trigger on push
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Test SSH Secrets / Test Staging SSH (push) Failing after 211h17m27s
Deploy / Deploy Staging (push) Failing after 211h18m1s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h18m27s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h18m32s
2026-06-30 17:35:38 +08:00
xiaoxia 8a630e0ae1 ci: add SSH secret test workflow
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 211h19m26s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h19m30s
2026-06-30 17:35:02 +08:00
xiaoxia 6aa40c9296 fix(ci): adjust ESLint max-warnings threshold to 50 (#127)
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 211h29m54s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h30m21s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h30m26s
2026-06-30 17:23:41 +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
xiaoxia 1e6f78a346 fix: resolve ESLint errors to pass CI frontend-lint (#125)
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 211h32m2s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h32m39s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h32m46s
2026-06-30 17:21:49 +08:00
xiaoxia 51017066e0 fix: 配置管理规范化 - 修复 .env.production.example 变量名不一致 (#124)
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 211h37m1s
CI/CD Pipeline / Frontend Lint (push) Failing after 211h37m24s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 211h37m31s
2026-06-30 17:17:01 +08:00
xiaoxia bf6a4bf71a fix(ci): use python3 for all validate steps (host has no python symlink)
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 212h18m38s
CI/CD Pipeline / Frontend Lint (push) Failing after 212h19m2s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h19m9s
2026-06-30 16:35:14 +08:00
xiaoxia e11c6b6d13 fix(ci): add GITHUB_TOKEN env to validate checkout step
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 212h20m2s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h20m4s
2026-06-30 16:34:30 +08:00
xiaoxia d491090bd3 fix(ci): use python3 in validate checkout (slim image has no python symlink)
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 212h21m3s
CI/CD Pipeline / Frontend Lint (push) Failing after 212h21m31s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h21m31s
2026-06-30 16:32:52 +08:00
xiaoxia 5fbd0c5f32 chore: remove runner test workflow (no longer needed)
Deploy / Build Production Runtime Images (push) Has been cancelled
Deploy / Deploy Production (push) Has been cancelled
Deploy / Production Browser E2E (push) Has been cancelled
Deploy / Deploy Staging (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Failing after 212h22m52s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h22m52s
2026-06-30 16:31:34 +08:00
xiaoxia 584c1f554a fix(deploy): use ubuntu-22.04 + Python checkout + SSH install
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
CI/CD Pipeline / Frontend Lint (push) Failing after 212h23m19s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h23m19s
- Change runs-on from ubuntu-latest to ubuntu-22.04 (python:3.12 container)
- Replace wget checkout with Python urllib (fixes network failure exit code 4)
- Add openssh-client install for deploy-staging and deploy-production jobs
2026-06-30 16:31:16 +08:00
xiaoxia bc20705a7a fix(ci): use ubuntu-22.04 label for host execution (fixes checkout failure)
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 212h30m21s
CI/CD Pipeline / Frontend Lint (push) Failing after 212h30m47s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h30m47s
2026-06-30 16:23:47 +08:00
xiaoxia 68d8e50d50 fix(ci): remove container directive from validate job (host has all CI tools)
CI/CD Pipeline / Validate Code Quality And Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (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 212h32m56s
2026-06-30 16:21:33 +08:00
xiaoxia 5b2070dd09 test: minimal runner test workflow
Deploy / Build Production Runtime Images (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Runner Test / Test Runner (push) Failing after 212h35m12s
Deploy / Deploy Staging (push) Failing after 212h35m13s
CI/CD Pipeline / Frontend Lint (push) Failing after 212h35m14s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h35m15s
2026-06-30 16:19:16 +08:00
xiaoxia 738da14a16 fix(ci): 修复 deploy.yml runner label 匹配 (runtime-builder:host → ubuntu-latest)
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 212h55m33s
CI/CD Pipeline / Frontend Lint (push) Failing after 212h55m34s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h55m35s
2026-06-30 15:58:58 +08:00
xiaoxia 40d2710f0c fix(ci): 修复 runner label 匹配 + 使用已有 CI 容器镜像
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
CI/CD Pipeline / Frontend Lint (push) Failing after 212h55m47s
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 212h55m48s
- runs-on 改为 ubuntu-latest
- container 改为 python:3.12-slim-bookworm
2026-06-30 15:58:45 +08:00
xiaoxia d2c25dc360 ci: test runner pickup
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 15:52:57 +08:00
xiaoxia b410b65e22 ci: trigger workflow validation
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 15:49:59 +08:00
xiaoxia e4f8b8d492 Merge pull request 'test: 补充表单上传端点单元测试' (#123) from test/unit-tests-core-modules into develop
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 15:35:46 +08:00
Audit Bot b1f27b0ef6 test: 扩展表单上传测试到24个用例
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
根据灵应的规格补充测试覆盖:
- 正常路径(5): 视频/音频/图片上传成功、创建导入任务、响应包含URL
- 文件名校验(5): 路径遍历防护、反斜杠处理、空文件名、特殊字符、无扩展名
- 异常路径(8): 不支持文件类型、项目/素材库不存在、存储服务错误、缺少参数
- 多格式支持(3): 多种视频(4种)/音频(5种)/图片(6种)格式
- MIME验证(3): 有效类型、空类型(400)、不支持类型(415)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-30 15:28:15 +08:00
Audit Bot 16b18dc2fd test: 补充表单上传端点单元测试
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- 新增 tests/unit/test_form_upload_routes.py,覆盖10个测试场景
- 修复 upload.py 表单参数处理:从 Annotated[Model, Form()] 改为独立 Form() 参数
- 测试覆盖:正常上传成功、缺少文件字段、缺少必填参数、项目/素材库不存在、OSS未配置
- 所有测试通过,与现有 upload/chunked_upload 测试风格保持一致

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-30 13:12:49 +08:00
xiaoxia 56707a834c Merge pull request 'test: 添加核心模块单元测试 (config/upload/chunked_upload/asset_diagnosis)' (#122) from test/unit-tests-core-modules into develop
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 13:03:48 +08:00
Audit Bot c0c049b2e1 test: 添加核心模块单元测试 (config/upload/chunked_upload/asset_diagnosis)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- test_config_oss.py: 22 个测试覆盖 OSS 配置默认值、环境变量覆盖、字段名一致性
- test_upload_routes.py: 9 个测试覆盖上传路由 find_by_project 调用正确性
- test_chunked_upload_routes.py: 8 个测试覆盖分片上传初始化、常量校验
- test_asset_diagnosis.py: 7 个测试覆盖资产诊断逻辑和路由层调用

全部 46 个测试通过。

Closes #55
2026-06-30 12:57:04 +08:00
xiaoxia 1dd612c89c feat: 添加部署后冒烟测试脚本
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
覆盖5个核心端点:upload/direct/prepare, upload/chunk/init, dashboard/overview, assets, generation/tasks
支持 --json 输出和认证测试模式
2026-06-30 12:39:26 +08:00
xiaoxia 51e3cf5454 Merge pull request 'Sync develop → main (v0.1.101)' (#121) from develop into main
Auto Merge PRs / auto-merge (push) Failing after 46s
Deploy / Deploy Staging (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Build Production Runtime Images (push) Failing after 217h42m1s
v0.1.101
2026-06-30 11:10:59 +08:00
Audit Bot 1bbf569e0c fix: 修复 Docker Nginx 缺少 client_max_body_size 导致上传文件受限
- 添加 client_max_body_size 800m(与生产 Nginx 配置对齐)
- 添加 proxy_request_buffering off(避免大文件缓冲问题)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-30 10:42:27 +08:00
xiaoxia b6ead113cf Merge pull request 'fix: 上传端点 500 根因修复 (list_by_project → find_by_project) + OSS 诊断能力' (#120) from fix/upload-size-limit-2000mb into develop
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
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Tests / lint (pull_request) Failing after 217h42m35s
Tests / test (pull_request) Failing after 217h43m38s
PR#120: fix list_by_project → find_by_project (3 files)
2026-06-30 10:25:44 +08:00
Audit Bot 37152a0729 fix: list_by_project → find_by_project (修复上传/诊断端点 500)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
根因:upload.py、chunked_upload.py、asset_diagnosis.py 调用了
asset_library_repository.list_by_project(),但 SQLAlchemy 实现
只有 find_by_project(),导致 AttributeError → 500。

同步修复 InMemory 实现的方法名以保持一致。
2026-06-30 10:14:08 +08:00
Audit Bot 05c9137ece fix: 上传端点异常处理 + OSS 诊断能力
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
问题:PR#119 修复变量名后上传端点仍然 500,说明根因不仅是变量名错误

修复:
1. upload.py — 所有 3 个上传端点添加完整异常捕获和日志
   - prepare_direct_upload: 捕获 RuntimeError→503 + 其他异常→500+日志
   - complete_direct_upload: file_exists() 异常捕获→503(之前未捕获→500)
   - upload_asset: upload_file() 异常捕获→503/500+日志(之前未捕获→500)

2. storage.py — OSSStorageService.__init__ 添加启动诊断日志
   - 凭证缺失时记录 missing env vars
   - oss2 SDK 未安装时记录错误
   - bucket 初始化成功/失败时记录

3. health.py — /ready 端点增加 OSS 检查
   - 检查凭证是否配置
   - 检查 oss2 SDK 是否可用
   - 调用 get_bucket_info() 验证连通性

部署后请调用 GET /api/v1/ready 查看 OSS 状态
2026-06-30 09:56:20 +08:00
xiaoxia bae9b509de Merge pull request 'fix: 修复上传端点 500 错误 — 配置字段名拼写错误' (#119) from fix/upload-size-limit-2000mb into develop
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 09:30:08 +08:00
Audit Bot e6ecce79ee fix: rename OSS_DIRECT_UPLOAD_EXPRESS_SECRET to OSS_DIRECT_UPLOAD_EXPIRE_SECONDS
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Root cause of upload endpoint 500 errors:
- config.py defined OSS_DIRECT_UPLOAD_EXPRESS_SECRET (wrong name)
- upload.py accessed settings.OSS_DIRECT_UPLOAD_EXPIRE_SECONDS (correct name)
- AttributeError on every call to prepare_direct_upload → 500

This fixes both /api/v1/upload/prepare-direct-upload and any other
upload endpoints that reference the expire seconds config.
2026-06-30 09:24:27 +08:00
xiaoxia 6dbb281acf Merge pull request 'fix: 上传文件大小限制从 800MB 提升至 2000MB' (#117) from fix/upload-size-limit-2000mb into develop
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 07:50:46 +08:00
CI Test d934e0e322 chore(ci): add automatic Docker image cleanup after builds
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
- Add scripts/cleanup_old_images.sh: keeps only last 2 versions
  per service (api/worker/web), removes old local tags and registry
  blobs via Registry API, prunes dangling images
- Add cleanup step to deploy.yml build-production-runtime-images job
  with if:always() to ensure cleanup runs even on build failure
- Prevents disk space exhaustion from accumulated Docker images
  and Registry blobs on the build server
2026-06-30 06:58:48 +08:00
Audit Bot 304354208a fix(assets): add project_id to OSS direct upload and align size limit to 2048MB
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P1: prepareDirectUpload and completeDirectUpload now require project_id,
uploadAssetDirect calls getOrCreateDefaultProject() to obtain it automatically.
P2: MAX_FILE_SIZE changed from 2*1024^3 to 2048*1024*1024 to align with
backend OSS_DIRECT_UPLOAD_MAX_MB=2000.
2026-06-30 00:07:27 +08:00
Audit Bot b5e27a5e9e feat(assets): add 2GB file size validation and OSS direct upload for large files
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
- Add MAX_FILE_SIZE (2GB) validation in handleUpload with friendly error message
- Route files >100MB through OSS presigned direct upload (uploadAssetDirect)
- Keep small file form upload (uploadAsset) for files <=100MB
- Update upload hint text to show '单文件不超过 2GB' limit
- Add directUploadMutation with proper loading state tracking

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-29 22:13:08 +08:00
Audit Bot b98c83582b fix: 上传文件大小限制从 800MB 提升至 2000MB
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
P0 修复:
- config.py: OSS_DIRECT_UPLOAD_MAX_MB 默认值从 800 改为 2000
- config.py: 添加 AliasChoices 支持 MAX_UPLOAD_SIZE_MB 环境变量
  (.env.production 中 MAX_UPLOAD_SIZE_MB=2000 现在可被正确读取)

P1 修复:
- infra/nginx/xiaoxia-saas.conf: client_max_body_size 800m → 2g(3处)
- infra/docker/nginx-production.conf: client_max_body_size 800m → 2g
2026-06-29 22:11:22 +08:00
xiaoxia f07efd57b3 Merge pull request 'chore: develop → main 同步 v0.1.99' (#116) from develop into main
Auto Merge PRs / auto-merge (push) Failing after 33s
Deploy / Deploy Staging (push) Has been skipped
Deploy / Deploy Production (push) Has been skipped
Deploy / Production Browser E2E (push) Has been skipped
Deploy / Build Production Runtime Images (push) Failing after 231h20m54s
v0.1.99
2026-06-29 21:32:49 +08:00
xiaoxia afea0a7566 Merge pull request 'fix: 删除 AssetModel 幽灵列 storage_key(修复 P0 端点 500)' (#115) from fix/p0-endpoint-500-root-cause into develop
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
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
Tests / lint (pull_request) Failing after 231h21m54s
Tests / test (pull_request) Failing after 231h21m55s
2026-06-29 21:12:06 +08:00
Audit Bot 7b08029e2e fix: 删除 AssetModel 幽灵列 storage_key(数据库中不存在)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
根因:AssetModel 定义了 storage_key 列,但 assets 表从未包含此列。
SQLAlchemy 的 session.query(AssetModel) 生成 SELECT 时包含
assets.storage_key,导致 PostgreSQL 报错 column does not exist。

影响端点:
- GET /api/v1/assets?library_id=xxx → 500
- POST /api/v1/generation/tasks → 500(调用 find_by_library 验证素材)
- GET /api/v1/dashboard/overview → 500(调用 count_by_project_ids 统计)

修复:删除 models.py 中 AssetModel 的 storage_key 列定义。
域实体的 storage_key 字段通过 _to_domain() 从 model.file_url 映射,不受影响。
2026-06-29 20:47:40 +08:00
xiaoxia 6b5959bafd Merge pull request 'fix: 修复 3 个 P0 端点 500 错误根因(async/sync 不匹配 + edit_plan_id 残留)' (#114) from fix/p0-endpoint-500-root-cause into develop
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-29 20:28:26 +08:00
Audit Bot 7783f36172 fix: 从迁移 015 中移除残留的 edit_plan_id(代码审计 P1)
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Has been cancelled
CI/CD Pipeline / Frontend Lint (pull_request) Has been cancelled
迁移 011 已删除 edit_plan_id 列,迁移 015 不应再 add_column。
同时从 downgrade() 中移除对应的 drop_column。
2026-06-29 20:23:23 +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
xiaoxia 401a55cfcb Merge pull request 'fix: 清理 entities.py 重复实体定义,消除域模型冲突' (#113) from fix/domain-entity-cleanup into develop
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-29 19:40:53 +08:00