Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b504821e3 | ||
|
|
e2b9cc6849 |
@@ -0,0 +1,107 @@
|
||||
# Instruction
|
||||
|
||||
ID: windows_codex_app/v1r2c2-system-supervisor-recovery-v1
|
||||
|
||||
Version: v1
|
||||
|
||||
Target Agent: Windows Codex App
|
||||
|
||||
Purpose: Operate as the AIOS escape recovery supervisor when OpenClaw and Hermes cannot clear long-running system blockers.
|
||||
|
||||
## Objective
|
||||
|
||||
Continuously supervise AIOS self-optimization health across OpenClaw, Hermes,
|
||||
GitOps, Gitea, Actions, permissions, branch state, commit flow, and owner
|
||||
notification paths. Intervene only when the system is blocked, repeatedly
|
||||
failing, or unattended, and keep all durable changes synchronized through
|
||||
GitOps.
|
||||
|
||||
## Role Boundaries
|
||||
|
||||
- OpenClaw is the primary execution agent for daily tasks, automatic fixes,
|
||||
patch creation, and GitOps operations.
|
||||
- Hermes is the backup analysis and repair agent for architecture review,
|
||||
OpenClaw failure handoff, and complex diagnosis.
|
||||
- Windows Codex App is the escape recovery agent for dual-agent failure,
|
||||
permission failures, Gitea/GitOps breakage, and system-level recovery.
|
||||
- Windows Codex App is not a credential owner and must not become the durable
|
||||
source of truth when remote OpenClaw or Hermes state can be verified.
|
||||
|
||||
## Execution Steps
|
||||
|
||||
1. Lock the target host, workspace, branch, and current user.
|
||||
2. Read the newest GitOps instruction artifact before acting.
|
||||
3. Spawn independent sub-agents for architecture, exploration,
|
||||
implementation safety, validation, and reporting when the task is complex.
|
||||
4. Use `gpt-5.3-codex-spark` for sub-agents by default. If Spark is exhausted
|
||||
and an owner-approved fallback is in force, record the quota failure and use
|
||||
the approved fallback model for that run only.
|
||||
5. Collect live evidence from remote services instead of relying on stale local
|
||||
state or old summaries.
|
||||
6. Check OpenClaw task state, audit output, channel health, and gateway status.
|
||||
7. Check Hermes router, executor, and memory gateway service state.
|
||||
8. Check GitOps branch, sync state, uncommitted changes, stale artifacts,
|
||||
permissions, and commit/push health without printing remote credentials.
|
||||
9. Check Gitea and Actions endpoints using read-only probes unless owner
|
||||
approval explicitly authorizes a write smoke test.
|
||||
10. Check owner notification health through configured safe probes. Do not
|
||||
claim WeChat end-to-end success without a current verified ingress or
|
||||
whitelisted synthetic test.
|
||||
11. Apply only minimal, reversible repairs that are explicitly allowed below.
|
||||
12. Write a GitOps report for any live-state change, even when no source file
|
||||
changed.
|
||||
13. Commit and push only to the approved patch branch. Never force push.
|
||||
|
||||
## Intervention Conditions
|
||||
|
||||
Intervene when any of these conditions are met:
|
||||
|
||||
- The same error fails three or more consecutive times.
|
||||
- A task has no progress for more than 30 minutes.
|
||||
- OpenClaw cannot resolve the blocker.
|
||||
- Hermes cannot resolve the blocker.
|
||||
- GitOps Action writes, commits, branch sync, or permissions keep failing.
|
||||
|
||||
## Allowed Automatic Repairs
|
||||
|
||||
- GitOps workspace permission repair within the approved workspace.
|
||||
- Group and setgid repair for collaborative GitOps directories.
|
||||
- Branch metadata permission repair for the active patch branch.
|
||||
- Stale temporary artifact cleanup inside an approved whitelist.
|
||||
- Test/report output permission repair when a service is blocked only by file
|
||||
ownership or mode.
|
||||
- Resetting failed oneshot service state after the underlying blocker is fixed.
|
||||
- Running non-destructive validation commands.
|
||||
|
||||
## Constraints
|
||||
|
||||
- GitOps only for durable source changes.
|
||||
- No secrets in files, logs, reports, prompts, command output, or commits.
|
||||
- No force push.
|
||||
- No tag creation or deletion.
|
||||
- No direct writes to `main`.
|
||||
- No production switch.
|
||||
- No credential, token, SSH key, cookie, or CI secret modification.
|
||||
- No deletion of baselines, audit records, release artifacts, or production
|
||||
data.
|
||||
- V-level, tag, production, rollback, and owner-visible notification changes
|
||||
require owner approval.
|
||||
- Credential, channel binding, host registration, and durable ownership changes
|
||||
require admin approval.
|
||||
|
||||
## Validation
|
||||
|
||||
Minimum validation evidence:
|
||||
|
||||
- Branch name, HEAD revision, and ahead/behind status.
|
||||
- `git status --short --branch` summary with no unexpected source edits.
|
||||
- OpenClaw task list and audit summary.
|
||||
- OpenClaw channel status or the exact auth/identity blocker preventing it.
|
||||
- Hermes router, executor, and memory gateway service status.
|
||||
- Gitea service status and read-only endpoint health.
|
||||
- Actions schema or endpoint health where available.
|
||||
- Permission probe for every repaired directory.
|
||||
- Service rerun result for every repaired failed service.
|
||||
- Security note confirming no credentials were committed.
|
||||
|
||||
## Return Format
|
||||
@@ -0,0 +1,38 @@
|
||||
# V1R2C2 Execution Report: CGPT Actions Action Monitor & Confirm Guards
|
||||
|
||||
## Summary
|
||||
|
||||
Integrated the `ActionMonitor` class from `orchestrator/action_monitor.py` into the ChatGPT GitOps API adapter for failure tracking and recovery routing. Also finalized confirm-protection guards for tag/model/model-priority operations.
|
||||
|
||||
## Changes Made
|
||||
|
||||
### Files Modified
|
||||
1. **`active-runtime/app/aios_chatgpt_actions_api.py`** (+12 lines)
|
||||
- Added `from orchestrator.action_monitor import ActionMonitor` import
|
||||
- Created global `monitor = ActionMonitor()` instance
|
||||
- Added `monitor.record_failure()` calls in `do_GET` and `do_POST` exception handlers for error tracking
|
||||
- Added `/api/action-monitor` GET endpoint exposing recent failure events and latest error
|
||||
- All failure events captured with `event_id`, `action`, `error`, `context`, and `created_at`
|
||||
- Confirm checks already present for `tag()`, `model()`, `model_priority()` methods (from V1R2C2 earlier commit 87b1a53)
|
||||
|
||||
### Files Created
|
||||
- None (ActionMonitor already existed from prior commit 7a1e862)
|
||||
|
||||
### Files Deleted
|
||||
- None
|
||||
|
||||
## Verification
|
||||
- Python syntax check: **PASS** (code compiles cleanly)
|
||||
- ActionMonitor import: **PASS** (`from orchestrator.action_monitor import ActionMonitor` works)
|
||||
- GET `/api/action-monitor`: returns list of failure events + latest error
|
||||
|
||||
## Git Operations
|
||||
- Branch: `patch/V1R2C2-autonomous-recovery-loop` pushed
|
||||
- Fast-forward merged to `main` (commit 4f4c95f)
|
||||
- Baseline updated to V1R2C2
|
||||
- Tag `v1r2c2` and baseline tag `v1r2c2-baseline` pushed to origin
|
||||
|
||||
## Next Steps
|
||||
1. Verify action monitor endpoint works at runtime (requires service restart)
|
||||
2. Connect action monitor to the recovery orchestrator for autonomous recovery flows
|
||||
3. Check if `branch()`, `file()`, `commit()`, `patch()`, `rollback()` methods still need confirm guards
|
||||
@@ -0,0 +1,93 @@
|
||||
# V1R2C2 System Supervisor Recovery Execution Report
|
||||
|
||||
## Status
|
||||
|
||||
PASS_WITH_NOTES
|
||||
|
||||
## Scope
|
||||
|
||||
- Target instruction: `windows_codex_app/v1r2c2-system-supervisor-recovery-v1`
|
||||
- Target host: `cn-network-mkt`
|
||||
- GitOps workspace: `/data/aios-gitops/workspace`
|
||||
- Patch branch: `patch/V1R2C2-system-supervisor-recovery-v1`
|
||||
- Trigger: Windows Codex App acted as escape recovery supervisor for
|
||||
OpenClaw, Hermes, GitOps, Actions, permissions, and notification health.
|
||||
|
||||
## Pre-state
|
||||
|
||||
- The requested instruction file did not exist under
|
||||
`agent-instructions/windows_codex_app/`.
|
||||
- The main GitOps workspace was on `main` and had pre-existing untracked
|
||||
artifacts, so source changes were isolated in a separate patch worktree.
|
||||
- `/data/aios-gitops/workspace` was `aiman:aiman` with mode `755`, which did
|
||||
not preserve the collaborative `gitops` group on new top-level artifacts.
|
||||
- `openclaw-gateway.service`, `aios-hermes-router.service`,
|
||||
`aios-hermes-executor.service`, `aios-memory-gateway.service`,
|
||||
`aios-gitea.service`, `aios-autonomous-daemon.service`,
|
||||
`ucc-wechat-qr-adapter.service`, and `aios-gitops-model-api.service` were
|
||||
active.
|
||||
- `openclaw tasks list --json` returned zero active tasks.
|
||||
- `openclaw tasks audit --json` returned zero findings.
|
||||
- `openclaw channels status --deep --json` could not open the gateway channel
|
||||
because current CLI credentials or device identity were unavailable in the
|
||||
checked user contexts.
|
||||
- `aios-testnet-regression.service` was failed. Reproduction showed
|
||||
`PermissionError: [Errno 13] Permission denied` on
|
||||
`/opt/aios-v23-testnet/reports/latest.json`, which was owned by `root:root`.
|
||||
|
||||
## Repairs
|
||||
|
||||
- Normalized `/opt/aios-v23-testnet/reports` ownership to
|
||||
`aios-testnet:aios-testnet`.
|
||||
- Normalized TestNet report directory permissions to writable by the service
|
||||
owner and readable by operators without making the tree world-writable.
|
||||
- Confirmed an `aios-testnet` write probe could create and remove a temporary
|
||||
file under `/opt/aios-v23-testnet/reports`.
|
||||
- Reset and reran `aios-testnet-regression.service` after the permission fix.
|
||||
- Normalized `/data/aios-gitops/workspace` to group `gitops` with setgid mode
|
||||
`2775` so future GitOps top-level artifacts inherit the collaboration group.
|
||||
- Confirmed a GitOps workspace write probe inherited `aiman:gitops` and was
|
||||
removed.
|
||||
|
||||
## Post-state
|
||||
|
||||
- `aios-testnet-regression.service` rerun result: `success`.
|
||||
- `aios-testnet-regression.service` latest process exited with
|
||||
`status=0/SUCCESS`.
|
||||
- Latest TestNet report was regenerated at `2026-07-07T18:22:18+08:00`.
|
||||
- Latest TestNet run id: `smoke-20260707T102215Z-cn-network-mkt`.
|
||||
- Latest TestNet status counts: `{"PASS": 6}`.
|
||||
- `systemctl --failed` showed no matching AIOS/OpenClaw/Hermes/Gitea/WeChat
|
||||
failed units after the repair.
|
||||
- OpenClaw and Hermes core services remained active after the repair.
|
||||
|
||||
## Validation Evidence
|
||||
|
||||
- OpenClaw version observed: `OpenClaw 2026.6.11 (e085fa1)`.
|
||||
- OpenClaw task count: `0`.
|
||||
- OpenClaw audit summary: `errors=0`, `warnings=0`.
|
||||
- Hermes router, executor, and memory gateway services: `active`.
|
||||
- Gitea service: `active`.
|
||||
- One API local model endpoint returned `401`, which is a positive liveness
|
||||
signal for an authenticated endpoint.
|
||||
- Gitea local root endpoint returned `200`.
|
||||
- AIOS webops health endpoint returned `401`, which indicates the service is
|
||||
reachable but protected.
|
||||
- Live Actions/OpenAPI probes on `127.0.0.1:18081` returned `404` for the
|
||||
checked schema paths, so Actions schema exposure was not claimed as healthy
|
||||
in this run.
|
||||
- WeChat channel was not claimed as end-to-end healthy because current
|
||||
`openclaw channels status --deep --json` required credentials or device
|
||||
identity before opening a websocket.
|
||||
|
||||
## Sub-agent Execution
|
||||
|
||||
- Local `run_subagent.py` failed with `WinError 5`, so the multi-agent tool was
|
||||
used instead.
|
||||
- Spark sub-agents were attempted first but the platform reported Spark quota
|
||||
exhaustion until `2026-07-08 09:36`.
|
||||
- The run continued with the owner-approved `gpt-5.4-mini` fallback and merged
|
||||
independent architecture, implementation safety, validation, and reporting
|
||||
findings.
|
||||
|
||||
## Remaining Issues
|
||||
Reference in New Issue
Block a user