docs(logbook): 記錄 backup restore 清冊正式驗證 [skip ci]
This commit is contained in:
@@ -1,3 +1,59 @@
|
||||
## 2026-06-11|IwoooS P1-3 Backup / restore / escrow / retention repo-only 清冊
|
||||
|
||||
**背景**:統帥要求所有重要配置都要被資安控管;Backup / restore / offsite / escrow / retention 屬於 C0 高價值配置,若誤執行 `backup-all`、`rclone sync`、remote delete、`restic prune`、escrow marker write 或 Velero restore,會直接影響可恢復性與 credential recovery。本段延續「先建立框架、只讀證據、低摩擦流程,再階段性收攏」原則,只做 repo-only 清冊,不碰 live host、不執行任何 backup / restore / offsite sync。
|
||||
|
||||
**完成**:
|
||||
|
||||
- 新增 `backup_restore_escrow_inventory_v1` 產生器、schema、snapshot 與人讀文件,納入 `38` 個 repo-only surface。
|
||||
- 清冊覆蓋 backup orchestration、`15` 個 backup script surface、`8` 個 offsite / escrow surface、`5` 個 Velero surface、`3` 個 retention surface、`5` 個 credential surface、backup / restore alert rules 與 cold-start / DR runbook。
|
||||
- 標記 `27` 個 write-capable surface;所有 surface 均固定 owner response required 與 live evidence required。
|
||||
- owner response received / accepted、live evidence、restore drill acceptance、offsite sync acceptance、credential escrow acceptance、retention change acceptance、maintenance window、rollback owner、runtime gate 與 action button 全部仍為 `0`。
|
||||
- 高價值配置覆蓋矩陣的 `backup_restore_credential` 從 `52%` 推進到 `58%`;高價值配置平均只讀成熟度維持 `65%`。這只代表 repo-only 清冊完成,不代表 live backup、restore drill、offsite sync 或 credential escrow 已驗證或可執行。
|
||||
- IwoooS posture projection snapshot / schema、`security-mirror-progress-guard.py`、高價值配置文件、配置控管總清冊與前端高價值配置卡已同步新口徑。
|
||||
- `/zh-TW/iwooos` 的 P1-3 卡由 `52%` 更新為 `58%`,並新增 `backup_restore_escrow_inventory_surface_count=38`、`backup_restore_escrow_inventory_write_capable_surface_count=27`、`backup_restore_escrow_inventory_runtime_gate_count=0`、`backup_run_authorized=false`、`restore_run_authorized=false`、`restore_drill_authorized=false`、`offsite_sync_authorized=false`、`offsite_remote_delete_authorized=false`、`credential_escrow_marker_write_authorized=false`、`retention_change_authorized=false`、`restic_prune_authorized=false`、`rclone_config_authorized=false`、`velero_restore_authorized=false` 等前台邊界標記;仍無任何操作按鈕。
|
||||
|
||||
**本地驗證**:
|
||||
|
||||
- `python3 scripts/security/backup-restore-escrow-inventory.py --root . --output /tmp/backup-restore-escrow-inventory-check.json`:`BACKUP_RESTORE_ESCROW_INVENTORY_OK surfaces=38 backup_scripts=15 offsite_escrow=8 runtime_gate=0`。
|
||||
- `python3 scripts/security/high-value-config-control-coverage.py --root . --output /tmp/high-value-config-control-coverage-check.json`:`HIGH_VALUE_CONFIG_CONTROL_COVERAGE_OK categories=14 c0=8 avg=65 runtime_gate=0`。
|
||||
- `python3 scripts/security/security-mirror-progress-guard.py --root .`:`SECURITY_MIRROR_PROGRESS_GUARD_OK`。
|
||||
- `python3 scripts/security/source-control-owner-response-guard.py --root .`:`SOURCE_CONTROL_OWNER_RESPONSE_GUARD_OK`。
|
||||
- `python3 -m py_compile scripts/security/backup-restore-escrow-inventory.py scripts/security/high-value-config-control-coverage.py scripts/security/security-mirror-progress-guard.py`:通過。
|
||||
- JSON parse:backup / restore snapshot / schema、高價值覆蓋 snapshot / schema、IwoooS posture projection snapshot / schema、`zh-TW.json`、`en.json` 通過。
|
||||
- `cmp -s apps/web/messages/zh-TW.json apps/web/messages/en.json`:通過。
|
||||
- 本次變更檔案針對指定內部視窗與請求片語掃描:命中 `0`。
|
||||
- `python3 scripts/ops/doc-secrets-sanity-check.py docs .gitea`:`DOC_SECRET_SANITY_OK scanned_files=691`。
|
||||
- `pnpm --filter @awoooi/web typecheck`:通過;驗證產生的 `apps/web/tsconfig.tsbuildinfo` 暫態變更已排除。
|
||||
- `git diff --check`:通過。
|
||||
|
||||
**Gitea / deploy**:
|
||||
|
||||
- 先同步另一個 Session 推進的 `803d7c4a feat(governance): 新增 owner approved learning dry run` 與後續 `e605076d fix(i18n): 補 owner dry run 狀態文案`,再接續 P1-3,避免覆蓋 P2-403F。
|
||||
- Code commit:`93a1993d feat(security): 新增 backup restore escrow 只讀清冊`。
|
||||
- Code-review run:`2727` 成功。
|
||||
- CD run:`2726` 成功;deploy marker:`96d1f2c5 chore(cd): deploy 93a1993 [skip ci]`。
|
||||
|
||||
**正式站驗證**:
|
||||
|
||||
- Desktop `1280x720`:`https://awoooi.wooo.work/zh-TW/iwooos?_v=96d1f2c5-backup-restore-prod-desktop`,`IwoooS` 高價值配置覆蓋矩陣存在,P1-3 備份 / 還原 / 金庫卡顯示 `58%`;`clientWidth=1274`、`scrollWidth=1274`、`horizontalOverflow=false`。
|
||||
- Desktop DOM:`data-testid="iwooos-high-value-config-control-coverage-board"` 與 `data-testid="iwooos-high-value-config-control-coverage-boundaries"` 存在;卡內可操作元素 `0`;boundary DOM 含 `backup_restore_escrow_inventory_surface_count=38`、`backup_restore_escrow_inventory_write_capable_surface_count=27`、`backup_restore_escrow_inventory_runtime_gate_count=0`、`backup_run_authorized=false`、`restore_run_authorized=false`、`restore_drill_authorized=false`、`offsite_sync_authorized=false`、`credential_escrow_marker_write_authorized=false`、`retention_change_authorized=false`、`restic_prune_authorized=false`、`velero_restore_authorized=false`。
|
||||
- Mobile `390x844`:`https://awoooi.wooo.work/zh-TW/iwooos?_v=96d1f2c5-backup-restore-prod-mobile`,`clientWidth=384`、`scrollWidth=384`、`horizontalOverflow=false`;同樣可見 `58%`、`38`、`27` 與所有 backup / restore boundary,卡內可操作元素 `0`。
|
||||
- 目標敏感片語正式站 DOM 掃描:命中 `0`。
|
||||
- 截圖:`/tmp/awoooi-iwooos-backup-restore-prod-desktop-96d1f2c5.png`、`/tmp/awoooi-iwooos-backup-restore-prod-mobile-96d1f2c5.png`。
|
||||
- 驗證後已還原 in-app browser viewport 至預設。
|
||||
|
||||
**完成度同步**:
|
||||
|
||||
- P1-3 repo-only surface 註冊:`100%`。
|
||||
- source existence / SHA256 hash:`100%`。
|
||||
- Backup / restore / credential 高價值配置成熟度:`52% -> 58%`。
|
||||
- owner response 收件 / 接受:`0%`。
|
||||
- live evidence collection:`0%`。
|
||||
- restore drill / offsite sync / credential escrow / retention change gate:`0%`。
|
||||
- IwoooS 整體仍維持 `64%`;active runtime gate 仍 `0`。
|
||||
|
||||
**邊界**:本段未執行 `backup-all.sh`、未執行任何 service backup、未執行 `restic check`、未執行 `restic forget --prune`、未執行 `rclone sync`、未讀遠端 offsite、未寫 escrow marker、未修改 rclone / B2 設定、未 apply Velero manifest、未跑 restore dry-run、未寫 Prometheus textfile、未 reload alert rules、未 SSH、未收 secret value、未 active scan、未新增任何前端執行按鈕。
|
||||
|
||||
## 2026-06-11|P2-403F Owner-approved Learning Dry-run Preview
|
||||
|
||||
**背景**:統帥指出「批准後仍沒有自動化,也沒有人工處理選項或明確說明」。P2-403D / P2-403E 已把 learning writeback 與 Telegram receipt 拆成批准包,但批准後的下一步仍不能直接寫 KM 或發 Telegram。本段先把 owner approval 後應產生的 dry-run preview、人工操作選項、補證路徑、驗證與 rollback 契約做成只讀 API 與治理頁區塊。
|
||||
|
||||
Reference in New Issue
Block a user