- Integrate ActionMonitor into ChatGPT GitOps API for failure tracking - Add ErrorClassifier with permission, git, runtime, system, secret violation error types - Add FailureRouter to route errors to correct recovery agents (openclaw/hermes/windows_codex_app) - Add RecoveryController orchestrating full pipeline: capture→classify→route→plan→execute→validate→record - Update error_classifier to include ClientResponseError, rate limit, and secret_violation patterns - All 8 integration tests passing (ActionMonitor, ErrorClassifier, FailureRouter, RecoveryController, API 500 scenario) - Push baseline to V1R2C2 with tag v1r2c2-baseline
155 lines
4.8 KiB
Markdown
155 lines
4.8 KiB
Markdown
# OpenClaw 指令:AIOS Autonomous GitOps 静默优化与部署监督
|
||
|
||
Directive ID: `OPENCLAW-AIOS-AUTONOMOUS-GITOPS-DEPLOY-20260707`
|
||
|
||
Branch: `patch/web-ui-complete-gitops-dashboard-20260706`
|
||
|
||
Base: `main`
|
||
|
||
Current baseline: `V1R1C4`
|
||
|
||
Proposed baseline after approved merge: `V1R1C5`
|
||
|
||
## 1. 执行目的
|
||
|
||
OpenClaw 负责接管本分支的执行与监督,目标是在不影响现有执行层、不破坏用户使用体验的前提下,完成 AIOS Autonomous GitOps Runtime 的验证、静默优化、部署准备、Owner 通报与合并候选推进。
|
||
|
||
本次改动的目标不是直接绕过 main 保护,而是让系统形成:
|
||
|
||
- 自动 CI 验证;
|
||
- Codex 自愈修复;
|
||
- event bus + daemon 自动执行;
|
||
- 微信/网页 Owner 审计与操作通道;
|
||
- V1R1C5 基线提案;
|
||
- 失败回流自定义 GPT 修复;
|
||
- 通过后生成 merge candidate。
|
||
|
||
## 2. OpenClaw 角色
|
||
|
||
OpenClaw 是本任务的执行监督代理,职责如下:
|
||
|
||
1. 读取并监督当前分支与 main 的差异。
|
||
2. 按验收测试执行静态验证、安全验证、策略验证、灰度验证。
|
||
3. 发现失败后,生成结构化 failure report。
|
||
4. 将失败项交给自定义 GPT 继续修复同一 patch 分支。
|
||
5. 修复后重复验证,直到 PASS 或触发 hard block。
|
||
6. 生成 merge candidate,但不得直接绕过 main 保护。
|
||
7. 监督 Owner 通知记录:每个 main 版本变更必须有摘要通报与 Web UI 记录。
|
||
|
||
## 3. 禁止事项
|
||
|
||
OpenClaw 不得执行以下操作:
|
||
|
||
- 不得直接 force push;
|
||
- 不得删除版本历史、tag、audit 记录;
|
||
- 不得写入真实凭据;
|
||
- 不得关闭 auth、Gitea 登录保护或 owner sync;
|
||
- 不得在未通过验收前合并 main;
|
||
- 不得在未有审批或预授权 runbook 前执行生产 tag、baseline activation 或 rollback execution。
|
||
|
||
## 4. 必须执行的命令
|
||
|
||
```bash
|
||
git fetch --all --prune
|
||
git checkout patch/web-ui-complete-gitops-dashboard-20260706
|
||
git diff --stat main...HEAD
|
||
bash scripts/validate-gitops-platform-ui.sh patch/web-ui-complete-gitops-dashboard-20260706 main
|
||
bash scripts/autonomous-merge-gate.sh patch/web-ui-complete-gitops-dashboard-20260706 main
|
||
```
|
||
|
||
若部署验证需要启动本地 runtime:
|
||
|
||
```bash
|
||
bash deploy/install/install.sh
|
||
python3 services/aios-autonomous-daemon/daemon.py emit --type patch_created --branch patch/web-ui-complete-gitops-dashboard-20260706 --base main
|
||
python3 services/aios-autonomous-daemon/daemon.py run --once
|
||
```
|
||
|
||
## 5. 必须验证的直接修改
|
||
|
||
OpenClaw 必须检查以下路径:
|
||
|
||
- `overlays/user-control-center/portal/gitops-dashboard/`
|
||
- `services/aios-autonomous-daemon/`
|
||
- `services/aios-event-ingress/`
|
||
- `deploy/systemd/`
|
||
- `deploy/install/`
|
||
- `config/codex/`
|
||
- `scripts/`
|
||
- `tests/acceptance/`
|
||
- `versions/proposals/V1R1C5-gitops-platform-ui.proposed.json`
|
||
- `skills/`
|
||
- `docs/codex/`
|
||
|
||
## 6. 必须验证的间接影响
|
||
|
||
OpenClaw 必须确认以下内容未被破坏:
|
||
|
||
- `/api/base`、`/api/ver`、`/api/diff`、`/api/patch`、`/api/model`、`/api/run`;
|
||
- `/base`、`/ver`、`/diff`、`/patch`、`/model`、`/run` 登录保护;
|
||
- Portal 登录入口 `/portal/me/#gitops`;
|
||
- Gitea require sign-in view;
|
||
- owner password sync;
|
||
- active baseline 仍为 `V1R1C4`,未提前激活 `V1R1C5`。
|
||
|
||
## 7. Owner 通报要求
|
||
|
||
每个 main 版本变更、merge candidate、validation failure、rollback request、approval required 事件都必须形成:
|
||
|
||
1. Owner 消息摘要;
|
||
2. Web UI 审计记录;
|
||
3. 可追踪 event_id;
|
||
4. 变更功能摘要;
|
||
5. 代码量与配置量统计;
|
||
6. 与上一次主线变化的间隔;
|
||
7. 测试状态;
|
||
8. rollback target。
|
||
|
||
## 8. OpenClaw 进度监督格式
|
||
|
||
OpenClaw 每次监督输出必须包含:
|
||
|
||
```text
|
||
Status: PASS / FAIL / BLOCKED / RUNNING
|
||
Branch: patch/web-ui-complete-gitops-dashboard-20260706
|
||
Base: main
|
||
Current Rev: <rev>
|
||
Validation: <summary>
|
||
Gray Test: <summary>
|
||
Owner Notice: <summary>
|
||
Merge Candidate: yes/no
|
||
Blocked Reason: <reason or none>
|
||
Next Action: <action>
|
||
```
|
||
|
||
## 9. 失败回流规则
|
||
|
||
若失败,OpenClaw 必须写入 failure report:
|
||
|
||
- 路径:`reports/openclaw/failure-<event_id>.json`
|
||
- 内容:失败测试 ID、文件路径、失败原因、建议修复、是否阻断合并。
|
||
|
||
随后将问题交给自定义 GPT 修改当前 patch 分支,修复后重新执行完整验收。
|
||
|
||
## 10. 合并前门禁
|
||
|
||
只有全部满足以下条件,OpenClaw 才能标记为 `merge_candidate_ready`:
|
||
|
||
- required acceptance tests 全部 PASS;
|
||
- 无凭据泄露;
|
||
- 无 direct main write;
|
||
- 无高风险未审批动作;
|
||
- 灰度验证 PASS;
|
||
- Owner 通报与 Web UI 记录正常;
|
||
- `V1R1C5` baseline proposal 存在且未提前激活。
|
||
|
||
## 11. 最终输出
|
||
|
||
OpenClaw 最终应生成:
|
||
|
||
- `reports/openclaw/final-supervision-report.json`
|
||
- `reports/codex/merge-candidate.json`
|
||
- Owner 摘要事件记录;
|
||
- Web UI audit record;
|
||
- 若失败则生成 failure report 并阻止合并。
|