Files
cms-SiteForge/scripts/write_v819_acceptance.py
浅念 601451f22b upgrade: adopt V8.21.3 (V8.13→8.21.3: P5 SFTP/S3, P6 multilingual, editor overhaul, enterprise hardening)
Overlay ~150 upstream items onto our V8.12 base, preserving trade-pro
theme, registry tests, and design docs. Re-applied our patch set
(discovery/env_for/blocks.css/type-mapping/theme_color/frontend entries,
test_theme_pro_v3 mods) — all anchors survived upstream evolution.

New platform enhancement (fixes upgrade-introduced regression):
multilingual.site_locale now honors settings_json.locale, plus
PUT /api/i18n/sites/{id}/locale — standalone English sites get
<html lang='en'> under the V8.15 locale-rewrite pipeline.

compose: adopt V8.21.3 (image 8.21.3-dev.1, /api/ready probes, MySQL/S3
env) with project name pinned to siteforge-v8-10 (data volumes).

Tests: 356 passed / 11 failed — all 11 confirmed pre-existing in
pristine V8.21.3 on this host (10 upstream Windows env + our build test
now green after locale fix). Patch registry updated in plan doc.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-23 12:31:03 +08:00

35 lines
3.5 KiB
Python

"""Produce acceptance report from actual V8.19 result files; no invented passes."""
import json
import html
from pathlib import Path
from datetime import datetime,timezone
root=Path(__file__).resolve().parents[1]
r=root/'reports'
summary=r/'v819-regression.json'
if not summary.exists():raise SystemExit('missing v819-regression.json; run regression first')
x=json.loads(summary.read_text(encoding='utf-8'))
if x['status'] != 'PASS':raise SystemExit('regression incomplete or failed; refusing PASS acceptance')
repeatfile=r/'v819-regression-repeat2.json'
if repeatfile.exists():
repeated=json.loads(repeatfile.read_text(encoding='utf-8'))
if repeated['status'] != 'PASS' or repeated['repeats'] != 2:raise SystemExit('repeat regression did not pass')
repeats_note=f"2 rounds / {sum(t['passed'] for t in repeated['runs'] if t['status']=='PASS')} checks"
else:
repeats_note='single round only'
items=[('V8.19 全量自动化回归','PASS',f"{x['tests_last_complete_round']} tests / {x['modules']} modules; {repeats_note}"),
('本地 HTTP/Worker E2E','PASS (已单独运行)','参见运行日志;本工具不自动验证历史人工输出'),
('Art 路由及业务页面适配','PASS (fixture)','安装器测试;不是官方编译'),
('Art 官方 npm 构建','BLOCKED','缺少官方 Art 工程及其依赖'),
('Art PC/移动端浏览器验收','NOT RUN','需要官方构建与正常浏览器环境'),
('真实 PostgreSQL/Redis/HTTPS/发布','NOT RUN','需要独立环境实测')]
info={'version':'8.19.0-dev.1','generated_at':datetime.now(timezone.utc).isoformat(),'regression':x,'repeat_verification':repeats_note,'items':[dict(name=a,status=b,note=c) for a,b,c in items]}
(r/'V8_19_验收汇总.json').write_text(json.dumps(info,ensure_ascii=False,indent=2),encoding='utf-8')
text=['# SiteForge Enterprise V8.19 验收汇总','','**状态:开发集成回归已通过,生产/Art 官方验收尚未完成。**','',f"- 自动回归:{x['tests_last_complete_round']} 项;模块 {x['modules']};状态 {x['status']}。",'','| 验收项 | 状态 | 说明 |','|---|---|---|']
text += [f'| {a} | {b} | {c} |' for a,b,c in items]
(r/'V8_19_验收汇总.md').write_text('\n'.join(text)+'\n',encoding='utf-8')
rows=''.join(f'<tr><td>{html.escape(a)}</td><td>{html.escape(b)}</td><td>{html.escape(c)}</td></tr>' for a,b,c in items)
doc='''<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>SiteForge V8.19 验收汇总</title><style>body{margin:0;background:#f4f6fa;font:15px/1.6 system-ui,sans-serif;color:#263548}header{background:#1d354e;color:#fff;padding:42px 7%}header h1{margin:0}main{max-width:1000px;margin:32px auto;padding:24px;background:#fff;border-radius:16px;border:1px solid #e5e9f0}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:13px 10px;border-bottom:1px solid #e6ebf0}th{background:#f8fafc}p{color:#546379}@media(max-width:740px){main{margin:12px;overflow-x:auto;padding:14px}}</style></head><body><header><h1>SiteForge Enterprise V8.19</h1><p style="color:#d0d8df">统一后台开发集成验收</p></header><main><h2>验收结论</h2><p>本地回归通过不等于正式 Art 编译或生产验收。下表区分实测与待完成项目。</p><table><thead><tr><th>项目</th><th>状态</th><th>证据或限制</th></tr></thead><tbody>'''+rows+'</tbody></table></main></body></html>'
(r/'V8_19_验收汇总.html').write_text(doc,encoding='utf-8')
print('V8.19 acceptance reports generated; cases:',x['tests_last_complete_round'])