fix(api): bound bootstrap lock during startup
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 34s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been skipped
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 34s
CD Pipeline / post-deploy-checks (push) Has been cancelled
CD Pipeline / build-and-deploy (push) Has been skipped
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
## 2026-06-30 — 08:19 API bootstrap controlled startup unblock
|
||||
|
||||
**照主線完成的實作**:
|
||||
- Production `awoooi-api` 新 image 已 rollout 到 pod,但新版 pod 卡在 `init_db()`,只剩舊 pod 對外服務,導致新 `agent-log-controlled-writeback-consumer-readback` route 仍未出現在正式 OpenAPI。
|
||||
- `apps/api/src/db/base.py` 已把無界 `pg_advisory_lock` 改成有界 `pg_try_advisory_lock`,bootstrap DDL 也加上 120 秒 timeout;逾時時記錄 fail-visible skip,避免冪等補欄流程把 API route rollout 永久卡成舊版。
|
||||
- 既有 DDL 序列化邊界仍保留:拿到 lock 才跑 bootstrap DDL,DDL 失敗仍釋放 lock;只是把非事故級 guard 改成 controlled apply 可讀回行為。
|
||||
|
||||
**驗證**:
|
||||
- Focused pytest:runtime bootstrap guards / LOG consumer readback / autonomous runtime-control / CD profile `41 passed`。
|
||||
- `ruff`、`py_compile`:通過。
|
||||
|
||||
**邊界**:未重啟主機,未刪 pod,未 rollout restart,未操作 DB / K8s write / Docker / firewall,未讀 secret / token / raw sessions / SQLite / `.env`,未使用 GitHub / `gh` / GitHub API。
|
||||
|
||||
## 2026-06-30 — 02:28 P1-LOG KM/RAG/PlayBook/MCP consumer readback
|
||||
|
||||
**照主線完成的實作**:
|
||||
|
||||
Reference in New Issue
Block a user