From b901b4ea467020fbe2c7cf9422809cc73085da13 Mon Sep 17 00:00:00 2001 From: ubuntu Date: Tue, 19 May 2026 12:08:19 +0800 Subject: [PATCH] Sync agent state from VPS at 2026-05-19 12:08:19 --- docs/G2_RUNBOOK.md | 130 +++++++++++++++++++++++++--- sync-state/heartbeat-vps.json | 6 +- tasks/T10-G2-VPS-pairing-approve.md | 14 ++- tasks/T9-G2-PC-node-run.md | 8 ++ 4 files changed, 142 insertions(+), 16 deletions(-) diff --git a/docs/G2_RUNBOOK.md b/docs/G2_RUNBOOK.md index b6eeb6e..2bb9fab 100644 --- a/docs/G2_RUNBOOK.md +++ b/docs/G2_RUNBOOK.md @@ -1,10 +1,23 @@ -# G2 Runbook - Gateway/Node Pairing Preparation +# G2 Runbook - Gateway/Node Pairing Pre-Execution Plan ## Status -Draft for user authorization. G2 execution is not open yet. +Pre-execution plan confirmed. G2 execution is not authorized and must not start from this document alone. -This runbook is an execution-before-action checklist. It may be used only after the user explicitly authorizes G2. It does not authorize token injection, `openclaw node run`, VPS approval, service changes, Nginx changes, Docker changes, or any mutation by itself. +This runbook is a planning and authorization checklist. It may be used only after the user explicitly authorizes G2 execution in a later instruction. It does not authorize token injection, `openclaw node run`, VPS approval, service changes, Nginx changes, Docker changes, or any mutation by itself. + +## Non-Execution Confirmation + +This planning pass must update only documentation and task files. + +Forbidden in this planning pass: + +- Do not execute any PC command. +- Do not execute any VPS command. +- Do not start a PC node. +- Do not approve a node or device. +- Do not read, print, store, or rotate secrets. +- Do not change Gateway, Docker, Nginx, service, firewall, route, bind mount, image, or public website state. ## Sources Reviewed @@ -18,6 +31,9 @@ This runbook is an execution-before-action checklist. It may be used only after - `sync-state/heartbeat-pc.json` - `sync-state/heartbeat-vps.json` - `sync-state/README.md` +- `tasks/T9-G2-PC-node-run.md` +- `tasks/T10-G2-VPS-pairing-approve.md` +- Role handoffs for PC_EXECUTOR, VPS_EXECUTOR, PC_VERIFIER, VPS_VERIFIER, and CORRECTION ## G2 Goal @@ -32,10 +48,11 @@ G2 does not install a persistent service. G4 covers persistence later. ## Current Baseline - G0A, G0B, and G1 are complete in `AGENT_BOARD.md`. +- Sync-health has been confirmed healthy by the user and T7 sync-health blocked state is cleared. - PC baseline shows OpenClaw CLI `OpenClaw 2026.5.7 (eeef486)`, `openclaw node --help` availability, Tailscale availability, outbound TCP 443 success to `openclaw.smartmotor.cloud`, and no PC OpenClaw public port exposure. - VPS baseline shows `openclaw-gateway` running healthy in Docker on `services_appnet`, with Gateway CLI available inside the `openclaw-gateway` container. - VPS verifier accepted G1 with follow-up observations about `/opt/service` versus `/opt/services`, `docker-composite.yml` versus `docker-compose.openclaw.yml`, and the Nginx route/config anomaly. -- Sync-state files exist for PC and VPS. PC heartbeat currently reports `dirty`; this is expected while control-plane documents are being edited, but CORRECTION must re-check sync health before any G2 execution. +- Before actual G2 execution, CORRECTION must still do a final freshness check: both heartbeat files must exist, both must be under 5 minutes old, and no `sync-state/error-*.md` may exist. ## Actions Requiring Explicit User Authorization @@ -45,11 +62,19 @@ These actions must not be performed unless the user explicitly authorizes G2 exe - Running `openclaw node run`. - Reading or using any real token, password, API key, private key, cookie, or secret value. - Approving a device pairing request on the VPS. -- Running `openclaw nodes pending` or `openclaw nodes approve` if it changes approval state. +- Running Gateway-side pairing commands against live state, including `openclaw devices approve`, `openclaw nodes pending`, or `openclaw nodes approve`. - Starting G3 smoke test from QQ or phone Control UI. - Installing, starting, restarting, stopping, or persisting any PC/VPS service. - Changing firewall, network, Nginx, Docker compose, bind mounts, container images, environment variables, or service state. +Authorization must be explicit at these points: + +- A0: User authorizes G2 execution to begin. +- A1: User authorizes local PC session token use. +- A2: User authorizes foreground PC node run. +- A3: User authorizes VPS-side approval for a specific non-secret request or node ID. +- A4: Verifiers authorize marking G2 evidence accepted. Executors must not self-accept. + ## Secret Handling Rules - Never write token/password/API key/private key/cookie values into files, evidence, logs, commits, or chat. @@ -58,6 +83,7 @@ These actions must not be performed unless the user explicitly authorizes G2 exe - Evidence may say that a token was set locally, but must not include its value. - Pairing request IDs may be recorded only if they are not secrets. - If a command prints a secret or prompts to display one, stop and record a blocker without copying the value. +- If a command requires a token/password flag, do not place the value in the command line. Prefer local session environment or interactive user entry that is not captured in evidence. ## smartmotor.cloud Freeze Rules @@ -81,7 +107,7 @@ Scope: Windows PC only. Planned G2 task: -- Confirm no stale OpenClaw node process is running. +- Confirm no stale OpenClaw node process is running only after G2 execution is authorized. - After explicit user authorization, set the Gateway token only in the local shell/session. - Run the node in foreground mode. - Capture non-secret evidence of connection and pairing request ID if shown. @@ -93,13 +119,34 @@ May write: - `handoff/PC_EXECUTOR.md` - `rollback/pc-g2-node-run-YYYYMMDD.md` +Command drafts, not for this planning pass: + +```powershell +$env:OPENCLAW_GATEWAY_TOKEN = "" +openclaw node run --host openclaw.smartmotor.cloud --port 443 --tls --display-name "desktop-vuor0gs" +``` + +PC_EXECUTOR authorization points: + +- A0 before any G2 work. +- A1 before token use. +- A2 before `openclaw node run`. + +PC_EXECUTOR stop conditions: + +- User authorization is absent or ambiguous. +- Token would be printed, stored, logged, committed, or pasted into chat. +- Command asks to install, start, restart, stop, or persist a service. +- Command attempts firewall, network, scheduled task, environment persistence, or public port changes. +- Gateway host, display name, or command shape differs from the runbook without ORCHESTRATOR review. + ### VPS_EXECUTOR Scope: VPS Gateway approval only. Planned G2 task: -- Confirm Gateway-side CLI command shape using `--help` if needed. +- Confirm Gateway-side CLI command shape using `--help` if needed, only after G2 execution is authorized. - After explicit user authorization and after PC evidence provides a pairing request ID or pending node ID, approve the correct request. - Capture non-secret approval evidence. - Do not restart/reload services or change Gateway/Nginx/Docker configuration. @@ -110,6 +157,25 @@ May write: - `handoff/VPS_EXECUTOR.md` - `rollback/vps-g2-approve-YYYYMMDD.md` +Command drafts, not for this planning pass: + +```bash +docker exec openclaw-gateway node openclaw.mjs nodes pending +docker exec openclaw-gateway node openclaw.mjs devices approve +docker exec openclaw-gateway node openclaw.mjs nodes approve +``` + +VPS_EXECUTOR authorization points: + +- A0 before any G2 work. +- A3 before approving a specific request or node ID. + +VPS_EXECUTOR stop conditions: + +- Request identity is ambiguous or multiple indistinguishable pending requests exist. +- Approval would require token/password entry, token rotation, Gateway config mutation, restart, reload, Nginx edit, Docker edit, bind mount change, image change, or public website change. +- Approval target cannot be tied to PC evidence and display name. + ### PC_VERIFIER Scope: Independent validation of PC-side G2 evidence. @@ -126,6 +192,18 @@ May write: - `evidence/verify-pc-g2-YYYYMMDD.md` - `handoff/PC_VERIFIER.md` +Verification draft: + +```text +Review PC evidence only. Do not run PC commands unless a later user instruction explicitly authorizes verifier-side read-only checks. +``` + +PC_VERIFIER stop conditions: + +- PC evidence is missing, incomplete, or not synchronized. +- Evidence contains a secret. +- Evidence suggests service persistence, firewall/network change, public port exposure, or a command outside the runbook. + ### VPS_VERIFIER Scope: Independent validation of VPS-side G2 evidence and freeze compliance. @@ -142,6 +220,19 @@ May write: - `evidence/verify-vps-g2-YYYYMMDD.md` - `handoff/VPS_VERIFIER.md` +Verification draft: + +```text +Review VPS evidence only. Do not run VPS commands unless a later user instruction explicitly authorizes verifier-side read-only checks. +``` + +VPS_VERIFIER stop conditions: + +- VPS evidence is missing, incomplete, or not synchronized. +- Evidence contains a secret. +- Approval cannot be tied to the intended PC node. +- Evidence suggests restart, reload, token rotation, Gateway config mutation, Nginx edit, Docker edit, bind mount change, image change, or frozen website output change. + ### CORRECTION Scope: Guardrails and drift detection. @@ -158,6 +249,21 @@ May write: - `handoff/CORRECTION.md` - `tasks/T7-correction-monitor.md` +Monitoring draft: + +```text +Review sync-state files and task/evidence visibility only. Do not execute PC/VPS operational commands in this planning pass. +``` + +CORRECTION stop conditions: + +- Either heartbeat is missing or older than 5 minutes. +- Any `sync-state/error-*.md` file exists. +- Either side has a persistent Git state that prevents evidence visibility. +- Any role attempts to execute G2 without explicit authorization. +- Any evidence or handoff contains a secret. +- Any task attempts to bypass the filing freeze. + ## Step Plan ### Step 0 - ORCHESTRATOR Authorization Check @@ -299,9 +405,9 @@ Prerequisites: Command drafts: ```bash -docker exec -it openclaw-gateway node openclaw.mjs devices approve -docker exec -it openclaw-gateway node openclaw.mjs nodes pending -docker exec -it openclaw-gateway node openclaw.mjs nodes approve +docker exec openclaw-gateway node openclaw.mjs nodes pending +docker exec openclaw-gateway node openclaw.mjs devices approve +docker exec openclaw-gateway node openclaw.mjs nodes approve ``` Expected output: @@ -390,3 +496,7 @@ Verifier evidence should include: Yes, but only as a request for explicit user authorization, not as execution. The baseline evidence is sufficient to ask the user whether to open G2. The next user-facing question should be: "Authorize G2 execution now?" If the user says yes, ORCHESTRATOR must first open the draft tasks, require rollback notes, and keep each token/run/approval action behind the explicit authorization boundaries in this runbook. + +## Planning-Pass Completion + +This runbook update is documentation-only. It confirms G2 is ready for an authorization decision, but G2 remains unexecuted until a later explicit user instruction opens execution. diff --git a/sync-state/heartbeat-vps.json b/sync-state/heartbeat-vps.json index 93ea5bc..7aff91f 100644 --- a/sync-state/heartbeat-vps.json +++ b/sync-state/heartbeat-vps.json @@ -1,9 +1,9 @@ { "host": "vps", - "time": "2026-05-19T12:07:18+0800", + "time": "2026-05-19T12:08:19+0800", "branch": "main", - "head": "937707f", - "status": "clean", + "head": "31f2939", + "status": "dirty", "intervalSeconds": 30, "heartbeatEverySeconds": 60 } diff --git a/tasks/T10-G2-VPS-pairing-approve.md b/tasks/T10-G2-VPS-pairing-approve.md index dcb6393..55382c5 100644 --- a/tasks/T10-G2-VPS-pairing-approve.md +++ b/tasks/T10-G2-VPS-pairing-approve.md @@ -20,6 +20,13 @@ Approve the intended PC node/device pairing on the VPS Gateway side. This task does not authorize service restarts, reloads, token rotation, Gateway configuration changes, Nginx changes, Docker compose edits, bind mount changes, image changes, or public website changes. +## Planning Status + +- G2 pre-execution plan is documented in `docs/G2_RUNBOOK.md`. +- Sync-health has been confirmed healthy and T7 sync-health blocked state is cleared. +- This task remains `draft` because G2 execution and VPS-side approval have not been explicitly authorized. +- Planning confirmation does not authorize `nodes pending`, `devices approve`, `nodes approve`, service restarts/reloads, token rotation, Gateway config mutation, Nginx changes, Docker changes, or frozen website changes. + ## Required Evidence - `rollback/vps-g2-approve-YYYYMMDD.md` written before approval action. @@ -35,9 +42,9 @@ This task does not authorize service restarts, reloads, token rotation, Gateway Do not run these until G2 approval is explicitly authorized. ```bash -docker exec -it openclaw-gateway node openclaw.mjs devices approve -docker exec -it openclaw-gateway node openclaw.mjs nodes pending -docker exec -it openclaw-gateway node openclaw.mjs nodes approve +docker exec openclaw-gateway node openclaw.mjs nodes pending +docker exec openclaw-gateway node openclaw.mjs devices approve +docker exec openclaw-gateway node openclaw.mjs nodes approve ``` ## Expected Output @@ -49,6 +56,7 @@ docker exec -it openclaw-gateway node openclaw.mjs nodes approve ## Stop Conditions - User authorization is absent or ambiguous. +- `docs/G2_RUNBOOK.md` has not been read by VPS_EXECUTOR. - Request identity is ambiguous or multiple indistinguishable pending requests exist. - A command asks for or prints a token/password. - Approval would require restart, reload, token rotation, config mutation, Nginx changes, Docker changes, or any action that could affect frozen `smartmotor.cloud` website output. diff --git a/tasks/T9-G2-PC-node-run.md b/tasks/T9-G2-PC-node-run.md index 434844b..b9a12e3 100644 --- a/tasks/T9-G2-PC-node-run.md +++ b/tasks/T9-G2-PC-node-run.md @@ -22,6 +22,13 @@ Prepare and run the Windows PC OpenClaw node in foreground mode for Gateway pair This task is not ready until ORCHESTRATOR records explicit user authorization for G2. It does not authorize service installation, startup persistence, firewall changes, network changes, or any public port exposure. +## Planning Status + +- G2 pre-execution plan is documented in `docs/G2_RUNBOOK.md`. +- Sync-health has been confirmed healthy and T7 sync-health blocked state is cleared. +- This task remains `draft` because G2 execution has not been explicitly authorized. +- Planning confirmation does not authorize token use, `openclaw node run`, service changes, firewall changes, network changes, or public port exposure. + ## Required Evidence - `rollback/pc-g2-node-run-YYYYMMDD.md` written before token or node-run action. @@ -51,6 +58,7 @@ openclaw node run --host openclaw.smartmotor.cloud --port 443 --tls --display-na ## Stop Conditions - User authorization is absent or ambiguous. +- `docs/G2_RUNBOOK.md` has not been read by PC_EXECUTOR. - Any command asks to print, persist, or store a token. - Any command prints a secret. - Any step requires PC service install/start, scheduled task changes, firewall changes, network changes, or public port exposure.