fix(recovery): remove 188 deploy sudo secret
Some checks failed
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Failing after 3m13s
CD Pipeline / build-and-deploy (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped

This commit is contained in:
Your Name
2026-06-30 22:40:24 +08:00
parent 1c3c7279ac
commit b474f80c66
3 changed files with 30 additions and 11 deletions

View File

@@ -50787,11 +50787,13 @@ production browser smoke:
- 讀回 188 host hygiene`awoooi-startup.service` 因 300 秒 timeout 失敗,卡在 ClawBot `docker compose build --no-cache`;但 live `clawbot` / `clawbot-redis` 容器已 healthy證明舊 startup path 會把單一 rebuild 誤放大成整機 post-reboot failed。
- 修正 `scripts/reboot-recovery/awoooi-startup.sh`ClawBot startup 改成 bounded `docker compose up -d`rebuild 預設 opt-in (`CLAWBOT_STARTUP_REBUILD_ALLOWED=0`) 且有 timeout移除預設 `--no-cache` rebuild。
- 修正 `scripts/reboot-recovery/awoooi-startup.service``TimeoutStartSec=600`,對齊 10 分鐘 SLO但不允許單一服務 rebuild 佔滿整個恢復窗口。
- 修正 `scripts/reboot-recovery/deploy-to-188.sh`:移除硬編碼 sudo credential 與 `sudo -S` 路徑deploy helper 改為 passwordless sudo / explicit TTY sudo fail-closed不保存、不讀取、不回顯密碼。
- 補 `scripts/reboot-recovery/tests/test_188_host_hygiene_checklist.py`,鎖住 bounded / opt-in rebuild 與 600 秒 unit timeout。
**本地驗證結果**
- `bash -n scripts/reboot-recovery/awoooi-startup.sh scripts/reboot-recovery/awoooi-startup.service scripts/reboot-recovery/188-host-hygiene-maintenance-checklist.sh`:通過。
- `DATABASE_URL=sqlite+aiosqlite:////tmp/awoooi-codex-api-test.db PYTHONPATH=apps/api python3.11 -m pytest scripts/reboot-recovery/tests/test_188_host_hygiene_checklist.py scripts/reboot-recovery/tests/test_reboot_auto_recovery_slo_scorecard.py ops/runner/test_cd_controlled_runtime_profile.py -q``42 passed`
- `bash -n scripts/reboot-recovery/deploy-to-188.sh``pytest scripts/reboot-recovery/tests/test_188_host_hygiene_checklist.py -q`通過deploy helper 本體不再含 `sudo -S` / `PASS=` / hardcoded credential。
- `python3.11 ops/runner/guard-gitea-runner-pressure.py --root .`:通過,`auto_branch_events_on_110=0``generic_runner_labels=0`
- `node scripts/ci/check-gitea-step-env-secrets.js .gitea/workflows/cd.yaml .gitea/workflows/harbor-110-local-repair.yaml`:通過。
@@ -50799,6 +50801,7 @@ production browser smoke:
- `https://registry.wooo.work/v2/``http://192.168.0.110:5000/v2/``https://harbor.wooo.work/api/v2.0/health` 仍回 502。
- public Gitea queue 仍是 `blocked_harbor_110_repair_no_matching_runner`CD `#4100` runningHarbor repair `#4099` Waitingno matching label `awoooi-host`
- Production delivery / SLO API 仍含 2026-06-29 舊資料,不可作為本輪恢復證據;本輪以 live `/tmp/awoooi-reboot-slo-live-20260630-2231-scorecard.json` 為準。
- 188 live `/usr/local/bin/awoooi-startup.sh` / unit 仍是舊版;`ollama@192.168.0.188` 目前 `sudo -n` 需要密碼,因此未使用舊 credential 路徑套用 live 檔案,避免把 secret 問題擴大。
**仍維持**
- 沒有讀 secret / token / `.env` / raw sessions / SQLite / auth沒有讀 `.runner` 內容。