Files
ai-contract-platform/project-docs/V2-phase3-published-asset-snapshots-smoke-verification-2026-07-02.md
T
yuqei a3bb78e06b
Security Quality Gate / npm audit, Bandit, pip-audit, detect-secrets (pull_request) Failing after 16m35s
release: freeze V2 release candidate
2026-07-12 15:32:24 +08:00

105 lines
3.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AI 合同平台 V2 Phase 3 Slice 3.6:发布快照远端 Smoke 验证
日期:2026-07-02
## 环境
- 远端宿主机:`192.168.3.90`
- 远端目录:`/opt/apps/ai-contract-platform-v2-smoke`
- Compose project:`yuqei-contract-v2-smoke`
- Contract API:`http://192.168.3.90:18100`
- Contract Web:`http://192.168.3.90:13000`
- PostgreSQL 数据库:`yuqei_contract`
## 部署结果
本次执行 `yuqei-infra/scripts/deploy-v2-smoke-docker.ps1`,参数包括:
```powershell
-UseSshpass -AllowDirtyWorktree -KeepRemoteBackup -SkipSmoke
```
部署 artifact:
```text
project-docs/qa-artifacts/v2-smoke-docker-deploy/2026-07-02T15-20-07
```
部署脚本结果:
- 远端 Docker preflight:通过
- release archive 上传:通过
- Docker compose build/up:通过
- Contract API / AI Platform API / Contract Web health:通过
- AI golden sample gate:通过,90 samples / 6 suites / 16 checks
- V2 数据库 baseline:通过,`yuqei_contract`、`yuqei_ai`、`yuqei_ops` 存在
- review worker smoke:本轮跳过,本片专注 schema 与发布快照落表
## Schema Check
远端 `/api/v1/runtime/schema-check` 验证结果:
```json
{
"schema_status": "ok",
"alembic": {
"version_table": "contract_api_alembic_version",
"actual": "20260702_0026",
"expected_head": "20260702_0026"
},
"core_tables": "ok",
"governance_columns": "ok"
}
```
PostgreSQL 直接验证:
```text
alembic=20260702_0026
tables=template_published_snapshots,legal_asset_published_snapshots
```
## 发布快照专项验证
本轮在 smoke 环境发布了三类资产,并用 `published_event_id + version` 精确查询快照表。
版本前缀:
```text
snapshot-smoke-20260702032720
```
验证结果:
```text
PUBLISHED_ASSET_SNAPSHOT_SMOKE_PASS
template_event_id=template-event-4f18f17f18c9 count=1
clause_event_id=legal-asset-event-009316cd7ed2 count=1
rule_event_id=legal-asset-event-b038588b5949 count=1
```
快照内容抽样:
```text
template_detail=snapshot-smoke-20260702032720-template|7|7|2236
clause_detail=snapshot-smoke-20260702032720-clause|签约主体与授权确认|168
rule_detail=snapshot-smoke-20260702032720-rule|签约主体和授权代表核验不足|CLAUSE-COMMON-AUTHORIZATION-001
```
含义:
- 模板发布快照写入 `template_published_snapshots`,正文长度为 2236,关联 7 个条款、7 个规则。
- 标准条款发布快照写入 `legal_asset_published_snapshots`,payload 包含条款标题与推荐文本。
- 审查规则发布快照写入 `legal_asset_published_snapshots`,payload 包含规则标题与关联条款 ID。
## 结论
Phase 3 Slice 3.6 第一片已在权威 V2 smoke PostgreSQL / Docker 环境验证通过:
- Alembic 已升级到 `20260702_0026`
- Runtime schema-check 为 `ok`
- 两张发布快照表存在并纳入 schema/governance 检查
- 模板、标准条款、审查规则发布动作均能生成对应发布快照
下一片可以进入运行时读路径切换:模板起草、条款推荐、审查规则命中、法规变更影响扫描逐步改为发布快照表优先。