Files
ai-contract-platform/project-docs/V2-phase3-structured-review-results-smoke-verification-2026-07-01.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

161 lines
3.2 KiB
Markdown

# V2 Phase 3 Structured Review Results Smoke Verification
Date: 2026-07-01
Remote smoke environment:
- Host: `192.168.3.90`
- Path: `/opt/apps/ai-contract-platform-v2-smoke`
- Compose project: `yuqei-contract-v2-smoke`
- Contract API: `http://192.168.3.90:18100`
- Database: `yuqei_contract`
## Deploy
Updated the smoke environment with the current V2 code without resetting PostgreSQL volumes.
Command shape:
```powershell
$env:SSHPASS='***'
powershell.exe -NoProfile -ExecutionPolicy Bypass -File yuqei-infra\scripts\deploy-v2-smoke-docker.ps1 `
-UseSshpass `
-AllowDirtyWorktree `
-KeepRemoteBackup `
-SkipSmoke
```
Deploy artifact:
- `project-docs/qa-artifacts/v2-smoke-docker-deploy/2026-07-01T00-10-19`
Deploy result:
- Remote Docker preflight passed.
- Compose deploy passed.
- Contract Web, Contract API, and AI Platform API health checks passed.
- AI golden sample gate passed: `90` samples, `6` suites, `16` checks.
- V2 databases `yuqei_contract`, `yuqei_ai`, and `yuqei_ops` exist.
## Migration
Contract API Alembic result in smoke container:
```text
20260630_0023 (head)
20260630_0023 (head)
```
`/api/v1/runtime/schema-check` result:
- Overall status: `ok`
- `database_backend`: `ok`
- `database_name`: `ok`
- `alembic_version`: `ok`
- `core_tables`: `ok`
- `governance_columns`: `ok`
- `action_hint_columns`: `ok`
- `display_cache_consistency`: `ok`
- `display_cache_cleanup_prestate`: `ok`
- `postgres_extensions`: `ok`
## Backfill
Before backfill:
```text
review_tasks: 16008
review_risk_items: 0
review_citations: 0
review_repair_actions: 0
```
Initial assess:
```json
{
"review_task_count": 16007,
"candidate_task_count": 4005,
"missing_task_count": 4005,
"structured_risk_count": 0,
"structured_citation_count": 0
}
```
Non-force apply:
```json
{
"mode": "apply",
"force": false,
"candidate_task_count": 4005,
"missing_task_count": 4005,
"updated_task_count": 4005,
"structured_risk_count": 4008,
"structured_citation_count": 4013
}
```
Second non-force apply:
```json
{
"mode": "apply",
"force": false,
"missing_task_count": 0,
"updated_task_count": 0,
"structured_risk_count": 4008,
"structured_citation_count": 4013
}
```
This confirms the command is idempotent in the smoke PostgreSQL environment.
## Review Smoke
Created a new smoke contract and review task after backfill:
- Contract id: `contract-9d8c4d18c05a`
- Review task id: `review-79a4c3ae6aed`
- AI audit run id: `run-6fc1602c5031`
Review result:
```json
{
"status": "succeeded",
"risk_items": 2,
"citations": 3,
"ai_audit_run_id": "run-6fc1602c5031"
}
```
Structured rows for the new review task:
```text
structured_risks: 2
structured_citations: 3
```
Final assess:
```json
{
"review_task_count": 16008,
"candidate_task_count": 4006,
"missing_task_count": 0,
"structured_risk_count": 4010,
"structured_citation_count": 4016
}
```
## Result
Smoke verification passed:
- `20260630_0023` is applied in the authoritative V2 smoke PostgreSQL environment.
- Historical structured review result backfill completed.
- Re-running non-force apply is idempotent.
- Runtime schema-check is healthy.
- New review completion dual-writes JSON review results and structured risk/citation rows.