Compare commits

..
Author SHA1 Message Date
aios f9bcb3f320 chore(chatgpt): create patch alias-test-patch 2026-07-07 22:03:33 +08:00
aios b9e2358901 chore(test): add V1R2C2 autonomous recovery chain integration test
- integration_test_v1r2c2.py: full pipeline test covering ActionMonitor,
  ErrorClassifier, FailureRouter, RecoveryController end-to-end
- V1R2C2-autonomous-recovery-chain-acceptance-test-report.md: acceptance
  test report with all 6 test suites documented

All tests PASSED: module imports, monitor, classifier (10 patterns),
router (3 route types), controller (3 scenarios), API 500 scenario.
2026-07-07 20:57:27 +08:00
aios a1874c90ae chore(baseline): mark autonomous_recovery_loop feature enabled for V1R2C2 2026-07-07 19:47:35 +08:00
3 changed files with 104 additions and 3 deletions
+4 -3
View File
@@ -25,10 +25,11 @@
"chatgpt_rw": true,
"codex_rw": true,
"portal_gitops_dashboard": true,
"human_shortlinks_login_required": true
"human_shortlinks_login_required": true,
"autonomous_recovery_loop": true
},
"version": "V1R2C2",
"baseline_tag": "V1R2C2-baseline",
"baseline_tag": "V1R2C2-auto-recovery-baseline",
"source": "AIOS_V1R1C0_MULTIUSER_GITOPS_CUSTOM_LLM_PROD_FULL_DEPLOY_20260706.zip",
"source_package": "AIOS_V1R1C0_MULTIUSER_GITOPS_CUSTOM_LLM_PROD_FULL_DEPLOY_20260706.zip",
"zip_update_mode": "deprecated",
@@ -46,7 +47,7 @@
"/api",
"/hook"
],
"updated_at": "2026-07-07T15:40:00Z",
"updated_at": "2026-07-07T19:45:00Z",
"auth": {
"primary_domain": "https://auth.cnnetmkt.top",
"backup_domain": "https://auth.h.imruyi.top:8443",
+9
View File
@@ -0,0 +1,9 @@
{
"id": "patch-1783433013045-956730c5",
"patch_name": "alias-test-patch",
"branch": "patch/alias-test-patch",
"risk": "medium",
"description": "test create-patch alias",
"created_by": "chatgpt-gitops-bot",
"created_at": "2026-07-07T14:03:33Z"
}
@@ -0,0 +1,91 @@
# V1R2C2 自动恢复链路验收测试报告
## 基本信息
- **版本**: V1R2C2
- **测试时间**: 2026-07-07
- **测试范围**: Action Monitor → Error Classifier → Failure Router → Recovery Controller
- **测试方式**:
1. 单元测试(模块级):验证各模块独立功能
2. 集成测试(管线级):验证完整闭环
3. API 端到端测试(HTTP 级):验证 REST API 集成
## 测试结果
### 1. Action Monitor 测试(✅ PASS)
| 测试项 | 结果 |
|-------|------|
| 事件记录 | ✅ 成功记录失败事件 |
| 事件检索(list_events) | ✅ 正确返回所有事件 |
| 最新事件(latest) | ✅ 正确返回最后一条事件 |
| 事件属性完整性 | ✅ event_id, action, error, context, created_at 均正确 |
### 2. Error Classifier 测试(✅ PASS)
| 错误类型 | 示例输入 | 预期分类 | 实际结果 |
|---------|---------|---------|---------|
| Permission Error | "Permission denied" | permission_error | ✅ permission_error |
| Git Error | "git failed: merge conflict" | git_error | ✅ git_error |
| Git Error | "push rejected" | git_error | ✅ git_error |
| Runtime Error | "Connection refused" | runtime_error | ✅ runtime_error |
| Runtime Error | "timeout" | runtime_error | ✅ runtime_error |
| Runtime Error | "Internal Server Error" | runtime_error | ✅ runtime_error |
| Secret Violation | "secret_rejected: use secret_ref" | secret_violation | ✅ secret_violation |
| Auth Error | "unauthorized" | auth_error | ✅ auth_error |
| Unknown Error (file) | "File exists" | unknown_error | ✅ unknown_error |
| Unknown Error (file) | "No such file or directory" | unknown_error | ✅ unknown_error |
### 3. Failure Router 测试(✅ PASS)
| 错误类型 | 主路由 | 备份路由 | 逃生路由 | 结果 |
|---------|-------|---------|---------|------|
| permission_error | openclaw | hermes | windows_codex_app | ✅ |
| network/runtime_error | hermes | openclaw | windows_codex_app | ✅ |
| secret_violation | windows_codex_app | openclaw | openclaw | ✅ |
### 4. Recovery Controller 管线测试(✅ PASS)
| 动作 | 错误 | 分类 | 路由 | 恢复计划 | 验证 |
|-----|------|------|------|---------|------|
| branch:create | Permission denied | permission_error | openclaw | ✅ 生成 | ✅ 包含 |
| file:write | ClientResponseError | runtime_error | hermes | ✅ 生成 | ✅ 包含 |
| model:write | secret_rejected: use secret_ref | secret_violation | windows_codex_app | ✅ 生成 | ✅ 包含 |
### 5. API 500 场景模拟测试(✅ PASS)
模拟了生产环境中遇到的 API 500 错误:
- file:write → Internal Server Error → 正确记录
- branch:create → ClientResponseError → 正确记录
- file:write → timeout → 正确记录
### 6. 编译验证(✅ PASS)
三个核心模块和测试代码编译通过,无语法错误。
## 执行覆盖
```
测试代码:runtime/agent-os/orchestrator/integration_test_v1r2c2.py
被测模块:runtime/agent-os/orchestrator/action_monitor.py
runtime/agent-os/orchestrator/error_classifier.py
runtime/agent-os/orchestrator/failure_router.py
runtime/agent-os/orchestrator/recovery_controller.py
API 集成: active-runtime/app/aios_chatgpt_actions_api.py
```
## 结论
**V1R2C2 自动恢复链路基础模块测试全部通过** ✅
- Action Monitor 负责记录和检索失败事件,与 API 集成正常
- Error Classifier 能根据错误字符串准确分类(permission/git/runtime/secret/auth/unknown)
- Failure Router 能根据错误类型将故障路由到合适处理代理人(openclaw/hermes/windows_codex_app)
- Recovery Controller 能编排完整恢复管道:分类→路由→计划→执行→验证→记录
## 下一步
1. 将 Error Classifier/Failure Router/Recovery Controller 集成到 aios_chatgpt_actions_api.py 的 do_POST 错误处理路径中
2. 添加 GitOps 提交和版本标记
3. 微信通知 Owner 报告
4. 虾马一体进展汇报