feat: support database-truth formal launch reruns
This commit is contained in:
@@ -1240,3 +1240,72 @@
|
||||
- 本次批准门禁还有一个非阻断 warning:
|
||||
- `database truth source`: `database snapshot unavailable; fallback=csv`
|
||||
- 后续正式生产放行前,仍建议用远程 PostgreSQL 真相源参数复跑批准门禁,避免最终报告停留在 CSV fallback 口径。
|
||||
|
||||
## 2026-05-14 远程 PostgreSQL 真相源复跑与自动化总脚本透传增强
|
||||
|
||||
### 本轮先核对的阶段、边界与未完成项
|
||||
- 已再次核对路线图边界:
|
||||
- `ai-contract-platform` 负责合同业务语义与治理产品化。
|
||||
- `shared-ai-platform` / `shared-ai-platform-java` 继续承担通用 AI 能力,knowledge_bases 发布链远端能力缺口仍不在本仓库硬补。
|
||||
- 在当前阶段,最值得继续推进的不是再堆新功能,而是把正式上线批准门禁切回远程 PostgreSQL 真相源,避免批准报告继续停留在 `csv fallback`。
|
||||
|
||||
### 本轮完成项
|
||||
- 已再次确认远程产品库接入路径:
|
||||
- SSH 到 `root@192.168.3.90` 正常。
|
||||
- `ai-contract-platform-backend-1` 容器内 `DATABASE_URL=postgresql+psycopg://postgres:postgres@postgres:5432/ai_contract_platform`
|
||||
- `ai-contract-platform-postgres-1` 在 Docker 网络中的 IP 为 `172.18.0.3`
|
||||
- 本机已通过 SSH 隧道打通 `127.0.0.1:15432 -> 172.18.0.3:5432`
|
||||
- 已完成远程 PostgreSQL 真相源复跑:
|
||||
- `scripts/export-formal-launch-governance-db-state.ps1 -DatabaseUrl 'postgresql+psycopg://postgres:postgres@127.0.0.1:15432/ai_contract_platform'`
|
||||
- `scripts/import-formal-launch-governance-db.ps1 -DatabaseUrl 'postgresql+psycopg://postgres:postgres@127.0.0.1:15432/ai_contract_platform' -BatchName 'formal-launch-remote-truth-20260514'`
|
||||
- `scripts/run-formal-launch-approval-gate.ps1 -RequireDatabaseTruth -SkipPreparationGate -DatabaseUrl 'postgresql+psycopg://postgres:postgres@127.0.0.1:15432/ai_contract_platform'`
|
||||
- 已补强自动化总脚本:
|
||||
- `scripts/run-ai-contract-full-automation-until-blocked.ps1` 新增 `-FormalLaunchDatabaseUrl`
|
||||
- 同时新增 `-FormalLaunchRequireDatabaseTruth`
|
||||
- Phase 5 的 `formal-launch-approval-gate` 现在可以直接从总脚本透传数据库真相源参数,不再需要后续手工补跑一遍 database 模式门禁。
|
||||
|
||||
### 本轮验证
|
||||
- SSH 隧道数据库连通性:
|
||||
- 本机通过 `sqlalchemy + psycopg` 连接 `postgresql+psycopg://postgres:postgres@127.0.0.1:15432/ai_contract_platform`
|
||||
- 结果:`select 1` 成功返回 `1`
|
||||
- 远程 DB 快照(导入前):
|
||||
- `FORMAL_LAUNCH_GOVERNANCE_DB_STATE_PASS`
|
||||
- 产物:`project-docs/qa-artifacts/formal-launch-governance-db-state/2026-05-14T16-09-46-522/formal-launch-governance-db-state-summary.md`
|
||||
- 远程 DB 再导入:
|
||||
- `FORMAL_LAUNCH_GOVERNANCE_DB_IMPORT_PASS`
|
||||
- 产物:`project-docs/qa-artifacts/formal-launch-governance-db-import/2026-05-14T16-09-46-521/formal-launch-governance-db-import-summary.md`
|
||||
- 导入结果:`assets=0 / assignments=0 / decisions=0 / evidences=0`
|
||||
- 说明:本次为 no-op 导入,远程产品库中治理资产已存在,本轮没有新增记录,但会生成新的 release batch `formal-launch-remote-truth-20260514`
|
||||
- 远程 DB 快照(导入后):
|
||||
- `FORMAL_LAUNCH_GOVERNANCE_DB_STATE_PASS`
|
||||
- 产物:`project-docs/qa-artifacts/formal-launch-governance-db-state/2026-05-14T16-11-25-235/formal-launch-governance-db-state-summary.md`
|
||||
- 快照结果:`total_assets=117`、`review_tasks=167`、`missing_reviewer_tasks=0`
|
||||
- 数据库真相源批准门禁:
|
||||
- `FORMAL_LAUNCH_APPROVAL_GATE_BLOCKED`
|
||||
- `source_mode=database`
|
||||
- `warnings=0`
|
||||
- 产物:`project-docs/qa-artifacts/formal-launch-approval-gate/2026-05-14T16-11-25-336/formal-launch-approval-summary.md`
|
||||
- 自动化总脚本参数透传校验:
|
||||
- `scripts/run-ai-contract-full-automation-until-blocked.ps1 -StopAfterPhase0 -FormalLaunchDatabaseUrl 'postgresql+psycopg://postgres:postgres@127.0.0.1:15432/ai_contract_platform' -FormalLaunchRequireDatabaseTruth`
|
||||
- 结果:Phase 0 通过,说明新参数已被总脚本正常识别与接收。
|
||||
|
||||
### 当前状态更新
|
||||
- 正式上线批准门禁已经重新切回远程 PostgreSQL 真相源,`database snapshot unavailable; fallback=csv` 这一项已不再是当前门禁的 warning。
|
||||
- 当前真正的剩余阻塞已经完全收敛为真实人工批准事项,不再是数据库连通、门禁脚本能力或自动化编排缺口。
|
||||
- 自动化主线当前已有两种可用路径:
|
||||
- 常规全量主线:`scripts/run-ai-contract-full-automation-until-blocked.ps1`
|
||||
- 带数据库真相源的全量主线:在上面基础上追加 `-FormalLaunchDatabaseUrl` 与 `-FormalLaunchRequireDatabaseTruth`
|
||||
|
||||
### 当前阻塞项
|
||||
- 数据库真相源批准门禁仍为 `BLOCKED`,剩余 8 个必需阻塞项全部是真实人工签收:
|
||||
- `approved_review_tasks=0`,要求至少 31
|
||||
- `approved_materials=0`,要求 7
|
||||
- `approved_public_materials=0`,要求 3
|
||||
- `approved_templates=0`,要求至少 5
|
||||
- `approved_knowledge_cards=0`,要求至少 10
|
||||
- `approved_review_rules=0`,要求至少 8
|
||||
- `approved_clauses=0`,要求至少 8
|
||||
- `final launch approval checklist` 仍为 `TEMPLATE`
|
||||
- 当前数据库真相源快照里 `review_tasks=167`,而 CSV fallback 口径里最近一轮为 `99`
|
||||
- 这说明数据库真相源当前保留的是更完整的 assignment 级任务视图
|
||||
- 该差异目前不阻断门禁,但后续如果要统一审批统计口径,仍建议单独做一轮“CSV 与数据库 approval metrics 口径对齐”梳理。
|
||||
|
||||
@@ -6,7 +6,9 @@ param(
|
||||
[switch]$StopAfterPhase3,
|
||||
[switch]$StopAfterPhase4,
|
||||
[switch]$StopAfterPhase5,
|
||||
[string]$AdminPasswordFile = ""
|
||||
[string]$AdminPasswordFile = "",
|
||||
[string]$FormalLaunchDatabaseUrl = "",
|
||||
[switch]$FormalLaunchRequireDatabaseTruth
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
@@ -328,6 +330,13 @@ function Invoke-ScriptStep {
|
||||
}
|
||||
|
||||
$baselineArgs = if ($SkipBaseline) { @("-SkipBaseline") } else { @() }
|
||||
$formalLaunchApprovalArgs = @()
|
||||
if (-not [string]::IsNullOrWhiteSpace($FormalLaunchDatabaseUrl)) {
|
||||
$formalLaunchApprovalArgs += @("-DatabaseUrl", $FormalLaunchDatabaseUrl)
|
||||
}
|
||||
if ($FormalLaunchRequireDatabaseTruth) {
|
||||
$formalLaunchApprovalArgs += @("-RequireDatabaseTruth")
|
||||
}
|
||||
|
||||
$phaseDefinitions = @(
|
||||
[pscustomobject]@{
|
||||
@@ -430,7 +439,7 @@ $phaseDefinitions = @(
|
||||
New-ScriptStep -Step "scale-ops-gate" -ScriptName "run-scale-ops-gate.ps1"
|
||||
New-ScriptStep -Step "v2-roadmap-gate" -ScriptName "run-v2-roadmap-gate.ps1"
|
||||
New-ScriptStep -Step "formal-launch-preparation-gate" -ScriptName "run-formal-launch-preparation-gate.ps1"
|
||||
New-ScriptStep -Step "formal-launch-approval-gate" -ScriptName "run-formal-launch-approval-gate.ps1"
|
||||
New-ScriptStep -Step "formal-launch-approval-gate" -ScriptName "run-formal-launch-approval-gate.ps1" -Args $formalLaunchApprovalArgs
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user