fix(agent99): dispatch actionable alerts with receipts
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m27s
CD Pipeline / build-and-deploy (push) Successful in 6m39s
CD Pipeline / post-deploy-checks (push) Successful in 1m55s

This commit is contained in:
ogt
2026-07-11 09:43:48 +08:00
parent f102616f02
commit 34e32f6ed6
16 changed files with 870 additions and 89 deletions

View File

@@ -1,6 +1,6 @@
{
"schema_version": "agent99_enterprise_ai_automation_work_items_v1",
"generated_at": "2026-07-10T19:40:00+08:00",
"generated_at": "2026-07-11T10:27:00+08:00",
"status": "in_progress_p0_alert_routing_grouping_dedupe",
"scope_complete": false,
"north_star": "Make Windows host 192.168.0.99 the policy-controlled on-prem AI execution node for all hosts, VMs, services, products, sites, tools, packages, alerts and recovery workflows, with external monitoring when host 99 is unavailable.",
@@ -19,30 +19,51 @@
"current_p0": {
"id": "AG99-P0-002",
"title": "Alert taxonomy, routing, grouping and dedupe",
"reason": "Explicit event kind and suggested mode are not consistently authoritative, and forwarding before grouping can create wrong-domain or duplicate Agent99 work.",
"implementation_status": "local_package_and_contract_green_runtime_deploy_pending",
"next_action": "Finish the current Gitea source receipt, atomically deploy the tested Agent99 package to Windows 99 when an authenticated no-secret management channel is available, then replay backup, provider, reboot, PostgreSQL, host and K3s events against the runtime manifest."
"reason": "Direct Alertmanager events and actionable Telegram cards did not share one receipt and resolution contract; cold-start could be misclassified as Kubernetes and failed CI/CD cards were not mirrored to Agent99.",
"implementation_status": "source_candidate_and_contract_green_runtime_deploy_pending",
"next_action": "Finish the Gitea source receipt and single-writer CD coordination, atomically deploy the tested package to Windows 99, verify the runtime manifest, then replay exact ACTION REQUIRED cold-start and CI/CD failure cards plus the existing alert corpus."
},
"current_runtime_truth": {
"observed_at": "2026-07-10T15:04:27+08:00",
"observed_at": "2026-07-11T10:27:41+08:00",
"awoooi_health_http_status": 200,
"awoooi_health_state": "degraded",
"awoooi_runtime_build_commit_sha": "4a4b95e5135e8cf71d807a54700a962f5490088f",
"gitea_main_observed_sha": "f102616f0",
"gitea_main_deployed_source_sha": "4a4b95e5135e8cf71d807a54700a962f5490088f",
"runtime_work_items_generated_at": "2026-07-10T19:40:00+08:00",
"windows99_agent99_manifest_observed_at": "2026-07-11T09:51:00+08:00",
"windows99_agent99_source_revision": "e478ee128dfa046a9ddad872d3f60446e4477486e",
"windows99_agent99_runtime_matched": true,
"windows99_agent99_runtime_file_count": 14,
"windows99_agent99_runtime_mismatch_count": 0,
"reboot_slo_status": "blocked_reboot_auto_recovery_slo_not_ready",
"reboot_slo_readiness_percent": 60,
"reboot_slo_primary_blocker": "reboot_event_required_host_unreachable",
"reboot_slo_readiness_percent": 33,
"reboot_slo_primary_blocker": "fresh_all_host_reboot_event_missing",
"reboot_slo_active_blockers": [
"all_required_hosts_not_in_10_minute_reboot_window",
"fresh_all_host_reboot_event_missing",
"host_boot_observation_older_than_target_window",
"host_unreachable_after_reboot",
"host_uptime_unknown",
"reboot_event_required_host_unreachable",
"windows99_vmware_guest_power_not_ready",
"edge_public_maintenance_live_config_drift",
"windows99_vmware_vmx_missing",
"windows99_update_no_auto_reboot_policy_not_ready",
"privileged_edge_apply_channel_unavailable",
"windows99_vmware_autostart_config_not_ready"
"stockplatform_freshness_blocked",
"stockplatform_ingestion_blocked",
"post_start_blocked_not_zero",
"service_green_not_1",
"fresh_all_host_reboot_event_missing",
"windows99_vmware_autostart_config_not_ready",
"product_data_green_not_1",
"stockplatform_freshness_core_market_index_daily_tw_stale",
"stockplatform_freshness_core_price_daily_missing",
"stockplatform_freshness_core_chips_daily_missing",
"stockplatform_freshness_core_margin_short_daily_missing",
"stockplatform_freshness_ai_recommendations_stale",
"stockplatform_ingestion_core.price_daily_incomplete",
"stockplatform_ingestion_core.chips_daily_incomplete",
"stockplatform_ingestion_core.margin_short_daily_incomplete",
"stockplatform_ingestion_core.market_index_daily.tw_incomplete"
],
"claims_forbidden": [
"all_services_recovered_within_10_minutes",
@@ -304,22 +325,29 @@
"title": "Alert taxonomy, routing, grouping and dedupe",
"owner_lane": "awoooi_alert_router_agent99_ingress",
"dependencies": ["AG99-P0-001"],
"scope_refs": ["all:alerts", "platform:AWOOOI", "host:99"],
"problem": "Source text contaminates routing and the bridge forwards before grouping, creating wrong modes and duplicate incidents.",
"trigger": "Any normalized alert or Telegram monitoring event entering the AWOOOI-to-Agent99 bridge.",
"scope_refs": ["all:alerts", "platform:AWOOOI", "host:99", "surface:Telegram"],
"problem": "Source text can contaminate routing, actionable Telegram cards can bypass Agent99, transport responses can be mistaken for accepted work, and wrong modes or duplicate incidents can result.",
"trigger": "Any normalized Alertmanager event, AI automation card, ACTION REQUIRED incident card, or failed AWOOOI CI/CD card entering the AWOOOI-to-Agent99 bridge.",
"ai_role": "Normalized incident classifier",
"action_mode": "controlled_apply",
"evidence_sources": ["Alertmanager payload", "suggestedMode", "event kind", "fingerprint", "five-minute grouping window"],
"controlled_actions": ["prioritize explicit kind and suggested mode", "group before bridge", "single-flight by incident fingerprint"],
"evidence_sources": ["Alertmanager payload", "Telegram outbound source envelope", "relay acceptance receipt", "suggestedMode", "event kind", "fingerprint", "five-minute grouping window"],
"controlled_actions": ["prioritize explicit kind and suggested mode", "group before bridge", "single-flight by incident fingerprint", "mirror actionable cards", "retain sanitized dispatch receipt", "propagate source-event resolution policy"],
"prohibited_actions": ["route from source name alone", "emit duplicate same-state incidents"],
"rollback": "Restore previous router while keeping dedupe store and queued events intact.",
"verifier": "Replay routing corpus and assert one active incident and expected mode per fingerprint.",
"verifier": "Replay exact Alertmanager and Telegram card corpus; assert one active incident, expected mode, accepted relay receipt, runtime evidence and legal source-event closure per fingerprint.",
"callback": "Publish normalized route decision and dedupe reason to AWOOOI and AwoooP.",
"acceptance": "Known backup, provider, reboot, PostgreSQL, host and K3s samples route to the correct lane with no duplicate same-state dispatch.",
"completion_percent": 80,
"implementation_progress": "Local Agent99 contract and synthetic replay are green; Windows 99 runtime deployment and runtime replay remain pending.",
"evidence_refs": ["local Agent99 PowerShell contract 19/19", "local Agent99 synthetic replay 8/8", "isolated atomic deploy test passed"],
"next_action": "Deploy the tested package atomically to Windows 99, verify the runtime manifest, and rerun the routing/dedupe corpus through the live ingress."
"acceptance": "Known ACTION REQUIRED cold-start, CI/CD failure, backup, provider, reboot, PostgreSQL, host and K3s samples route to the correct lane with no duplicate same-state dispatch; every accepted dispatch has a durable receipt and runtime verifier outcome.",
"completion_percent": 85,
"completion_dimensions": {
"source_contract_percent": 100,
"test_contract_percent": 100,
"gitea_cd_percent": 0,
"windows99_runtime_percent": 0,
"live_replay_percent": 0
},
"implementation_progress": "Source dispatcher, receipt, taxonomy and resolution-policy contracts are green; Gitea CD, Windows 99 runtime deployment and exact live replay remain pending.",
"evidence_refs": ["131 focused tests passed after Gitea main rebase", "276 expanded all-Telegram and Agent99/RepairCandidate tests passed after Telegram single-owner integration", "repository static governance suite passed", "synthetic relay HTTP 202 ok=true inboxTriggered=true", "runtime work-items endpoint still serves 2026-07-10 snapshot"],
"next_action": "Finish the Gitea source receipt and single-writer coordination, deploy atomically to Windows 99, verify the runtime manifest, and rerun the exact actionable-card and Alertmanager corpus through live ingress."
},
{
"id": "AG99-P0-003",