"""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'{html.escape(a)}{html.escape(b)}{html.escape(c)}' for a,b,c in items) doc='''SiteForge V8.19 验收汇总

SiteForge Enterprise V8.19

统一后台开发集成验收

验收结论

本地回归通过不等于正式 Art 编译或生产验收。下表区分实测与待完成项目。

'''+rows+'
项目状态证据或限制
' (r/'V8_19_验收汇总.html').write_text(doc,encoding='utf-8') print('V8.19 acceptance reports generated; cases:',x['tests_last_complete_round'])