Commit Graph

2 Commits

Author SHA1 Message Date
浅念 c26d6b9a73 fix(deploy): review fixes — smoke photoId field, web healthcheck wget, outbox table name, cdn key shape
Reviewer findings on p5-prep batch:
1. BLOCKING: prod-smoke.sh visibility grep used "id" but API items
   serialize photoId (cn public.service / ov public-ov.service) — every
   healthy deployment would false-FAIL release gate ④. 4 sites fixed.
2. web/web-ov healthchecks used curl on nginx:alpine (absent) → perpetual
   false-unhealthy; switched to busybox wget.
3. RUNBOOK rollback rule cited nonexistent sync_outbox → outbox_events.
4. cdn-checklist invalidation sample key shape aligned to actual
   variantsObjectKey layout (.../albums/{albumId}/variants/{photoId}/{version}/{variant}.jpg).

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 02:03:44 +08:00
浅念 a79fff5b9c docs(deploy): runbook with smoke script and emergency channel
P5-prep Task 2(docs/plans/2026-09-21-P5-准备件.md):

- infra/deploy/RUNBOOK.md:发布前检查单(备份/水位快照(outbox_events
  deliveredAt、sync_state appliedVersion)/镜像 tag/env diff/磁盘);发布步骤
  (迁移先行 → ov 后 cn 逐容器替换 → 四点冒烟 → 观察);回滚步骤(镜像回旧
  tag、迁移不回滚的向前兼容原则、outbox/inbox/水位账本硬性保留、冻结 sync
  的故障处置);紧急停用通道(ov emergency HMAC 调用样例,openssl dgst 可
  复制片段,签名公式与 internal-sync.ts 实现交叉验证一致);故障速查三类
  (同步积压/计数差异/CDN 缓存与隐藏照片失效窗口)。
- scripts/prod-smoke.sh:四点冒烟(两地域 health → 登录 → 时间戳相册 + 内嵌
  800x600 JPEG 真实 presign PUT → complete → cn/ov 公开读轮询 ≤60s),
  PASS/FAIL 摘要 + 软删照片清理;--dry-run 打印调用序列、--skip-ov/--ov
  跳过 ov 段、--wait-seconds 可调;仅依赖 bash+curl+openssl+base64。

验证:bash -n 通过;--dry-run / --skip-ov / 用法错误三路径本地实测输出正确
(含密码 JSON 转义);真实栈未起(无凭证,符合准备件边界),首次真实验证
点在 README-1Panel.md §7 演练步骤。

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-21 01:40:04 +08:00