diff --git a/SESSION.md b/SESSION.md index ca94fca..815d27a 100644 --- a/SESSION.md +++ b/SESSION.md @@ -2,7 +2,7 @@ ## Current Goal -Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis/decision-only unattended harness that validates P15-P22 key paths and emits a single blockers/warnings/passed-checks report for local and future remote smoke. The default next action is P24 `Remote Smoke And Ops Closure`. +Automation execution-layer P24 is closed. Current `HEAD` was deployed to the remote host and P24 remote ops smoke passed across health, runtime status, review packet, alert quality, operator digest, runtime incidents, maintenance summary, visual-watch dry-run, and P23 unattended harness. The default next action is PXX `Automation Execution Closure Gate`. ## Current Branch @@ -14,8 +14,8 @@ Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis ## Automation Status -- state: automation_execution_layer_p23_end_to_end_unattended_harness_closed -- current_phase: P23 End-To-End Unattended Harness +- state: automation_execution_layer_p24_remote_smoke_ops_closure_closed +- current_phase: P24 Remote Smoke And Ops Closure - latest_p7_selector_choice: continue_periodic_analysis_decision_monitoring_with_maturity_rollup - latest_p14_slice: webhook_transport_retry - latest_p15_pxx_tasklist_status: ready @@ -61,7 +61,11 @@ Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis - latest_unattended_harness_status: implemented - latest_unattended_harness_route_status: ok - latest_unattended_harness_smoke_status: passed_9_checks -- next_execution_layer_phase: P24 Remote Smoke And Ops Closure +- latest_p24_slice: remote_smoke_ops_closure +- latest_remote_deploy_status: deployed_current_head +- latest_remote_ops_smoke_status: passed +- latest_remote_ops_smoke_base_url: http://192.168.3.90:8000 +- next_execution_layer_phase: PXX Automation Execution Closure Gate - latest_visual_review_script_status: idle - latest_runtime_visual_watch_task_status: ok - latest_visual_capture_cleanup_task_status: ok @@ -148,6 +152,9 @@ Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis - Extended the workbench runtime panel with maintenance status, blockers/warnings, actions, and P23 assertion visibility. - Added `UnattendedHarnessService`, `scripts/run_unattended_harness.py`, and `GET /trading/unattended-harness`. - The harness validates policy suppression, dispatch retry contract, runtime watchdog, visual capture fallback, alert quality feedback rollup, visual media/channel rollup, operator digest, maintenance summary, and runtime environment blockers without using external channels or real trades. +- Added `scripts/run_remote_ops_smoke.py` for P24 remote API validation. +- Extended password deploy smoke coverage to include alert quality, operator digest, runtime incidents, maintenance summary, and the P23 harness. +- Deployed current `HEAD` to `http://192.168.3.90:8000` and confirmed P24 remote ops smoke passed without warnings or blockers. ## Current Working State @@ -179,6 +186,8 @@ Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis - P22 visibility is implemented: `/trading/maintenance-summary`, `scripts/run_maintenance_summary.py`, and the workbench runtime panel expose maintenance state without deleting business data. - P23 unattended harness is implemented: a single local command/API call returns mode, passed checks, warnings, blockers, and trimmed payloads across P15-P22 key paths. - P23 is analysis/decision-only: `external_channels_used=false` and `real_trade_required=false`. +- P24 remote deployment is complete for current `HEAD`. +- P24 remote smoke is implemented and passed: `/health`, `/trading/runtime-status`, `/trading/review-packet`, `/trading/alerts/quality-summary`, `/trading/alerts/operator-digest`, `/trading/runtime-incidents`, `/trading/maintenance-summary`, visual-watch cleanup dry-run, and `/trading/unattended-harness` all passed on `http://192.168.3.90:8000`. - Latest `scripts/run_visual_review.py` smoke found no pending reviews: attempted=0, reviewed=0, status=idle. - Latest capture smoke returned `status=ignored` when no watch run was supplied, which is the expected safe no-op. - Latest cleanup smoke deleted one expired temporary artifact through `scripts/run_visual_capture_cleanup.py`. @@ -188,7 +197,7 @@ Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis - Latest `scripts/run_trading_runtime.py` smoke returned blockers=none and includes a healthy `visual_watch` runtime task. - Latest local runtime smoke confirmed `runtime_status.tasks.alert_dispatch.details` now exposes retry and silent-window counters with blockers=none. -## P23 Blockers +## P24 Blockers - none @@ -212,6 +221,7 @@ Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis - P21 runtime incident journal remains observability/persistence only and must not change execution permission, live readiness, trust bucket, risk governor, or operator confirmation. - P22 maintenance summary remains read-only and uses visual capture retention dry-run statistics only; it must not delete business data or alter execution permission, live readiness, trust bucket, risk governor, or operator confirmation. - P23 unattended harness remains a local/remote smoke verifier only and must not use external channels, require real trades, or alter execution permission, live readiness, trust bucket, risk governor, or operator confirmation. +- P24 remote ops smoke remains verification only: its visual-watch step uses dry-run cleanup and it must not use external channels, require real trades, or alter execution permission, live readiness, trust bucket, risk governor, or operator confirmation. - A final rerun of `scripts/run_alert_dispatcher.py` and `scripts/run_trading_runtime.py` hit local PostgreSQL connection timeout because nothing was listening on `127.0.0.1:5432`; the P14 code path is still covered by full unit tests and earlier successful smoke during implementation. - P15 dispatcher smoke succeeded with `suppressed_noise_policy`, `workbench_only`, and `policy_external_allowed` counters present. P15 runtime smoke reached `alert_dispatch` successfully, but the overall runtime returned external environment blockers for market stream disconnected and OKX read transport connection refused. - P16 direct browser smoke succeeded locally with `browser_capture_status=captured`. Script-level capture without a watch run still returns safe no-op `watch_run_missing`. @@ -233,11 +243,14 @@ Automation execution-layer P23 is closed locally. P23 adds a repeatable analysis - P22 script/API smoke returned `status=warning` with `warnings=['feedback.sample_health']`, blockers=[], automatic_actions=[], and P23 assertions visible. - P23 full validation passed: 701 unit tests, 71 script static checks, and `node --check src/web/app.js`. - P23 script/API smoke returned `status=passed`, passed_checks=9, warnings=[], blockers=[], `external_channels_used=false`, and `real_trade_required=false`. +- P24 focused validation passed: remote ops smoke tests and deploy smoke coverage tests passed; script static checks passed across 72 scripts. +- P24 deploy passed through `scripts/deploy_with_password.py` with 11 HTTP smoke endpoints. +- P24 remote ops smoke passed on `http://192.168.3.90:8000` with 9 passed checks, warnings=[], blockers=[]. - Real-live order submission remains intentionally disabled because the OKX order adapter is still not a real-live submitter. ## Exact Next Step -P23 is locally closed. Default next action is P24 `Remote Smoke And Ops Closure`: deploy current HEAD when the remote environment is reachable, apply migrations, and smoke `/health`, runtime status, review packet, alert quality, visual watch, maintenance summary, and the P23 harness. +P24 is closed. Default next action is PXX `Automation Execution Closure Gate`: verify P15-P24 are all closed, rerun final quality gates, freeze known automation execution-layer scope, and write the final closure status. ## Validation Commands Used Recently @@ -267,4 +280,6 @@ D:\ai-exchange\.venv\Scripts\python.exe -m unittest tests.unit.test_maintenance_ D:\ai-exchange\.venv\Scripts\python.exe scripts\run_maintenance_summary.py D:\ai-exchange\.venv\Scripts\python.exe -m unittest tests.unit.test_unattended_harness_service tests.unit.test_run_unattended_harness tests.unit.test_api_server.ApiServerRoutingTests.test_routes_unattended_harness D:\ai-exchange\.venv\Scripts\python.exe scripts\run_unattended_harness.py +D:\ai-exchange\.venv\Scripts\python.exe -m unittest tests.unit.test_run_remote_ops_smoke tests.unit.test_deploy_with_password +D:\ai-exchange\.venv\Scripts\python.exe scripts\run_remote_ops_smoke.py --base-url http://192.168.3.90:8000 --attempts 2 --timeout-seconds 20 ``` diff --git a/TASKS.md b/TASKS.md index 9ffc179..92afe67 100644 --- a/TASKS.md +++ b/TASKS.md @@ -13,7 +13,7 @@ ## In Progress -- [x] P23 End-To-End Unattended Harness local closure complete +- [x] P24 Remote Smoke And Ops Closure complete ## Next Up @@ -34,14 +34,15 @@ - [x] P21 local closure complete - [x] P22 local closure complete - [x] P23 local closure complete -- [ ] Start P24 Remote Smoke And Ops Closure +- [x] P24 remote smoke closure complete +- [ ] Start PXX Automation Execution Closure Gate - [ ] Continue periodic analysis-decision monitoring with maturity rollup in parallel - [ ] Treat browser screenshot capture and additional external media adapters as future enhancements ## Automation Status -- [x] state: automation_execution_layer_p23_end_to_end_unattended_harness_closed -- [x] current_phase: P23 End-To-End Unattended Harness +- [x] state: automation_execution_layer_p24_remote_smoke_ops_closure_closed +- [x] current_phase: P24 Remote Smoke And Ops Closure - [x] latest_p7_selector_choice: continue_periodic_analysis_decision_monitoring_with_maturity_rollup - [x] latest_p14_slice: webhook_transport_retry - [x] latest_p15_pxx_tasklist_status: ready @@ -87,7 +88,11 @@ - [x] latest_unattended_harness_status: implemented - [x] latest_unattended_harness_route_status: ok - [x] latest_unattended_harness_smoke_status: passed_9_checks -- [x] next_execution_layer_phase: P24 Remote Smoke And Ops Closure +- [x] latest_p24_slice: remote_smoke_ops_closure +- [x] latest_remote_deploy_status: deployed_current_head +- [x] latest_remote_ops_smoke_status: passed +- [x] latest_remote_ops_smoke_base_url: http://192.168.3.90:8000 +- [x] next_execution_layer_phase: PXX Automation Execution Closure Gate - [x] latest_visual_review_script_status: idle - [x] latest_runtime_visual_watch_task_status: ok - [x] latest_visual_capture_cleanup_task_status: ok @@ -199,6 +204,9 @@ - [x] Added `scripts/run_unattended_harness.py` - [x] Added `GET /trading/unattended-harness` - [x] Added focused P23 harness service, script, and API route tests +- [x] Added `scripts/run_remote_ops_smoke.py` +- [x] Extended deploy smoke to include P20-P23 execution-layer routes +- [x] Added focused P24 remote ops smoke and deploy coverage tests - [x] Added runtime `visual_watch` task - [x] Added focused service, script, API, and runtime tests - [x] Smoked the visual review script with no pending reviews @@ -230,6 +238,9 @@ - [x] Completed P22 full validation: 696 unit tests, 70 script static checks, dashboard JS syntax, maintenance summary script/API smoke - [x] Smoked P23 unattended harness script/API with 9 passed checks, no warnings, no blockers, and analysis/decision-only mode - [x] Completed P23 full validation: 701 unit tests, 71 script static checks, dashboard JS syntax, unattended harness script/API smoke +- [x] Deployed current `HEAD` to `http://192.168.3.90:8000` +- [x] Completed P24 remote deploy smoke through `scripts/deploy_with_password.py` with 11 HTTP endpoints +- [x] Completed P24 remote ops smoke with 9 passed checks, no warnings, and no blockers ## Blocked @@ -283,6 +294,8 @@ - [x] `automation_execution_layer_p20_operator_digest_review_queue` - [x] `automation_execution_layer_p21_runtime_incident_journal` - [x] `automation_execution_layer_p22_maintenance_retention_rollup` +- [x] `automation_execution_layer_p23_end_to_end_unattended_harness` +- [x] `automation_execution_layer_p24_remote_smoke_ops_closure` ## P15-PXX Finite Queue @@ -295,7 +308,7 @@ - [x] `P21` Runtime Incident Journal - [x] `P22` Maintenance And Retention Rollup - [x] `P23` End-To-End Unattended Harness -- [ ] `P24` Remote Smoke And Ops Closure +- [x] `P24` Remote Smoke And Ops Closure - [ ] `PXX` Automation Execution Closure Gate ## Backlog diff --git a/docs/AI_ICT_盯盘告警开发任务清单_v1.md b/docs/AI_ICT_盯盘告警开发任务清单_v1.md index 8c789a0..f28f11b 100644 --- a/docs/AI_ICT_盯盘告警开发任务清单_v1.md +++ b/docs/AI_ICT_盯盘告警开发任务清单_v1.md @@ -413,6 +413,7 @@ candidate -> decision alert -> dispatcher -> 外部消息 -> delivery record - 2026-05-12 P21 已完成 `runtime incident journal` 本地闭环:runtime/watchdog/blocker/noisy incident 现在可聚合写入 `runtime_incidents`,每条 incident 带 severity、source、reason、first/last seen 与 recommended action,并通过脚本、API、runtime status 和 workbench runtime panel 暴露。 - 2026-05-12 P22 已完成 `maintenance / retention rollup` 本地闭环:maintenance summary 以只读方式聚合 visual capture retention dry-run、delivery/feedback、runtime watchdog 与 incident journal,输出 P23 harness 可复用的 checks/blockers/warnings/p23_assertions,不执行未纳入 retention policy 的业务数据删除。 - 2026-05-12 P23 已完成 `end-to-end unattended harness` 本地闭环:`UnattendedHarnessService`、脚本与 API 会在 analysis/decision-only 模式下一次性验证 P15-P22 关键路径,输出单一 JSON blockers/warnings/passed-checks 报告,不使用外部通道、不要求真实成交。 +- 2026-05-12 P24 已完成 `remote smoke / ops closure` 闭环:当前 `HEAD` 已部署到远端,部署后 11 个 HTTP smoke endpoint 通过,`scripts/run_remote_ops_smoke.py` 对 P15-P23 关键远端能力返回 9 个 passed checks、无 warnings、无 blockers。 ### 验收 - 非重大错误不打断主循环 diff --git a/docs/AI_ICT_盯盘告警技术设计稿_v1.md b/docs/AI_ICT_盯盘告警技术设计稿_v1.md index 2e6415c..c550786 100644 --- a/docs/AI_ICT_盯盘告警技术设计稿_v1.md +++ b/docs/AI_ICT_盯盘告警技术设计稿_v1.md @@ -129,6 +129,11 @@ 2026-05-12 P23 已落地:unattended harness 以 analysis/decision-only 模式验证 policy suppression、dispatch retry contract、runtime watchdog、visual capture fallback、feedback rollup、visual media/channel rollup、operator digest、maintenance summary 与 runtime environment,并输出单一 JSON 报告。该 harness 不使用外部通道、不要求真实成交,环境不可用时以 environment blocker 暴露,不改变 execution allowed、real live readiness、risk governor、trust bucket 或 operator confirmation protocol。 +#### `scripts/run_remote_ops_smoke.py` +职责:提供 P24 远端部署后的统一 ops smoke 入口。 + +2026-05-12 P24 已落地:remote ops smoke 覆盖 health、runtime status、review packet、alert quality、operator digest、runtime incidents、maintenance summary、visual-watch cleanup dry-run 与 P23 unattended harness。该脚本只做远端可用性验证,visual-watch 步骤使用 dry-run,不触发外部通道、不要求真实成交,也不改变任何交易权限或 operator confirmation protocol。 + #### `src/services/alerts/delivery_policy_service.py` 职责: diff --git a/docs/AI_ICT_自动化执行层_P15-PXX闭环任务清单_v1.md b/docs/AI_ICT_自动化执行层_P15-PXX闭环任务清单_v1.md index ef4f60a..6fd7643 100644 --- a/docs/AI_ICT_自动化执行层_P15-PXX闭环任务清单_v1.md +++ b/docs/AI_ICT_自动化执行层_P15-PXX闭环任务清单_v1.md @@ -318,6 +318,12 @@ - 若远端 PostgreSQL、proxy、channel credential 不可用,记录为环境 blocker,并明确本地闭环状态。 - 不把远端 smoke 未完成的能力宣称为完全发布完成。 +### 闭环记录 + +- 2026-05-12 P24 已新增 `scripts/run_remote_ops_smoke.py`,覆盖 `/health`、`/trading/runtime-status`、`/trading/review-packet`、`/trading/alerts/quality-summary`、`/trading/alerts/operator-digest`、`/trading/runtime-incidents`、`/trading/maintenance-summary`、visual-watch cleanup dry-run 与 `/trading/unattended-harness`。 +- 2026-05-12 P24 已扩展 `scripts/deploy_with_password.py` 的部署后 HTTP smoke,使远端版本漂移会在 P20-P23 新入口缺失时失败。 +- 2026-05-12 P24 已将当前 `HEAD` 部署到 `http://192.168.3.90:8000`;部署脚本 11 个 HTTP smoke endpoint 通过,P24 remote ops smoke 返回 `status=passed`、passed_checks=9、warnings=[]、blockers=[]。 + --- ## 15. PXX Automation Execution Closure Gate