4.0 KiB
4.0 KiB
Cases 00–05 Gateway Turn Stability Acceptance Implementation Plan
For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
Goal: 在本机 all-in-one 运行态中完成 docs/cases/00–05 的真实任务验收,修复发现的 Gateway Turn 稳定性缺口,并把全过程证据回写到 Case 06。
Architecture: 以 Case 06 的 App → Bridge → multi-session plugin → OpenClaw gateway 四层链路为主线。先验证安装与运行态,再以定向测试锁住取消、超时、断线与 pending 清理语义,最后通过真实 Bridge 请求执行五类任务并核对状态、Artifact、重复执行与失败收口。
Tech Stack: Flutter/Dart、Go、OpenClaw gateway、JSON-RPC/SSE、macOS launchd、GitHub Actions。
Task 1: Baseline and progress ledger
Files:
- Modify:
docs/cases/06-gateway-turn-stability-and-robustness.md - Create:
docs/plans/2026-06-27-cases-00-05-gateway-turn-acceptance.md
Steps:
- Capture branch, commit, dirty files, installed services,
/api/ping, gateway plugin provenance, and Case 00 prerequisites. - Add a timestamped execution ledger to Case 06 without storing API keys or auth tokens.
- Record each later command by outcome and evidence, not by secrets-bearing command line.
Task 2: Local all-in-one deployment
Files:
- Modify only when a reproducible installer/runtime defect is found; keep each fix in its owning repository.
- Modify:
docs/cases/06-gateway-turn-stability-and-robustness.md
Steps:
- Inspect the hosted bootstrap before execution and verify its final origin/redirect.
- Run the installer with
DEEPSEEK_API_KEY,NVIDIA_API_KEY, andOLLAMA_API_KEYsupplied only through the child-process environment. - Retry transient download/network failures with bounded backoff.
- Verify Bridge
/api/ping.commit, gateway port18789, plugin stable path/provenance, andxworkmate.session.preparebehavior.
Task 3: Gateway Turn regression implementation
Files:
- Modify:
lib/app/app_controller_desktop_runtime_helpers.dart - Modify:
lib/app/app_controller_desktop_thread_actions.dart - Test:
test/runtime/assistant_execution_target_test.dart - Test other runtime files only when the failure belongs there.
Steps:
- Add failing tests for bounded
ACP_HTTP_CONNECTION_CLOSEDpolling recovery and retry exhaustion. - Run the focused test and confirm the new assertion fails before implementation where practicable.
- Implement the smallest change that preserves pending during bounded retry and deterministically reaches terminal state after exhaustion.
- Run
flutter test test/runtime/assistant_execution_target_test.dartand related gateway runtime tests. - Run
scripts/ci/run_layered_tests.shto match the repository CI path.
Task 4: Cases 00–05 live acceptance
Files:
- Modify:
docs/cases/06-gateway-turn-stability-and-robustness.md
Steps:
- Verify Case 00 connectivity and error behavior against the local Bridge/Gateway runtime.
- Execute Case 01 three times; validate Markdown structure, terminal status, non-empty Artifact, and isolation.
- Execute Cases 02–05 with the documented prompts and a deterministic local test image for Case 02.
- Exercise cancellation, invalid auth/unreachable endpoint, repeated runs, exact item/page counts, and Artifact retrieval where supported.
- Record run IDs, durations, terminal status, artifact paths/counts, and any scoped deviations.
Task 5: Full verification and delivery
Files:
- Modify:
docs/cases/06-gateway-turn-stability-and-robustness.md
Steps:
- Run formatting/analyzer and the full relevant Flutter suite; rerun failed tests individually to distinguish deterministic regressions from flakes.
- Review the complete diff and confirm no credential values or generated secrets are tracked.
- Commit cohesive changes on
mainwith explicit messages. - Push to
origin/main; retry transient push failures with bounded exponential backoff. - Verify the newest GitHub Actions run(s) and append final acceptance status/blockers to Case 06.