diff --git a/docs/LOGBOOK.md b/docs/LOGBOOK.md index 86274a958..de831ffc0 100644 --- a/docs/LOGBOOK.md +++ b/docs/LOGBOOK.md @@ -8,6 +8,23 @@ **仍維持**: - 未讀 secret / token / `.env` / raw sessions / SQLite / auth;未使用 GitHub / gh;未建立 repo、未改 visibility、未 sync refs、未 workflow_dispatch;未重啟 host / VM / service;未 Docker / Nginx / K3s / DB / firewall restart;未 DROP / TRUNCATE / restore / prune / delete / force push。 +## 2026-07-03 — 08:59 P0-006 reboot SLO readback 續跑與 Windows99 console 通道判定 + +**完成內容**: +- 依固定 P0 順序續跑 no-write / no-secret readback,artifact 固定在 `/tmp/awoooi-reboot-continue-20260703-085205`:Windows99 management channel、Windows99 VMware collector check、99 / 111 / 188 bounded socket probe、production reboot SLO scorecard。 +- Production `/api/v1/agents/reboot-auto-recovery-slo-scorecard` 08:59 readback 仍為 `status=blocked_reboot_auto_recovery_slo_not_ready`、`active_blocker_count=8`、`readiness_percent=67`、`primary_blocker=reboot_event_required_host_unreachable`;不能宣稱所有主機重啟後 10 分鐘內自動恢復。 +- Production readback 已縮到真 blocker:`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`、`windows99_vmware_vmx_missing`。service / product data / backup core / host 188 service rollup 目前為 green。 +- Windows99 runtime readback:`windows99_vmware_readback_present=true`、`windows99_vmrun_present=true`、`windows99_vmware_config_ready=false`、`windows99_vmware_power_ready=false`、`windows99_missing_vmx_aliases=["111"]`、`windows99_powered_off_aliases=["111","112","120","121","188"]`、`windows99_update_no_auto_reboot_ready=true`、`windows99_remote_execution_channel_ready=false`。 +- 99 no-secret management probe 仍顯示 RDP / Hyper-V VMConnect reachable,但 WinRM timeout、SSH BatchMode `permission_denied`;collector check 仍是 `blocked_ssh_publickey_auth_missing`,未嘗試密碼。 +- RDP console UI 測試只做 read-only 輸入通道驗證:Mac clipboard paste 進 PowerShell 時貼入 Windows 端舊內容,不能穩定送入 sentinel;畫面可見的既有 readback 顯示 `ping_192.168.0.111=False`,但未形成 validator 可接受的完整 `MODE=Verify` artifact。因此 console path 不能被當成自動收集完成。 + +**下一步**: +- 主線仍固定為 P0-1 / P0-4:恢復 99 no-secret management channel 或取得完整 console Verify stdout artifact,修正 111 VMX / reachability 事實,再重跑 host probe、reboot-event detector 與 SLO scorecard。 +- 不得用 RDP 畫面片段、截斷輸出或非 `MODE=Verify` marker 的 clipboard 內容餵 scorecard;不得啟動 / 關閉 VM、不得重啟 host / service、不得讀 Windows 密碼。 + +**仍維持**: +- 未讀 secret / token / `.env` / raw sessions / SQLite / auth;未使用 GitHub / gh;未 workflow_dispatch;未啟動或關閉 VM;未重啟 host / service;未 Docker / Nginx / K3s / DB / firewall restart;未 DROP / TRUNCATE / restore / prune / delete / force push。 + ## 2026-07-03 — 08:30 AwoooP readback endpoint fail-soft 補強 **完成內容**: diff --git a/docs/workplans/2026-06-04-reboot-cold-start-backup-recovery-workplan.md b/docs/workplans/2026-06-04-reboot-cold-start-backup-recovery-workplan.md index 5f9587914..d51f2e269 100644 --- a/docs/workplans/2026-06-04-reboot-cold-start-backup-recovery-workplan.md +++ b/docs/workplans/2026-06-04-reboot-cold-start-backup-recovery-workplan.md @@ -13,16 +13,16 @@ 本段覆蓋舊的「單次重啟後人工排查」做法。所有後續狀態回報必須依此順序推進;噪音若會遮蔽 P0,就掛回同一列,不另開支線。 -### 2026-07-03 08:23 最新 P0 覆蓋排序 +### 2026-07-03 08:59 最新 P0 覆蓋排序 下表覆蓋 2026-06-30 初始事故列;舊表保留為歷史追蹤。所有新插入需求必須掛在本表,不得再分散成臨時支線。 | 優先 | 狀態 | 工作項 | 最新證據 | 下一步 / 完成條件 | |------|------|--------|----------|-------------------| -| P0-1 | BLOCKED_HOST_WINDOWS | 全主機 reboot auto-detection / auto-trigger / 10 分鐘恢復 SLO | 2026-07-03 08:23 production scorecard:`status=blocked_reboot_auto_recovery_slo_not_ready`、`active_blocker_count=8`、`readiness_percent=67`、`primary_blocker=reboot_event_required_host_unreachable`、`can_claim_all_services_recovered_within_target=false`。no-write artifact `/tmp/awoooi-reboot-verify-only-20260703-082310`:`HOST_BOOT` rows `7`、111 unreachable、99 `uptime_seconds=unknown`、188 `systemd_state=degraded` / `startup_active=failed`,`reboot_detected=false`、`fresh_boot_hosts=[]`。 | 先收斂 99 / Windows99 / VMware 與 111:恢復 no-secret management channel 或 console verify stdout,讀回 VMX / VM power / host uptime,再 rerun host probe + reboot-event detector;不得 reboot、不得 VM power change、不得讀 Windows 密碼。 | +| P0-1 | BLOCKED_HOST_WINDOWS | 全主機 reboot auto-detection / auto-trigger / 10 分鐘恢復 SLO | 2026-07-03 08:59 production scorecard:`status=blocked_reboot_auto_recovery_slo_not_ready`、`active_blocker_count=8`、`readiness_percent=67`、`primary_blocker=reboot_event_required_host_unreachable`、`can_claim_all_services_recovered_within_target=false`。no-write artifact `/tmp/awoooi-reboot-continue-20260703-085205`:111 socket probe 仍 timeout / unreachable;99 RDP / VMConnect reachable 但 uptime unknown;188 socket probe reachable,前次 host probe 仍為 `systemd_state=degraded` / `startup_active=failed`。Production readback 同步顯示 `windows99_vmware_readback_present=true`、`windows99_vmware_config_ready=false`、`windows99_vmware_power_ready=false`、`windows99_missing_vmx_aliases=["111"]`、`windows99_powered_off_aliases=["111","112","120","121","188"]`。 | 先收斂 99 / Windows99 / VMware 與 111:恢復 no-secret management channel 或取得可靠 console verify stdout,讀回 VMX / VM power / host uptime,再 rerun host probe + reboot-event detector;不得 reboot、不得 VM power change、不得讀 Windows 密碼。 | | P0-2 | BLOCKED_EDGE_PRIVILEGED_APPLY | Deploy / reboot 期間 public 502 維護頁與外部 fallback | Gitea CD `#4519` 已推 deploy marker `3aca484 -> a94ddd5`,但 marker 後 public probe 仍讀到 `https://awoooi.wooo.work/api/v1/health` raw `502`、fallback header/body 空;live 188 `/etc/nginx/sites-enabled/awoooi.wooo.work.conf` 缺 maintenance fallback,`/var/www/maintenance/maintenance.html` 缺失,`ollama@188` 無 passwordless sudo。 | 先跑 `scripts/reboot-recovery/public-maintenance-edge-fallback-apply.sh --check` 留 drift receipt;具備 privileged channel 後執行 `--apply`,要求 backup、`nginx -t`、reload、public route probe 全綠。不得讀密碼、不得用 app restart 掩蓋 edge fallback drift。 | | P0-3 | PARTIAL_GREEN_SOURCE_RUNTIME | 所有產品 / 網站版本與資料最新性 | Gitea `main=89d4d6112`;Production SLO readback 對齊 deploy marker `89d4d6112 chore(cd): deploy 17ba08c [skip ci]`;Stock freshness `status=ok`、`latest_trading_date=2026-07-02`、blockers `[]`。AWOOOI health HTTP 200 但整體 `degraded`,SignOz / local Ollama 仍需列為 runtime degraded evidence。 | 將 source SHA / deploy marker / runtime endpoint / public route watch 固定進 scorecard;完成條件是每個 public product 都有 source、deploy、runtime、freshness 四層 readback,且 degraded components 有 owner lane。 | -| P0-4 | BLOCKED_WINDOWS99_AUTOSTART | 192.168.0.99 VMware 自動啟動與 VM guest 111 / 188 / 120 / 121 / 112 | 08:23 no-secret management probe:99 reachable、TCP `22 / 135 / 2179 / 3389 / 445=open`、RDP console / Hyper-V VMConnect reachable,WinRM `5985 / 5986=timeout`,`administrator` SSH BatchMode `permission_denied`,`can_collect_vmware_verify_without_secret=false`。collector check:`ssh_batchmode_auth_ready=0`、`verify_collection_status=blocked_ssh_publickey_auth_missing`、`remote_verify_attempted=0`。 | 只用 no-secret console / management collector 取得 `windows99-vmware-autostart.ps1 -Mode Verify` stdout,先以 `validate-windows99-console-verify-artifact.py` 轉成 normalized artifact,再重跑 SLO scorecard;完成條件是 VMX config ready、guest power ready、99 uptime known、all required host reachable。 | +| P0-4 | BLOCKED_WINDOWS99_AUTOSTART | 192.168.0.99 VMware 自動啟動與 VM guest 111 / 188 / 120 / 121 / 112 | 08:51 no-secret management probe:99 reachable、TCP `22 / 135 / 2179 / 3389 / 445=open`、RDP console / Hyper-V VMConnect reachable,WinRM `5985 / 5986=timeout`,`administrator` SSH BatchMode `permission_denied`,`can_collect_vmware_verify_without_secret=false`。collector check:`ssh_batchmode_auth_ready=0`、`verify_collection_status=blocked_ssh_publickey_auth_missing`、`remote_verify_attempted=0`。08:59 production scorecard 已有 Windows99 runtime readback,但回 `missing_vmx_aliases=["111"]`、guest power not ready;RDP console UI/clipboard 測試顯示 clipboard 會貼入 Windows 端舊內容,不能當可靠自動收集通道。 | 只用可靠 no-secret console / management collector 取得 `windows99-vmware-autostart.ps1 -Mode Verify` stdout,先以 `validate-windows99-console-verify-artifact.py` 轉成 normalized artifact,再重跑 SLO scorecard;完成條件是 VMX config ready、guest power ready、99 uptime known、all required host reachable。 | | P0-5 | RUNTIME_READY_BACKUP_RECEIPT_GAP | Gitea / 主機 / DB / 網站 / 服務 / 套件 / 工具 / log 備份監控告警 | Gitea repo bundle readback ready:expected `12`、rows `12`、missing `0`、failed `0`、sample restore dry-run ok;backup core green。2026-07-03 source / runtime 已部署 `awoooi_backup_alert_receipt_*` 指標與 Prometheus rules;110 exporter 讀回 88 個 stage requirement、188 讀回 12 個 stage requirement,`BackupAlertReceiptMetricMissing*` inactive,`BackupAlertReceiptStageMissing` 已修成每 `host / receipt_channel` 聚合 pending:110 一條、188 一條。 | 補 `/backup/alert-receipts/*.last_success` 脫敏 marker;下一層仍要補 Gitea full dump、DB/settings/issues/packages/LFS、所有工具與 log 全量備份監控。 | | P0-6 | RUNTIME_READY_ALERT_RECEIPT_GAP | 主機關機 / 重啟 / SLO miss / backup failure Telegram 告警 | Reboot per-blocker alert 與 backup receipt alert rules 已 deploy/readback;backup receipt 缺段不再產生 100 條 stage 噪音,現在聚合成 110 / 188 兩條 host-level pending。scorecard 仍有 8 個 reboot active blockers,尚未完成 shutdown / reboot / backup alert 的 production 脫敏 delivery receipt 全矩陣。 | 補 alert receipt readback:host down、host up、SLO miss、Windows99 blocker、backup stale/failed、deploy 502、freshness stale;完成條件是每類告警都有 sent / received / dedup / escalation evidence。 | | P0-7 | SOURCE_READY_SLA_AUTOMATION | 固定排查順序、ETA / wait reason、自動化判斷與修復 | Scorecard 已固定 `current_phase=host_boot_detection_blocked`、`eta_or_wait_reason=reboot_event_readback_missing_eta_unavailable`、`primary_blocker=reboot_event_required_host_unreachable`、fixed triage order 與 next safe action;08:23 artifact 固定下一步為 no-secret Windows99 verify / host probe rerun。10 分鐘內自動恢復仍未達標。 | 把每個 blocker 的 next_safe_action、post_verifier、forbidden_actions 接到自動 work item / Telegram / scorecard;完成條件是重啟後自動判斷、主動告警、主動 rerun verifier,不再人工臨場猜流程。 | @@ -47,6 +47,7 @@ - 版本最新性要同時看 source SHA、deploy marker、runtime SHA 與 public endpoint;不能只看 Gitea main。 - 2026-06-30 實測證明:source 上有 reboot detector / alert / VMware autostart / maintenance fallback 並不等於 runtime 已達標;必須同時讀回 all-host probe、SLO metric、public `/v2`、Stock freshness、backup-status、Telegram delivery。 - 2026-07-03 實測證明:host probe 本身若沒有 bounded TCP fallback,會從 verifier 層製造 partial evidence,讓 10 分鐘 SLO 無法判斷。`reboot-auto-recovery-host-probe.sh` 的 `nc -z` 必須由 `run_with_timeout` 包住;partial probe / missing host rows 一律 fail-closed,不可宣稱 all-host observed。 +- 2026-07-03 08:59 實測證明:RDP console 可見不等於 console artifact 可自動收集。若 Mac / RDP clipboard 只貼入 Windows 端舊內容,必須標記 `windows99_console_clipboard_unreliable` 類 blocker,回到 no-secret management channel 或人工 console stdout capture,不可用截斷 / 非 Verify marker 的畫面輸出餵 scorecard。 | Area | Status | Completion | Evidence | |------|--------|------------|----------|