fix(ci): harden migration audit seed
All checks were successful
Code Review / ai-code-review (push) Successful in 10s

This commit is contained in:
Your Name
2026-05-13 03:40:41 +08:00
parent 124c3c545b
commit feda8a0b4b
2 changed files with 35 additions and 9 deletions

View File

@@ -1,3 +1,31 @@
## 2026-05-12 | run-migration audit seed 再修正
**背景**Gitea `run-migration``Seed asset_discovery_run (audit)` 再次失敗:
```text
ERROR: syntax error at or near ":"
LINE 16: 'commit_sha', :'commit_sha',
```
**修正**
- `.gitea/workflows/run-migration.yml` 不再依賴 `psql``:'commit_sha'` / `:'files_json'` 變數展開。
- 改由 `jq` 先產生完整 `summary` JSON再以 shell-safe SQL literal 寫入 `asset_discovery_run.summary`
- 保留 owner connection fallback只修 audit seed不改 migration apply 流程。
**驗證**
- `ruby -e 'require "yaml"; YAML.load_file(".gitea/workflows/run-migration.yml")'`yaml ok。
- 抽出 `Seed asset_discovery_run (audit)` step 後 `bash -n`:通過。
- mock `psql` 實跑該 steprendered SQL 已無 `:'...'` psql 變數,並包含 `commit_sha` / `files` JSON。
- `git diff --check`:通過。
**整體進度**
- Wave 0MOMO PostgreSQL backup → AwoooP 失敗通知接線完成並已推版。
- Truth-chain T0read-only truth-chain API 完成、部署、production smoke 完成。
- T1Channel Event hardening 完成、部署、production smoke 完成。
- T2legacy MCP audit bridge / backfill / truth-chain visibility 完成、部署、production smoke 完成first-class MCP Gateway enforced path 仍待後續 wave。
- 本次CI migration audit seed 紅燈修正完成,待推 Gitea main 觀察下一次 `run-migration`
- 下一步:回到 T3 Ansible declarative executor 盤點與 first-class audit surface。
## 2026-05-12 | Truth-chain T0 read-only API 第一版
**背景**:完成 Telegram / AwoooP truth-chain live audit 後,下一步先做不改 runtime 的 T0 查詢端點,避免再只靠 Telegram 文案或人工 SQL 判斷流程卡點。