48 Commits

Author SHA1 Message Date
repair-agent
a546b1aefa fix: auto repair bugs #19 2026-03-02 17:33:56 +08:00
repair-agent
c219ec2fcf feat(hw-ws-service): 将 Go WebSocket 服务纳入 CI/CD 并通过 Traefik 统一入口
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 4m28s
## 变更内容

### k8s/ingress.yaml
- 新增 /xiaozhi/v1/ 路径规则,将 WebSocket 流量路由到 hw-ws-svc:8888
- Traefik 最长前缀优先,/xiaozhi/v1/ 不影响 / 下的 Django 路由

### hw_service_go/k8s/service.yaml
- Service 类型由 LoadBalancer 改为 ClusterIP
- 移除阿里云 SLB 注解(通过 Traefik Ingress 统一暴露,不再需要独立公网 IP)

### hw_service_go/k8s/deployment.yaml
- 镜像地址改为 ${CI_REGISTRY_IMAGE}/hw-ws-service:latest 占位符
- CI/CD 部署时统一通过 sed 替换为华为云 SWR 实际地址

### hw_service_go/internal/server/server.go
- 新增 GET /xiaozhi/v1/healthz 接口,返回 {"status":"ok","active_connections":N}
- 用于部署后验证服务存活及当前连接数

### .gitea/workflows/deploy.yaml
- 新增 Build and Push HW WebSocket Service 步骤,构建并推送 hw_service_go 镜像
- 部署步骤新增 kubectl apply hw_service_go/k8s/deployment.yaml 和 service.yaml
- 新增 kubectl rollout restart deployment/hw-ws-service

### run.sh
- 本地同时启动 Django + hw_service_go 的开发脚本

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 17:16:26 +08:00
repair-agent
5fb0db5da0 Merge fix/auto-20260228-193351: 默认故事封面生成功能
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m20s
2026-03-02 15:50:09 +08:00
repair-agent
861bad22ab feat: 新增 generate_default_covers 管理命令
用 LLM 从故事内容提炼 ≤50 字画面描述,调用 Seedream 4.5 生成
2560x1440 横版封面,覆盖上传到 OSS 固定路径,自动更新所有用户。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:45:49 +08:00
repair-agent
8f9f7824cd feat: 封面图提示词改为用 LLM 从故事内容提炼 ≤50 字画面描述
新增 _extract_image_description:调用豆包 LLM 提取故事的主体、
场景与核心事件,串联成一幅画的描述(≤50字),再拼接风格前缀后
送入 Seedream 4.5 文生图模型,生成更贴合故事内容的封面。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:42:56 +08:00
repair-agent
764cab37a0 fix: 封面尺寸改为 2560x1440 横版(与书架卡片 16:9 比例匹配)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:40:36 +08:00
repair-agent
cbfe747553 feat: 故事生成时自动用豆包 Seedream 4.5 文生图模型生成封面
- llm_service: 添加 _generate_and_upload_cover,调用 doubao-seedream-4-5-251128
  生成 1920x1920 儿童绘本风格封面,下载后上传至 OSS,URL 随 done 事件返回
