fix(recovery): ignore false smoke process matches [skip ci]

This commit is contained in:
Your Name
2026-06-29 09:18:10 +08:00
parent f842694538
commit 992215443f
4 changed files with 96 additions and 2 deletions

View File

@@ -1,3 +1,29 @@
## 2026-06-29 — 09:13 post-reboot verifier false-positive 收斂與 service green readback
**背景**
- 09:05 machine-readable summary 因 `POST_START_SERVICE_WARNINGS=1``SERVICE_GREEN=0` / `OVERALL_DECLARATION=SERVICE_BLOCKED`,但 live evidence 顯示 route / K3s / backup / Stock freshness / 110 runner pressure 都已通過。
- 追查後確認 warning 來自 CPU process classifier 誤把 Gitea `git log` 參數中的 `.playwright-mcp` 當成 browser / smoke processhost runaway exporter 同時讀回 orphan browser group `0`、active Actions container/process `0`、host pressure gate `0`
**完成內容**
- 新增 `scripts/reboot-recovery/post-start-smoke-process-classifier.awk`,只把真 `chrome` / `chromium` process 或明確 smoke / Playwright command 算成 browser/smoke candidate排除 `git` / `gitea` / shell helper 自我匹配。
- `scripts/reboot-recovery/post-start-quick-check.sh` 改用此 classifier並把 cold-start `WARN>0 BLOCKED=0` 從 service warning 改為 evidence warningMOMO、Stock、backup、routes、CPU、runner 專門 gate 仍負責判斷 service impact。
- 新增 `scripts/reboot-recovery/tests/test_post_start_smoke_process_classifier.py`,覆蓋 `.playwright-mcp` false positive、真 chromium 與 StockPlatform smoke 命中。
**驗證結果**
- `bash -n scripts/reboot-recovery/post-start-quick-check.sh`:通過。
- `python3.11 -m pytest scripts/reboot-recovery/tests/test_post_start_smoke_process_classifier.py scripts/reboot-recovery/tests/test_momo_source_arrival_gate.py -q``6 passed`
- `git diff --check`:通過。
- `post-reboot-readiness-summary.sh --no-color` artifact `/tmp/awoooi-post-reboot-readiness-20260629-091041-after-classifier/summary.txt``POST_START_PASS=43``POST_START_WARN=5``POST_START_BLOCKED=0``POST_START_SERVICE_WARNINGS=0``POST_START_BOUNDARY_WARNINGS=1``POST_START_EVIDENCE_WARNINGS=4``SERVICE_GREEN=1``PRODUCT_DATA_GREEN=1``STOCK_FRESHNESS_STATUS=ok``STOCK_LATEST_TRADING_DATE=2026-06-26``BACKUP_CORE_GREEN=1``HOST_188_HYGIENE_BLOCKED=0``WAZUH_MANAGER_REGISTRY_ACCEPTED=6``RUNTIME_ACTION_AUTHORIZED=0``OVERALL_DECLARATION=FULL_STACK_GREEN_DR_ESCROW_BLOCKED``NEXT_REQUIRED_GATES=credential_escrow_evidence`
- `post-reboot-declaration-guard.py --summary-file /tmp/awoooi-post-reboot-readiness-20260629-091041-after-classifier/summary.txt``POST_REBOOT_DECLARATION_GUARD_OK status=allowed_with_boundary_blockers allowed=5 forbidden=4 next_gates=1`
- `post-reboot-next-gate-dispatch.sh --summary-file ...``NEXT_GATE_COUNT=1`,唯一 gate 為 `credential_escrow_evidence`,要求 non-secret evidence id禁止 password / token / secret value / hash / prefix / suffix / raw credential。
- owner packet artifact `/tmp/awoooi-post-reboot-owner-packets-20260629-0913.json` 通過 contract guard`POST_REBOOT_OWNER_PACKET_CONTRACT_GUARD_OK gates=1 request_sent=0 accepted=0 runtime_gate=0`
- owner response preflight 正確 fail-closed`POST_REBOOT_OWNER_RESPONSE_PREFLIGHT_BLOCKED status=blocked_waiting_owner_response_file expected_gates=1 received=0 accepted=0 runtime_gate=0`
**仍維持**
- `ESCROW_MISSING_COUNT=5`,不得宣稱 `DR_COMPLETE`
- `MOMO_SOURCE_ARRIVAL_GATE status=blocked_source_absent_fail_closed``source_intake=0``runtime_write_authorized=0``db_write_authorized=0``drive_move_authorized=0`MOMO legitimate source 到達前不做 DB/Drive runtime write。
- non-110 runner registration token 仍是 secret 硬邊界;本段沒有讀、複製、貼上或外送 token / `.runner` 內容,也沒有啟動 188 runner service、重開 110 runner、使用 GitHub、force push、重啟 Docker / Nginx / firewall / K3s / DB。
## 2026-06-29 — 09:00 Public Gitea Actions queue readback verifier
**完成內容**