Update all documentation to reflect removal of OpenClaw REST service: - README.md, README_zh.md: remove service table entry - deploy/README.md: update port range 8000-8003 - services/README.md: remove 8004 references and service list - docs/compat-removal-plan.md: remove REST surface mention - docs/current-architecture.md: remove service reference - docs/legacy-inventory.md: simplify to WebSocket-only description Follow-up to: refactor(openclaw): remove REST facade
6.7 KiB
Legacy Inventory
This file records the major legacy or compatibility-oriented surfaces that still exist in the repository.
It is not a deletion plan by itself. Its purpose is to separate:
- current source-of-truth runtime paths
- intentional compatibility surfaces
- historical directories and scripts that should not guide new development
Source Of Truth
These are the current defaults to build against:
runs/<run_id>/- runtime state, bootstrap configuration, agent runtime assets, logs
- split services
backend.apps.agent_serviceon:8000backend.apps.runtime_serviceon:8003backend.apps.trading_serviceon:8001backend.apps.news_serviceon:8002
- gateway process
backend.mainbackend.services.gatewayon:8765
Compatibility Surface Classification
All compatibility surfaces are categorized into three buckets:
1. Stable and Intentional (Keep)
These have clear operational reasons to exist and are documented as intentional compatibility surfaces with explicit ownership.
| Surface | Location | Owner | Reason |
|---|---|---|---|
| Gateway-first production | scripts/run_prod.sh, deploy/systemd/, deploy/nginx/ |
ops-team | Current production example runs gateway directly and proxies /ws |
| Dashboard export layer | runs/<run_id>/team_dashboard/*.json |
frontend-team | Downstream dashboard consumers read these exports |
| Design-time workspace registry | workspaces/, backend.api.workspaces |
control-plane-team | Control-plane editing and registry-style management |
| Gateway WebSocket transport | backend.services.gateway on :8765 |
runtime-team | Live event streaming contract for frontend |
Status: These are NOT migration leftovers. Do not remove without explicit replacement plan signed off by owning team.
2. Temporary and Shrinking (Mark for Removal)
These should not grow further. Keep only until concrete replacement is fully in use.
| Surface | Location | Replacement | ETA |
|---|---|---|---|
| Legacy analyst agents | backend.agents.analyst.* |
EvoAgent |
After EvoAgent smoke tests pass |
| Mixed workspace_id semantics | /api/workspaces/{id}/agents/... |
✅ /api/runs/{run_id}/agents/... routes added |
Completed |
| Root-level runtime directories | live/, backtest/, production/ |
runs/<run_id>/ |
✅ Removed, backed up to runs/_legacy/ |
Status: Do not add new code using these surfaces. Migrate existing usage when touching related code.
3. Deferred Until Topology Final (Revisit Later)
These are real migration boundaries, but removing them prematurely would create churn without simplifying the current runtime. Revisit only after production topology and service-routing policy are frozen.
| Surface | Current State | Decision Needed |
|---|---|---|
| OpenClaw integration | Gateway WebSocket (port 18789) | Stable — REST facade removed |
| Env-dependent service fallbacks | TRADING_SERVICE_URL, NEWS_SERVICE_URL fallbacks to local modules |
Remove fallbacks and require explicit URLs? |
| Split-service production deploy | Docs show gateway-first, dev uses split-service | Align production with dev topology? |
Status: Document current behavior. Do not actively remove until topology decisions are finalized.
Detailed Surface Documentation
Gateway-First Production Example
Files:
scripts/run_prod.sh- Production launch scriptdeploy/systemd/evotraders.service- systemd unitdeploy/nginx/bigtime.cillinn.com.conf- HTTPS + WebSocket proxydeploy/nginx/bigtime.cillinn.com.http.conf- HTTP variant
Behavior:
# scripts/run_prod.sh launches:
python3 -m backend.main \
--mode live \
--config-name production \
--host 127.0.0.1 \
--port 8765
nginx proxies:
/ws->127.0.0.1:8765(WebSocket upgrade)/-> static files in/var/www/bigtime/current
Why this exists:
- Simpler production deployment (single process + nginx)
- WebSocket is the practical live event contract for frontend
- Split-service topology adds operational complexity not needed for all deployments
Ownership: ops-team Status: Stable and intentional
Dashboard Export Layer
Files: runs/<run_id>/team_dashboard/*.json
Purpose:
- Compatibility/export layer for dashboard consumers
- Non-authoritative snapshot of runtime state
- Can be disabled via
ENABLE_DASHBOARD_COMPAT_EXPORTS=false
Why not remove:
- Downstream consumers still read these files
- Provides decoupling between runtime and dashboard
Ownership: frontend-team Status: Stable and intentional
Design-Time Workspace Registry
Files:
workspaces/directorybackend/api/workspaces.pybackend/agents/workspace_manager.py
Purpose:
- Control-plane editing and registry-style management
- Design-time CRUD for agent workspaces
- Separate from runtime state in
runs/<run_id>/
Key distinction:
workspaces/= design-time registry (what agents could be)runs/<run_id>/= runtime state (what agents are right now)
Ownership: control-plane-team Status: Stable and intentional
Historical Or High-Risk-To-Misread Surfaces
These remain in the tree, but they should not define the architecture for new work.
Root-level runtime directories
live/backtest/production/
Read:
- treat these as historical or compatibility-oriented data/layout artifacts
- do not use them as the default runtime contract for new features
Mixed workspace_id semantics on agent routes
/api/workspaces/{workspace_id}/agents/...
Read:
- design-time CRUD routes use
workspace_idas a registry workspace id - profile, skills, and editable file routes use
workspace_idas a run id
Mitigation already in repo:
agent_service /api/statusexposes scope metadata- runtime-read responses expose
scope_typeandscope_note
Partial EvoAgent rollout
EVO_AGENT_IDS- staged smoke coverage in
scripts/smoke_evo_runtime.py
Read:
- EvoAgent is still a controlled rollout path
- legacy analyst/risk/PM implementations remain the default runtime path for now
Recommended Usage
When in doubt:
- trust
docs/current-architecture.md - trust
runs/<run_id>/over root-level runtime directories - treat
workspaces/as control-plane registry, not runtime truth - treat deploy artifacts as the current checked-in example, not the full system contract
- check this file's Compatibility Surface Classification before assuming something is legacy
Change Log
| Date | Change |
|---|---|
| 2026-03-31 | Added Compatibility Surface Classification (3 buckets) |
| 2026-03-31 | Documented OpenClaw dual integration (REST vs WebSocket) |
| 2026-03-31 | Added ownership and status to all surfaces |