# ai-exchange Tasks ## Execution Mode - [x] Autonomous mode enabled - [x] No per-stage confirmation required - [x] Each stage must close the loop through implementation, validation, deploy/smoke when possible, and state writeback - [x] P0-P6 Research Council phase expansion is frozen - [x] P6 `no_op_healthy` must not create Research Council P7/P8 - [x] Stable monitor quality may enter automation execution-layer P7 - [x] User explicitly requested the next P8 product-development round - [x] User requested a finite P15-PXX task list so future phases can continue without per-phase stops ## In Progress - [x] P22 Maintenance And Retention Rollup local closure complete ## Next Up - [x] P8 local closure complete - [x] P9 local closure complete - [x] P10 local closure complete - [x] P11 local closure complete - [x] P12 local closure complete - [x] P13 local closure complete - [x] P14 local closure complete - [x] Define finite P15-PXX continuation queue - [x] P15 local closure complete - [x] P16 local closure complete - [x] P17 local closure complete - [x] P18 local closure complete - [x] P19 local closure complete - [x] P20 local closure complete - [x] P21 local closure complete - [x] P22 local closure complete - [ ] Start P23 End-To-End Unattended Harness - [ ] 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_p22_maintenance_retention_rollup_closed - [x] current_phase: P22 Maintenance And Retention Rollup - [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 - [x] latest_p15_pxx_tasklist_path: docs/AI_ICT_自动化执行层_P15-PXX闭环任务清单_v1.md - [x] latest_p15_slice: alert_noise_policy_matrix - [x] latest_alert_noise_policy_status: implemented - [x] latest_alert_noise_policy_route_status: visible_existing_quality_summary - [x] latest_alert_noise_policy_runtime_status: visible - [x] latest_p16_slice: browser_screenshot_capture_adapter - [x] latest_visual_browser_capture_status: implemented - [x] latest_visual_browser_capture_smoke_status: captured - [x] latest_visual_capture_script_noop_status: ignored_watch_run_missing - [x] latest_p17_slice: visual_trigger_roi_router - [x] latest_visual_trigger_policy_status: implemented - [x] latest_visual_trigger_policy_smoke_status: idle_no_pending_watch_runs - [x] latest_visual_trigger_runtime_status: visible - [x] latest_visual_trigger_quality_summary_status: visible - [x] latest_p18_slice: visual_evidence_media_dispatch - [x] latest_visual_media_evidence_status: implemented - [x] latest_visual_media_evidence_dispatch_status: visible - [x] latest_visual_media_evidence_smoke_status: no_pending_alerts_safe_noop - [x] latest_p19_slice: multi_channel_alert_routing - [x] latest_channel_router_status: implemented - [x] latest_channel_health_status: visible - [x] latest_disabled_adapter_status: visible_credential_missing - [x] latest_channel_routing_smoke_status: no_pending_alerts_safe_noop - [x] latest_p20_slice: operator_digest_review_queue - [x] latest_operator_digest_status: implemented - [x] latest_operator_digest_route_status: ok - [x] latest_operator_digest_workbench_status: visible - [x] latest_operator_digest_smoke_status: safe_noop_or_completed - [x] latest_p21_slice: runtime_incident_journal - [x] latest_runtime_incident_journal_status: implemented - [x] latest_runtime_incident_journal_route_status: ok - [x] latest_runtime_incident_journal_workbench_status: visible - [x] latest_runtime_incident_journal_smoke_status: idle_persisted - [x] latest_p22_slice: maintenance_retention_rollup - [x] latest_maintenance_summary_status: implemented - [x] latest_maintenance_summary_route_status: ok - [x] latest_maintenance_summary_workbench_status: visible - [x] latest_maintenance_summary_smoke_status: warning_feedback_sample_health - [x] next_execution_layer_phase: P23 End-To-End Unattended Harness - [x] latest_visual_review_script_status: idle - [x] latest_runtime_visual_watch_task_status: ok - [x] latest_visual_capture_cleanup_task_status: ok - [x] latest_runtime_watchdog_task_status: implemented - [x] latest_visual_snapshot_capture_status: implemented - [x] latest_visual_reviews_panel_status: visible - [x] latest_visual_feedback_status: implemented - [x] latest_visual_alert_evidence_dispatch_status: implemented_existing_channels - [x] latest_alert_quality_summary_status: implemented - [x] latest_review_packet_alert_quality_status: visible - [x] latest_alert_quality_route_status: ok - [x] latest_visual_capture_cleanup_status: implemented - [x] latest_visual_capture_cleanup_route_status: ok - [x] latest_runtime_watchdog_status: implemented - [x] latest_runtime_watchdog_route_status: ok - [x] latest_alert_silent_window_status: implemented - [x] latest_alert_silent_window_route_status: ok - [x] latest_alert_retry_recovery_status: implemented - [x] latest_alert_transport_retry_status: implemented - [x] latest_runtime_blockers: none - [x] no_new_research_council_phase_created: true ## Newly Done - [x] Completed P7-4 bounded automation slice selector before opening P8 - [x] Added `VisualReviewService` - [x] Added `scripts/run_visual_review.py` - [x] Added `VisualSnapshotCaptureService` and `scripts/run_visual_snapshot_capture.py` - [x] Added visual review API routes - [x] Added a read-only workbench panel for recent visual reviews - [x] Added `alert_feedback` persistence and feedback service - [x] Added visual review feedback API routes - [x] Added workbench feedback actions for useful / misleading / actionable labels - [x] Added visual evidence to alert dispatch messages and delivery payloads for existing channels - [x] Added `AlertQualitySummaryService` - [x] Added `GET /trading/alerts/quality-summary` - [x] Added `review_packet.alert_quality_summary` - [x] Added dashboard `Alert Quality` panel - [x] Applied local migrations through `042_create_alert_feedback.sql` - [x] Added `VisualCaptureRetentionService` - [x] Added `scripts/run_visual_capture_cleanup.py` - [x] Added `POST /trading/visual-watch/cleanup-captures` - [x] Added runtime `visual_capture_cleanup` task - [x] Added workbench `Cleanup Old Captures` action - [x] Added `RuntimeTaskWatchdogService` - [x] Added `scripts/run_runtime_task_watchdog.py` - [x] Added `GET /trading/runtime-watchdog` - [x] Added `runtime_status.runtime_watchdog` - [x] Added runtime panel stalled-task visibility - [x] Added `AlertSilentWindowService` - [x] Added `scripts/run_alert_silent_window_status.py` - [x] Added `GET /trading/alerts/silent-window-status` - [x] Added silent-window suppression to dispatcher and alert quality summary - [x] Added `Alert Quality` panel silent-window visibility - [x] Added failed-alert retry recovery to `AlertDispatcherService` - [x] Added bounded retry attempts and retry backoff settings - [x] Added retry counters to dispatcher payloads, delivery summary, and runtime `alert_dispatch` details - [x] Added bounded webhook transport retry inside `AlertDispatcherService._send` - [x] Added transport retry counters to dispatcher payloads, delivery summary, and runtime `alert_dispatch` details - [x] Added `docs/AI_ICT_自动化执行层_P15-PXX闭环任务清单_v1.md` - [x] Defined P15-PXX as a finite queue ending at PXX closure gate instead of open-ended phase growth - [x] Added alert noise policy matrix settings - [x] Added structured `evaluate_alert_delivery_policy()` - [x] Added policy counters to dispatcher payloads - [x] Added noise-policy/workbench-only/external-allowed counters to alert quality summary - [x] Added policy counters to runtime `alert_dispatch` task details - [x] Added policy counters to the workbench `Alert Quality` panel - [x] Added focused P15 policy, dispatcher, summary, runtime, and docs inventory tests - [x] Added browser-backed screenshot capture to `VisualSnapshotCaptureService` - [x] Added visual capture payload fields for `html_path`, `screenshot_path`, `metadata_path`, `capture_url`, and `browser_capture_status` - [x] Extended visual snapshot capture script and API route with browser capture controls - [x] Added browser capture status and HTML path visibility to workbench Visual Reviews - [x] Added focused P16 browser capture, script, and API tests - [x] Added structured `evaluate_visual_trigger_policy()` for visual trigger/skip routing - [x] Added `visual_trigger_policy`, `visual_trigger_skip_reason`, and `visual_trigger_roi` to decision alert payloads - [x] Added policy metadata to reserved visual watch requests and visual review payloads - [x] Added trigger/skip counters to runtime `decision_packet` and `visual_watch` task details - [x] Added trigger type counts and review result counts to alert quality visual review summary - [x] Added trigger visibility to workbench Alert Quality and Visual Reviews panels - [x] Added focused P17 visual trigger, decision packet, visual review, quality summary, runtime, and script tests - [x] Added `build_visual_media_evidence()` and `summarize_visual_media_evidence()` - [x] Added stable `media_evidence` blocks to alert dispatcher delivery payloads and dispatcher results - [x] Added `media_attached`, `media_linked`, and `media_unavailable` counters to dispatcher, delivery summary, runtime `alert_dispatch`, and dispatcher script output - [x] Added media evidence status and primary path visibility to Visual Reviews API/workbench - [x] Added focused P18 media evidence, dispatcher, quality summary, runtime, and API tests - [x] Added structured channel route/capability helpers for workbench, webhook, WeCom, and email - [x] Added channel health summary with enabled/disabled/credential-missing channel visibility - [x] Added disabled adapter states for WeCom and email when credentials or adapter support are unavailable - [x] Added per-channel summary to dispatcher results, delivery summary, runtime `alert_dispatch`, dispatcher script output, and workbench Alert Quality - [x] Added focused P19 channel router, disabled channel, summary, and runtime tests - [x] Added `OperatorDigestService` for recent alert, delivery, visual review, quality flag, and feedback-gap aggregation - [x] Added `scripts/run_operator_digest.py` - [x] Added `GET /trading/alerts/operator-digest` - [x] Added operator digest/review queue visibility to the workbench `Alert Quality` panel - [x] Added focused P20 digest service, script, API, and dashboard route tests - [x] Added `runtime_incidents` persistence with upsert aggregation by incident key - [x] Added `RuntimeIncidentJournalService` - [x] Added `scripts/run_runtime_incident_journal.py` - [x] Added `GET /trading/runtime-incidents` - [x] Added `runtime_status.incident_summary` - [x] Added incident journal visibility to `run_trading_runtime.py` and the workbench runtime panel - [x] Added focused P21 service, script, API, runtime, and dashboard route tests - [x] Added `MaintenanceSummaryService` - [x] Added `scripts/run_maintenance_summary.py` - [x] Added `GET /trading/maintenance-summary` - [x] Added maintenance rollup visibility to the workbench runtime panel - [x] Added focused P22 maintenance service, script, API, and dashboard route 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 - [x] Smoked the capture script with no watch run provided - [x] Smoked the cleanup script with expired temporary artifacts - [x] Smoked the runtime watchdog script with `stalled_task_count=0` - [x] Smoked the silent-window script with `active=true` - [x] Smoked the dispatcher script with retry counters visible - [x] Smoked the trading runtime with blockers=none - [x] Smoked P15 dispatcher with policy counters visible - [x] Smoked P15 quality-summary API with policy counters visible - [x] Smoked P16 direct browser screenshot capture with a real PNG output - [x] Smoked P16 capture script safe no-op without watch run - [x] Smoked P17 visual review safe no-op with `skip_reason=no_pending_visual_watch_runs` - [x] Smoked P17 quality-summary API with trigger counters visible - [x] Smoked P17 trading runtime with blockers=none and visual trigger details visible - [x] Smoked P18 dispatcher safe no-op with media counters visible - [x] Smoked P18 quality-summary API with media counters visible - [x] Smoked P18 trading runtime with blockers=none and alert dispatch media counters visible - [x] Smoked P19 dispatcher safe no-op with channel health visible - [x] Smoked P19 quality-summary API with channel status counts visible - [x] Smoked P19 trading runtime with blockers=none and alert dispatch channel health visible - [x] Smoked P20 operator digest script/API completed state with review queue fields visible - [x] Completed P20 full validation: 685 unit tests, 68 script static checks, dashboard JS syntax, operator digest script/API smoke, and runtime smoke blockers=none - [x] Applied local migration `043_create_runtime_incidents.sql` - [x] Smoked P21 runtime incident journal script/API with idle persisted state - [x] Completed P21 full validation: 691 unit tests, 69 script static checks, dashboard JS syntax, runtime incident script/API smoke, and runtime smoke blockers=none - [x] Smoked P22 maintenance summary script/API with warning-only feedback sample health and no blockers - [x] Completed P22 full validation: 696 unit tests, 70 script static checks, dashboard JS syntax, maintenance summary script/API smoke ## Blocked - [x] none ## Standing Guardrails - [x] `decision_support_ready` remains strict unrestricted lane and must not be force-enabled - [x] `real_live_path_ready` remains intentionally disabled until the live adapter is real-live ready - [x] Visual review is advisory and must not alter execution permission - [x] Keep OKX fills out of the current analysis/restricted-decision blocker set ## Future Enhancements Not Blocking P8 - [x] none currently tracked outside the finite P15-PXX queue ## Deferred Until Real-Trading Phase - [ ] `real_trade_sample_verified` is not required in the current analysis/decision-only phase - [ ] Real fill reconciliation should be verified only when the project intentionally enters a real-trading validation phase ## Operational Dependencies - [ ] Keep `D:\v2rayN-windows-64\v2rayN.exe` / `xray.exe` running on the local Windows host - [ ] Keep remote `.env` proxy path compatible with `MARKET_TRUTH_PROXY_URL=http://192.168.3.73:10808` ## Major Done Milestones - [x] `Research Council P6` remote deploy and governance tick smoke gate - [x] `P0-P6` reasonableness review and phase freeze gate - [x] `analysis_decision_monitor_runner` Current-phase single-command monitor - [x] `automation_execution_layer_p7_monitor_maturity_rollup` P7-1 maturity rollup - [x] `automation_execution_layer_p7_remote_drift_check` P7-2 remote drift check - [x] `automation_execution_layer_p7_alert_decision_support_quality_review` P7-3 quality review - [x] `automation_execution_layer_p7_bounded_automation_slice_selector` P7-4 bounded automation slice selector - [x] `automation_execution_layer_p8_visual_watch_review_loop` P8 first slice - [x] `automation_execution_layer_p8_visual_watch_snapshot_capture_adapter` - [x] `automation_execution_layer_p8_visual_review_workbench_panel` - [x] `automation_execution_layer_p9_alert_quality_rollup` - [x] `automation_execution_layer_p10_visual_capture_retention_cleanup` - [x] `automation_execution_layer_p11_runtime_task_watchdog` - [x] `automation_execution_layer_p12_alert_silent_window_noise_control` - [x] `automation_execution_layer_p13_alert_dispatch_retry_recovery` - [x] `automation_execution_layer_p14_webhook_transport_retry` - [x] `automation_execution_layer_p15_pxx_tasklist_ready` - [x] `automation_execution_layer_p15_alert_noise_policy_matrix` - [x] `automation_execution_layer_p16_browser_screenshot_capture_adapter` - [x] `automation_execution_layer_p17_visual_trigger_roi_router` - [x] `automation_execution_layer_p18_visual_evidence_media_dispatch` - [x] `automation_execution_layer_p19_multi_channel_alert_routing` - [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` ## P15-PXX Finite Queue - [x] `P15` Alert Noise Policy Matrix - [x] `P16` Browser Screenshot Capture Adapter - [x] `P17` Visual Trigger ROI Router - [x] `P18` Visual Evidence Media Dispatch - [x] `P19` Multi-Channel Alert Routing - [x] `P20` Operator Digest And Review Queue - [x] `P21` Runtime Incident Journal - [x] `P22` Maintenance And Retention Rollup - [ ] `P23` End-To-End Unattended Harness - [ ] `P24` Remote Smoke And Ops Closure - [ ] `PXX` Automation Execution Closure Gate ## Backlog - [ ] Long-term target: complete `Real-time Assisted Trading V1` without enabling default live auto-trading