16 Commits

Author SHA1 Message Date
repair-agent
25c9b2d18e fix bug
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m39s
2026-03-02 17:46:33 +08:00
zyc
46c52a795f feat(repair-agent): Scheduler 从 API 动态获取项目列表,移除硬编码
Some checks failed
Build and Deploy Log Center / build-and-deploy (push) Failing after 1m10s
- _fetch_projects_from_api() 调用 GET /api/v1/projects 获取所有已注册项目
- API 失败时回退到本地 .env 配置
- 每次扫描时动态获取(新注册项目无需重启 Scheduler)
- 移除 _tick() 中的 get_project_path 阻断检查(由 fix_project 处理)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 10:29:00 +08:00
zyc
b178d24e73 fix pr
Some checks failed
Build and Deploy Log Center / build-and-deploy (push) Failing after 5m9s
2026-02-25 16:35:28 +08:00
zyc
33db841592 fix git checkout 2026-02-24 17:10:16 +08:00
zyc
f9c84b211b fix 百分比
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 2m38s
2026-02-24 17:04:39 +08:00
zyc
9a347d7929 feat(repair-agent): auto-merge fix branch to main after repair
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 9m30s
After pushing the fix branch, automatically merge it back to main and
push, so that CI/CD is triggered with the fix. Also cleans up the
remote fix branch after merge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:03:17 +08:00
zyc
50301dfb8c fix(git-manager): set upstream when pushing new branches
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 3m9s
push() was failing for new fix branches because they had no upstream
tracking branch. Now uses set_upstream=True with explicit refspec.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:50:31 +08:00
zyc
75fe8dfc0c feat(repair-agent): scan all bug sources and improve CI/CD triage
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 2m56s
- task_manager: scan runtime + cicd + deployment sources (not just runtime)
- claude_service: add CI/CD-specific triage rules for build/deploy failures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:33:08 +08:00
zyc
aa3a5b8c5d fix(repair-agent): add git push after auto-commit
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 2m46s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:17:16 +08:00
zyc
d58ca4b131 feat(repair-agent): add triage and retry flow for FIX_FAILED bugs
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 4m15s
- Add fetch_failed_bugs() to task_manager
- Add triage_bug() to claude_service for AI-based bug classification
- Add retry_failed_project() to core with triage→fix pipeline
- Add retry CLI command to __main__.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 13:01:27 +08:00
zyc
625e53dc44 feat(project-mgmt): 项目管理 + 失败原因追踪 + 前端展示
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 2m16s
- 新增 Project 模型(repo_url, local_path, name, description)
- 项目 CRUD API(GET/PUT /api/v1/projects)
- 日志上报自动 upsert Project 记录
- ErrorLog 增加 failure_reason 字段
- update_task_status / create_repair_report 写入失败原因
- Repair Agent 优先从 API 获取项目配置,回退 .env
- 新增 Web 端「项目管理」页面(表格 + 行内编辑)
- BugList/BugDetail/RepairList 展示失败原因
- 更新接入指南文档

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:18:27 +08:00
zyc
0d4b2d634c feat: 扩展日志收集,支持 CI/CD 构建错误和 K8s 部署错误
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 2m24s
新增两种日志来源(cicd / deployment),使日志中台覆盖"构建→部署→运行"全链路:

后端变更:
- models.py: 新增 LogSource 枚举和 source 字段,file_path/line_number 改为可选
- main.py: 按来源生成不同指纹策略,所有查询端点支持 source 筛选,仪表盘新增来源分布统计
- database.py: 新增 4 条迁移 SQL(source 字段、索引、字段可空)
- task_manager.py: 修复 Agent 仅拉取 runtime 来源的缺陷

新增组件:
- k8s-monitor/: K8s Pod 健康监控脚本(Python),每 5 分钟检测异常 Pod 并上报
- k8s/monitor-cronjob.yaml: CronJob + RBAC 部署清单
- scripts/report-cicd-error.sh: CI/CD 错误上报 Bash 脚本
- scripts/gitea-actions-example.yaml: Gitea Actions 集成示例

前端变更:
- api.ts: 类型定义更新,支持 source 字段
- BugList.tsx: 新增来源筛选标签页和来源列
- BugDetail.tsx: 按来源条件渲染(CI/CD 信息、部署信息),非 runtime 禁用修复按钮
- Dashboard.tsx: 新增来源分布表格
- index.css: 来源标签样式(source-badge)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:20:16 +08:00
zyc
e9ba36db92 fix bug three
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m31s
2026-02-13 14:04:21 +08:00
zyc
fe62f9ca81 fix bug
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m27s
2026-02-12 13:23:59 +08:00
zyc
61cbcfc4c4 fix bug
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 2m7s
2026-02-12 10:42:39 +08:00
zyc
aab0312cec add fix agent
All checks were successful
Build and Deploy Log Center / build-and-deploy (push) Successful in 1m35s
2026-01-30 14:52:21 +08:00