- SSE 新增 cover 阶段(progress=90),非致命异常不影响故事主流程
- settings: LLM_CONFIG 新增 IMAGE_MODEL_NAME / IMAGE_SIZE,可通过环境变量覆盖

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:32:54 +08:00
repair-agent
487b258bbe feat: 添加默认故事功能及修复故事模块依赖
- Story 模型新增 is_default 字段及迁移 0004
- 新增 utils.py:ensure_default_stories 懒初始化默认故事(含视频绘本)
- StoryViewSet/ShelfViewSet list 接口调用 ensure_default_stories
- 新增 upload_default_story_media 管理命令,上传视频/封面到 OSS
- 安装缺失依赖:edge-tts 7.2.7、volcengine-python-sdk[ark] 5.0.12

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:16:38 +08:00
repair-agent
4736f63040 fix diff
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 2m37s
2026-02-28 14:34:19 +08:00
zyc
35e4ef2256 Merge pull request 'fix: auto repair bugs #52' (#3) from fix/auto-20260227-163520 into main
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m3s
Merge PR #3 (approved via Log Center)
2026-02-27 16:57:25 +08:00
repair-agent
9ac26a5f11 fix: auto repair bugs #52 2026-02-27 16:38:50 +08:00
zyc
80e1a783ba Merge pull request 'fix: auto repair bugs #47, #46, #45, #44, #43, #42' (#2) from fix/auto-20260225-162641 into main
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m37s
Merge PR #2 (approved via Log Center)
2026-02-25 16:34:19 +08:00
repair-agent
37f4481930 fix: auto repair bugs #47, #46, #45, #44, #43, #42 2026-02-25 16:33:16 +08:00
zyc
c252ad0c78 Merge pull request 'fix: auto repair bugs #41, #40, #39' (#1) from fix/auto-20260225-152423 into main
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m11s
Merge PR #1 (approved via Log Center)
2026-02-25 15:26:58 +08:00
repair-agent
99f6595dce fix: auto repair bugs #41, #40, #39 2026-02-25 15:25:27 +08:00
repair-agent
7dd0e4093a feat(test): 引入3个测试bug用于验证repair agent自动修复流程
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 4m19s
- payment_service: 退款比例校验缺失上限(severity 10)
- device_api: 分页偏移量计算错误(severity 5)
- user_service: is_active过滤条件布尔判断错误(severity 4)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 13:51:22 +08:00
repair-agent
bd684476c7 fix: auto repair bugs #32
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 4m19s
2026-02-25 13:35:35 +08:00
repair-agent
d421677518 fix: auto repair bugs #30
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 2m33s
2026-02-24 17:02:41 +08:00
repair-agent
7a6a519fbe fix: auto repair bugs #26, #25, #24
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m13s
2026-02-24 16:19:40 +08:00
repair-agent
47be0781ac fix: auto repair bugs #23
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 2m59s
2026-02-24 14:53:05 +08:00
repair-agent
d2af1ddaa9 fix: auto repair bugs #22
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m18s
2026-02-24 14:43:23 +08:00
repair-agent
9144770130 fix(cicd): replace dead daocloud kubectl mirror with official k8s.io
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 3m11s
DaoCloud mirror returns 404 for kubectl v1.28.2, causing Setup Kubectl
step to hang. Use official dl.k8s.io with cdn.dl.k8s.io as fallback.
Also update pinned dependency versions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:38:16 +08:00
repair-agent
5fb71b99f9 fix: auto repair bugs #21, #20
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 6m44s
2026-02-24 14:31:05 +08:00
repair-agent
c96bef3515 fix: auto repair bugs #19
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Has been cancelled
2026-02-24 14:19:13 +08:00
repair-agent
f9857c17ee fix(deps): pin alibabacloud shared deps to avoid pip backtracking
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m14s
dysmsapi and dypnsapi share alibabacloud-tea-openapi but their
transitive deps cause pip to endlessly backtrack during resolution.
Pin compatible versions of shared deps to speed up the build.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:10:19 +08:00
repair-agent
91d0311b95 fix: auto repair bugs #19
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m32s
2026-02-24 13:53:03 +08:00
repair-agent
2628f7c281 fix: auto repair bugs #19
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m0s
2026-02-24 13:47:42 +08:00
repair-agent
cbcf867b5b fix(cicd): use correct context field names for Log Center fingerprint
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 54s
Add job_name and step_name to match Log Center's CI/CD fingerprint
generation, replacing failed_step which was not recognized. This fixes
deduplication causing new CI/CD failures to be silently dropped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:46:08 +08:00
repair-agent
47bc810256 fix(cicd): use set -o pipefail instead of broken PIPESTATUS approach
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 57s
PIPESTATUS[0] was consumed by the echo command before exit could use it,
causing build failures to be reported as success. set -o pipefail makes
the entire pipe fail if any command fails, which is simpler and correct.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:36:26 +08:00
repair-agent
ebe555216b fix(cicd): capture actual build/deploy logs in failure report
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m14s
Replace docker/build-push-action with shell command to capture
stdout/stderr. Include real error output in Log Center report
so repair agent can diagnose CI/CD failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:32:57 +08:00
repair-agent
7603b15ffb feat(ops): add Log Center env vars to K8s and CI/CD failure reporting
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m6s
- K8s: add ENVIRONMENT, LOG_CENTER_URL, LOG_CENTER_ENABLED to dev/prod
- CI/CD: report build/deploy failures to Log Center (source: cicd)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:17:11 +08:00
repair-agent
c584df814f fix(stories): fix shelf deletion IntegrityError with transaction.atomic
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 3m32s
Wrap shelf deletion in transaction.atomic to handle cases where
stories cannot be unlinked from shelf due to database constraints.
Falls back to deleting stories if update fails.

Fixes: Log Center Bug #13

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:00:25 +08:00
repair-agent
206e051817 fix(log-center): add repo_url and change default env to development
- Add hardcoded repo_url for repair agent to locate git repository
- Change default environment from 'production' to 'development'

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:00:18 +08:00
repair-agent
ee7f3ffea3 add message
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m3s
2026-02-14 13:23:16 +08:00
repair-agent
f1bead86f6 fix music
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 56s
2026-02-12 17:35:54 +08:00
repair-agent
7a6d7814e0 fix store bug
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 57s
2026-02-12 14:05:51 +08:00
repair-agent
81d7e95c19 fix sms code
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m5s
2026-02-12 10:06:42 +08:00
repair-agent
bc28ef00f1 add phone login
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 59s
2026-02-09 18:24:58 +08:00
repair-agent
88b8f023f4 Fix app api
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m36s
2026-02-09 15:35:33 +08:00
zyc
416be408fd test: add log center integration tests
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 2m0s
2026-01-30 13:18:56 +08:00
zyc
d908558f01 feat: integrate log center error reporting
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 1m42s
2026-01-30 13:16:37 +08:00
zyc
e0c20cf4d1 fix cors
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 1m36s
2026-01-29 16:19:32 +08:00
zyc
d66b4ab137 fix https
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 1m49s
2026-01-29 16:09:00 +08:00
zyc
d711c7e673 fix build bug
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 1m38s
2026-01-29 15:43:51 +08:00
zyc
1f0747e13d add 国内源(阿里云)
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 1m49s
2026-01-29 15:29:37 +08:00
zyc
ded5be6a05 add build test
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 6m4s
2026-01-29 15:16:20 +08:00
zyc
3a8df43de7 fix bug 2026-01-29 10:41:26 +08:00
zyc
c0deacd79c first commit 2026-01-29 10:02:15 +08:00