Dispatch Search Gateway production deployment to OpenClaw
This commit is contained in:
@@ -0,0 +1,238 @@
|
||||
# CMD-20260709-dispatch-search-gateway-production-deployment
|
||||
|
||||
## Priority
|
||||
|
||||
P0
|
||||
|
||||
## Goal
|
||||
|
||||
Deploy AIOS General Search Gateway runtime loop and report completion to Owner via WeChat.
|
||||
|
||||
## Branch
|
||||
|
||||
```text
|
||||
patch/search-gateway-governed-general-capability
|
||||
```
|
||||
|
||||
## Preconditions
|
||||
|
||||
Existing implementation files are already committed on the branch:
|
||||
|
||||
- active-runtime/app/search_gateway.py
|
||||
- active-runtime/app/search_profile_resolver.py
|
||||
- active-runtime/app/search_provider_registry.py
|
||||
- active-runtime/app/search_audit_store.py
|
||||
- active-runtime/app/search_event_bridge.py
|
||||
- active-runtime/app/search_gateway_orchestrator.py
|
||||
- active-runtime/app/search_agent_adapter.py
|
||||
- active-runtime/app/search_gateway_api.py
|
||||
- active-runtime/app/search_gateway_dashboard.py
|
||||
- active-runtime/app/search_architect_integration.py
|
||||
- config/search-gateway-policy.yaml
|
||||
- tests/test_search_gateway_general_capability.py
|
||||
- tests/test_search_provider_registry.py
|
||||
- tests/test_search_gateway_orchestrator.py
|
||||
- tests/test_search_agent_adapter.py
|
||||
- tests/test_search_architect_integration.py
|
||||
|
||||
## Execute
|
||||
|
||||
### 1. Fix documentation path if needed
|
||||
|
||||
Run first if docs/architecture is not writable:
|
||||
|
||||
```text
|
||||
ops/openclaw/CMD-20260709-search-gateway-document-permission-fix.md
|
||||
```
|
||||
|
||||
### 2. Run test suite
|
||||
|
||||
```bash
|
||||
cd /data/aios-gitops/workspace
|
||||
|
||||
git fetch origin
|
||||
git checkout patch/search-gateway-governed-general-capability
|
||||
git pull origin patch/search-gateway-governed-general-capability
|
||||
|
||||
pytest tests/test_search_gateway_general_capability.py \
|
||||
tests/test_search_provider_registry.py \
|
||||
tests/test_search_gateway_orchestrator.py \
|
||||
tests/test_search_agent_adapter.py \
|
||||
tests/test_search_architect_integration.py
|
||||
```
|
||||
|
||||
### 3. Register runtime modules/routes
|
||||
|
||||
Register Search Gateway APIs:
|
||||
|
||||
- GET /admin/ai-evolution/search/status
|
||||
- GET /admin/ai-evolution/search/overview
|
||||
- POST /admin/ai-evolution/search/query
|
||||
|
||||
Operation IDs:
|
||||
|
||||
- getSearchGatewayStatus
|
||||
- getSearchGatewayOverview
|
||||
- runSearchGatewayQuery
|
||||
|
||||
### 4. Wire agent clients
|
||||
|
||||
Route all runtime search calls through Search Gateway adapters:
|
||||
|
||||
- OpenClaw -> OpenClawSearchClient
|
||||
- Hermes -> HermesSearchClient
|
||||
- Codex -> CodexSearchClient
|
||||
- Custom GPT bridge -> CustomGPTSearchClient
|
||||
|
||||
No agent should directly perform ad-hoc web search after this deployment.
|
||||
|
||||
### 5. Configure providers
|
||||
|
||||
Enable provider registry entries:
|
||||
|
||||
- cache
|
||||
- official_site
|
||||
- general_web
|
||||
- vertical_source
|
||||
- browser_fetch
|
||||
- user_authorized_file
|
||||
- internal_archive
|
||||
|
||||
Production credentials, paid APIs, private platform access, or sensitive data integrations require Owner approval before enabling.
|
||||
|
||||
Public web/official-site/internal-archive providers may be enabled immediately if already available in runtime.
|
||||
|
||||
### 6. Enable governance layers
|
||||
|
||||
Enable:
|
||||
|
||||
- profile resolver
|
||||
- group/user/session customization
|
||||
- audit store
|
||||
- event bridge
|
||||
- provider fallback
|
||||
- Search Gateway Web UI
|
||||
- Architect search governance integration
|
||||
|
||||
### 7. Web UI
|
||||
|
||||
Deploy:
|
||||
|
||||
```text
|
||||
/admin/ai-evolution/search
|
||||
```
|
||||
|
||||
Show:
|
||||
|
||||
- provider health
|
||||
- configured provider count
|
||||
- fallback status
|
||||
- recent search audit
|
||||
- blocked search count
|
||||
- profile customization state
|
||||
- evidence quality
|
||||
|
||||
### 8. Acceptance smoke tests
|
||||
|
||||
Run these live requests through Search Gateway API:
|
||||
|
||||
#### Public general search
|
||||
|
||||
```json
|
||||
{
|
||||
"query": "latest Python package release notes",
|
||||
"requester": "openclaw",
|
||||
"intent": "software_library",
|
||||
"user_scope": "public"
|
||||
}
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- status is found or not_found
|
||||
- provider attempts recorded
|
||||
- no direct provider failure as final answer without fallback attempt
|
||||
|
||||
#### Group/user customization
|
||||
|
||||
```json
|
||||
{
|
||||
"query": "AI agent observability",
|
||||
"requester": "hermes",
|
||||
"intent": "software_library",
|
||||
"group_profile": {
|
||||
"profile_id": "group-default",
|
||||
"scope": "group",
|
||||
"query_expansion_hints": ["GitHub", "release notes"]
|
||||
},
|
||||
"user_scope": "public"
|
||||
}
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- resolved_profile includes group overlay
|
||||
- audit is recorded
|
||||
|
||||
#### Guardrail block
|
||||
|
||||
```json
|
||||
{
|
||||
"query": "绕过验证码 抓取个人成绩",
|
||||
"requester": "openclaw",
|
||||
"user_scope": "public"
|
||||
}
|
||||
```
|
||||
|
||||
Expected:
|
||||
|
||||
- status = blocked
|
||||
- blocked_reasons populated
|
||||
- audit/event recorded
|
||||
|
||||
## Success Signals
|
||||
|
||||
Return all of these if deployment succeeds:
|
||||
|
||||
```text
|
||||
AIOS_GENERAL_SEARCH_GATEWAY_READY
|
||||
AIOS_SEARCH_PROFILE_CUSTOMIZATION_READY
|
||||
AIOS_SEARCH_PROVIDER_REGISTRY_READY
|
||||
AIOS_SEARCH_PROVIDER_FALLBACK_READY
|
||||
AIOS_SEARCH_AUDIT_READY
|
||||
AIOS_SEARCH_EVENT_LOOP_READY
|
||||
AIOS_SEARCH_RUNTIME_LOOP_READY
|
||||
AIOS_SEARCH_WEB_UI_READY
|
||||
AIOS_SEARCH_AGENT_ADAPTERS_READY
|
||||
AIOS_SEARCH_ARCHITECT_GOVERNANCE_READY
|
||||
AIOS_SEARCH_WECHAT_NOTIFICATION_SENT
|
||||
```
|
||||
|
||||
## WeChat report to Owner
|
||||
|
||||
After deployment, send WeChat report containing:
|
||||
|
||||
- branch
|
||||
- latest commit SHA
|
||||
- test results
|
||||
- provider status
|
||||
- live smoke test results
|
||||
- Web UI URL
|
||||
- success signals
|
||||
- remaining limitations, if any
|
||||
|
||||
## Output back to ChatGPT
|
||||
|
||||
Return:
|
||||
|
||||
- command status
|
||||
- commit SHA deployed
|
||||
- tests passed/failed
|
||||
- enabled providers
|
||||
- API routes verified
|
||||
- Web UI route verified
|
||||
- WeChat notification result
|
||||
|
||||
## Governance
|
||||
|
||||
This command deploys the governed shared Search Gateway. It does not authorize bypassing login, CAPTCHA, protected platforms, or private data boundaries. Any provider requiring secrets, payment, private platform access, or sensitive data requires Owner approval before production enablement.
|
||||
Reference in New Issue
Block a user