Bring PS5 GTA6 to 120FPS with DLSS 5. An advanced Windows video player and capture enhancement tool featuring real-time preview for videos, images, and capture card sources. Combine AI-powered Super Resolution, DLSS5 image enhancement, and Frame Generation to deliver a next-generation visual experience.
C++
release: integrate tested repairs for local 2.0.5 packages
Veyra Goal Agent6beeab088680
diff --git a/AGENTS.md b/AGENTS.mdindex 7d230a48..efc90749 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1,5 +1,7 @@# Veyra 项目 Agent 执行规则+> **2026-10-07 2.0.5 本地整合授权**:用户明确要求先将目前完成的修复合入 main,构建 2.0.5 给用户测试,显存持续增长留待下一版本详细排查。按 `docs/RELEASE_2.0.5_PLAN_2026-10-07.md` 在 E盘 `codex/release-2.0.5-20261007` 整合已测 ef2069f/4c917aa 及其调查记录,仅修改版本、文档和必要构建/定向验收/打包脚本;不实施未证实的 NR Shutdown、驱动或显存假说修复。允许本地 commit/checkpoint/main 合并和 NVIDIA/AMD 同源码测试包,不新增 push/GitHub Release/上传/关机授权。独立不可变基线 `archives/release-2.0.5-20261007/start.json` 保护27个原工作树(main只按授权推进)、495个未提交文件及14份已发布文件;先执行本轮 control,不修改旧 guard/baseline。不派Agent、不做压力/竞争负载、不改DLL/模型/驱动/用户配置;测试每进程≤300秒,构建≤900秒,全部产物统一 E:/项目/Veyra。+> **2026-10-06 稳定性/导出/性能回归修复授权**:用户要求一起解决 AMD 补帧选择异常、补帧导出 DLSS 限制、NR 导出 1080p 限制、跨来源撕裂及 2.0.3→2.0.4 性能回退,确认使用当前电脑、NVIDIA 原版 NR、4K 视频输入。按 `docs/STABILITY_EXPORT_PRIORITY_PLAN_2026-10-06.md` 在 E盘 `codex/stability-export-priority-20261006` 从 main `578d63c` 隔离修复共享 graph/presenter/导出冻结与 codec/能力选择/QML及必要构建测试接点;本次具体范围覆盖历史冻结。先运行本轮 `scripts/acceptance/stability-export-priority-control.py`,独立开工基线不可修改;保留25个工作区及已发布包。不得派Agent、压力/竞争负载、修改DLL/模型/驱动/其他应用或用户配置。每个测试≤300秒,构建≤900秒,产物统一E盘。本轮交付本地可测修复包,未授权新的公开发布、贡献者消息或关机;AMD真实HIP推理、物理屏幕扫描与RTX软件测试分别报告。> **2026-10-06 PR #19/#20 审查与适配授权**:用户反馈9000系NR已通过其测试,并要求检查项目PR19、PR20、判断能否合并并做好适配。按 `docs/PR19_PR20_INTEGRATION_PLAN_2026-10-06.md`,从刚交付的 `63ce396` 在 E盘 `codex/pr19-pr20-20261006` 隔离审查/适配HDR输出调优、预设/会话迁移、QML、呈现metadata生命周期、MSVC日志转换和RemotePlay条件编译及必要构建/定向测试。此具体范围覆盖历史冻结,不复活暂缓的PR13/14。验证后允许将可合并PR及已测现场修复整合main,普通推送完成GitHub PR合并状态;保留作者原始提交、其他工作树和原发布资产。不派Agent,不做压力/竞争负载、不改DLL/模型/驱动或用户配置;测试每进程≤300秒,构建≤900秒,产物统一E盘。先运行独立 `scripts/acceptance/pr19-pr20-control.py`,开工start基线禁止修改。本轮无新Release/资产上传/贡献者消息或评论/关机请求。用户RX9000反馈与本机RTX/HDR软件验证分别报告,不外推全部型号或物理HDR实测。diff --git a/CMakeLists.txt b/CMakeLists.txtindex 5dfe3597..afc2cd45 100644--- a/CMakeLists.txt+++ b/CMakeLists.txt@@ -1,10 +1,10 @@cmake_minimum_required(VERSION 3.24)-project(veyra VERSION 2.0.4 LANGUAGES C CXX RC)+project(veyra VERSION 2.0.5 LANGUAGES C CXX RC)# Moonlight/Xbox have C sources independently of the optional PS5 backend.# Shown in the EXE's version resource and in the package name. CMake versions# must be numeric, so the beta marker lives here instead.-set(VEYRA_DISPLAY_VERSION "2.0.4" CACHE STRING "Human-readable version string")+set(VEYRA_DISPLAY_VERSION "2.0.5" CACHE STRING "Human-readable version string")# The cache keeps the first value it ever saw, so a release that bumps# project(VERSION) used to ship an EXE still stamped with the previous display# string. Re-align it whenever the cached label does not start with the projectdiff --git a/docs/BUILD_2.0.5.md b/docs/BUILD_2.0.5.mdnew file mode 100644index 00000000..2003f826--- /dev/null+++ b/docs/BUILD_2.0.5.md@@ -0,0 +1,11 @@+# Veyra 2.0.5 本地测试包对应源码++应用源码为同目录 `Veyra-2.0.5-source.zip`;源码提交与SHA见 `DELIVERY.json` / 包内manifest。本次只更新Veyra版本和整合已完成修复,外部依赖未替换。++沿用2.0.4已核验的 `Veyra-2.0.4-dependency-source.zip`,SHA256 `4eccde6343d66e0511b641aaacc12b999e424738a383fcce268d762abb3dceb9`,本机位于 `E:/项目/Veyra/releases/publish-2.0.4-20261006/`。依赖的固定提交、许可证及构建材料见 [2.0.4构建说明](BUILD_2.0.4.md) 与相应source manifests;不要将2.0.4应用源码误当本次应用源码。++Visual Studio2022/MSVC x64、C++20、CMake/Ninja、Python3.11、Qt6.8.3。保留FFmpeg PS5 H264 slice补丁和静态libass/字体依赖;RemotePlay、Moonlight、Xbox及必要公开依赖路径沿用固定缓存。配置 `-DVEYRA_DISPLAY_VERSION=2.0.5`,项目/PE数字版本也为2.0.5。构建 `veyra_qml_ui`,按本轮验收记录执行实际QML入口定向测试。++本机复现脚本 `scripts/acceptance/release-2.0.5-build.py` 从已审计 `build/list-preset-flow-20261006/CMakeCache.txt` 提取外置依赖到新任务构建目录,不重用旧编译输出。其他机器应显式配置自身外置路径,不能照搬本机绝对路径。新工作树/不可变基线/测试输出按本轮PLAN设置;脚本不适用于脱离这些前提的任意目录。++同EXE/QML/shaders分别组合已批准NVIDIA/AMD组件;不将SDK、专有运行库或模型进入源码Git/源码ZIP。不改proprietary DLL;Qt动态链接可替换,静态LGPL组件可按提供源码重编译/重链接。此次仅本地测试交付,未创建公开2.0.5 Release。diff --git a/docs/CURRENT_STATUS.md b/docs/CURRENT_STATUS.mdindex a0c14c55..0b5bb18a 100644--- a/docs/CURRENT_STATUS.md+++ b/docs/CURRENT_STATUS.md@@ -1,5 +1,11 @@# 当前项目状态 / Current Status+## 2026-10-07 2.0.5 本地测试包整合++用户要求将已完成的跨厂商补帧/导出、AMD旧DLSS选择迁移、自动显示同步及统计动画性能修复合入main并构建2.0.5本地测试包。隔离分支codex/release-2.0.5-20261007从71483d5准备,保留既有PR19/20和fix1;具体进度以 [整合验收记录](RELEASE_2.0.5_ACCEPTANCE_2026-10-07.md) 与任务DELIVERY/main-merge收据为准。公开版仍2.0.4,本次未授权新公开发布。++**NV显存持续增长尚未定位/修复,按用户决定延期到下一版本。** 下方调查及fix2记录保留历史事实,不能将本机短测未复现或缺失Shutdown疑点宣传为已解决。2.0.5只纳入已完成产品修复,不新增这些假设对应的生命周期改动。+## 2026-10-07 NV 显存深入排查用户明确实际反馈主要是NVIDIA、AMD尚无这类现场,已调整为NV优先。在新隔离分支codex/nv-vram-deep-20261007,从aeb544c只新增只读诊断工具与文档;main、产品源码/运行库和既有包不动。找回微信原log8/12、哈希与封存一致:5060Ti/616.92/4K225%采集,单层1080 NR+光流、FG关,在无重建/无reset/无窗口区域更新的一段6分21秒内LOCAL1849→18501MiB;这不是普通补帧排队或重建棘轮能解释的。diff --git a/docs/RELEASE_2.0.5_ACCEPTANCE_2026-10-07.md b/docs/RELEASE_2.0.5_ACCEPTANCE_2026-10-07.mdnew file mode 100644index 00000000..2ca1ac58--- /dev/null+++ b/docs/RELEASE_2.0.5_ACCEPTANCE_2026-10-07.md@@ -0,0 +1,52 @@+# 2.0.5 本地整合验收记录++已完成全新2.0.5生产构建与下列定向检查。源自71483d5,已完成产品修复ef2069f/4c917aa;main原578d63c,按用户授权将本候选合入。本轮相对71483d5只有版本、文档、验收和打包脚本变动;原已测引擎/QML算法保持,NV显存根因未定位且明确延期。++命令统一使用 `C:/Users/123/AppData/Local/Programs/Python/Python311/python.exe -B`。新产物根 `E:/项目/Veyra`,任务 `release-2.0.5-20261007`,源码worktrees同名。实际每项构建/测试/包收据保存到该任务logs,完整交付身份到test-packages/DELIVERY.json;不把旧版通过记录当本次执行。++27个旧工作树、495个未提交/未跟踪文件和14份发布文件已冻结;guard初检通过,main仅按本轮授权推进。公开2.0.4及其依赖源码字节保持,不创建新Release、不推送、不改用户配置/驱动。运行库沿用已批准原字节。++## 实际构建和检查++运行环境RTX5070/616.56、Windows11、Qt6.8.3。所有GPU用例串行;不派Agent、不制造压力或竞争负载。构建脚本超时890秒,每项测试进程≤300秒;私有profile与TEMP/TMP全部定向E盘,不修改用户配置。++| 实际命令(省略公共Python前缀) | 内容与结果 |+|---|---|+| release-2.0.5-build.py build-production-tests | 13个生产/定向目标,全新513步exit0;外置依赖与patched FFmpeg/libass保持 |+| release-2.0.5-tests.py units units | 效果链、258修复契约、预设、i18n、56能力、呈现时序、HDR调优7目标全部exit0 |+| release-2.0.5-quick.py telemetry | 真实VTelemetryValue,快速目标更新/收敛/隐藏/减少动效/零时长,6/6通过 |+| release-2.0.5-tests.py graph graph | AMD共享GPU合成10例,含4K输出/内部1080p,最大码值误差0;诊断恒等提供器,不是HIP推理 |+| release-2.0.5-tests.py display display-sync | 窗口/无边框全屏×低队列×Auto/Vsync/Tearing共12组,实际sync/flags/像素正确,D3D12错误0 |+| release-2.0.5-tests.py fg-pixels presentation | 实际DLSS4X/6X/4X、resize/reset与双缓冲复用,像素检查通过,D3D12错误0 |+| release-2.0.5-tests.py fsr-h264 fsr-export | FSR2X→D3D12 NVENC H264:60源+59生成+1保持=120编码,1280×720 |+| release-2.0.5-tests.py fsr-nr-hevc fsr-sr-nr-hevc | FSR SR→原版native NR→FSR2X→HEVC:120编码,2560×1440 |+| release-2.0.5-tests.py nr-stack-hevc field-stack-hevc | 双层原版native NR→HEVC,60源/60编码,1280×720 |+| release-2.0.5-tests.py xess-rejection reject-xess | 真实工作进程明确拒绝XeSS补帧导出,0编码、无最终输出,不替换为DLSS |+| release-2.0.5-ui.py gui-amd-default-seed NVIDIA seed-dlss | 生成本轮独立旧DLSS配置fixture,保留list/node分别设置 |+| release-2.0.5-ui.py gui-amd-default-migrate AMD migration | 不可用DLSS配置恢复为FSR2X,启用状态及禁用node状态保留 |+| release-2.0.5-ui.py gui-amd-xess-keep AMD xess-keep | 重启保留可用手动XeSS选择 |+| release-2.0.5-ui.py gui-nvidia-dlss-keep NVIDIA nvidia-keep | 重启保留NVIDIA DLSS6X |+| release-2.0.5-ui.py gui-amd-catalog-v4 AMD catalog | 缺NVIDIA组件时,实际Node添加补帧及list FSR/Flow预设通过;这是RTX上的缺组件验证,不冒充AMD实卡 |+| release-2.0.5-ui.py gui-telemetry NVIDIA telemetry | 原版1080p NR真实播放、暂停/恢复、全屏/返回、seek、Node接线执行、恢复List与关闭动效、停止/完整关闭,30.094秒exit0 |+| release-2.0.5-ui.py gui-fsr-export-second NVIDIA export | 实际GUI FSR2X窗口/全屏/返回与H264导出:1280×720/60fps/120帧,19.016秒exit0 |+| release-2.0.5-ui.py gui-fsr-restore NVIDIA restore | 再次启动保留FSR倍率/启用/Flow预设,4.922秒exit0 |+| release-2.0.5-export-timestamps.py | 上述四个实际视频全部逐帧解码通过,真实PTS严格CFR;FSR为120帧/60fps,双NR为60帧/30fps,均2秒 |+| release-2.0.5-perf.py 205 gta-205 normal 40 --gta | 用户GTA VI 4K30、原版单NR内部1080、普通class2,生产D3D12 UI/Auto同步,无诊断强制项;49.875秒exit0 |++最后一项32个一秒平均值的NR中位数 **6.294552ms**,UI提交中位36次/秒,视频提交30fps;媒体SHA93db6129…,原版NR SHAe16bcf15…,每次D3DKMT查询均成功/class2。这是新构建单轮功能/性能检查,不是新旧匹配A/B,也不是P95、屏幕延迟或全配置保证。约7%差距的原因与fix2匹配/反向验证仍以STABILITY_EXPORT_PRIORITY_REPORT为历史证据,不把不同轮次拼成新的收益百分比。++本轮EXE SHA256 **acd49a23074b58ec9698d260d63b2d5a59a640627e09a9b83f0127ae47ebb936**,PE File/ProductVersion均2.0.5.0;界面显示版本CMake明确2.0.5。NVIDIA/AMD同EXE/QML/shaders,保留215/694项原组件字节。原版/Lecram/SF-v2、TrueHDR/VFG、AMD模型/HIP文件不替换;不把SDK或运行库加入源码Git。++## 失败与对抗复核++gui-amd-catalog首轮沿用旧fixture,在List固定单例补帧已存在时再次添加,触发最多一个;v2试图删除固定尾节点也被正确拒绝。检查实际NodePage菜单与add/remove实现后,改在fresh Node上下文测试添加,未放宽产品规则。v3实际添加/预设通过且进程exit0,但Qt.quit异步退出前测试Timer再次执行,误把上一轮添加的节点当fresh draft而报FAIL;保留该失败收据。最终夹具在成功/失败时显式停Timer,v4全部通过。**这些是测试前置状态/生命周期错误,未改产品C++或QML来迎合测试。** 原失败app/console/engine日志及JSON均保留。++修复/旧配置测试真实使用缺NVIDIA组件的AMD包与RTX硬件,不伪造AMD厂商ID;AMD4K图测试仅确认共享合成契约。实际AMD HIP高分辨率导出、AMD硬编、FSR4 ML实卡、真实主机/采集长稳、用户显示器撕裂/VRR与NV显存根因仍未完成。本次短测不能代替这些现场验收。已有PR19/20与fix1保留,不复活PR13/14或先前撤回实验。++## 合并、源码和最终交付核对++此记录随候选源码冻结,不在源码内循环填写自己的提交/ZIP SHA。`logs/release-2.0.5-20261007/tested-inputs.json` 冻结全部跟踪输入、当前EXE和20份当前通过收据;旧失败收据保留但不计通过。`main-merge.json` 记录本地main从578d63c --no-ff合入实测提交及树完全一致;只有该收据和独立检查通过才说明合并完成。原分支/桌面和其余工作树保持,旧guard/start不改。++执行 `release-2.0.5-package.py refresh` 后 `finalize`,生成AMD/NVIDIA便携ZIP与应用源码ZIP、增量Git bundle、SHA256SUMS和DELIVERY.json;逐文件manifest、全部ZIP CRC及载荷SHA必须通过。对应依赖源码沿用已发布2.0.4字节,SHA4eccde63…,不新增下载/运行组件。`release-2.0.5-cold.py cold-final-zip --zip` 必须从最终ZIP独立解压、仅系统PATH/私有profile启动,核对实际包内Qt/FFmpeg模块来源;`release-2.0.5-evidence.py close` 再核main树、EXE、源码/ZIP、测试收据、27旧工作树/495修改文件/14发布文件。++完整交付以 `test-packages/release-2.0.5-20261007/DELIVERY.json` 与同任务 `logs/final-check.json` **实际passed=true** 为准,不以本流程文字代替最终执行。此次只本地测试,不替换公开2.0.4资产、不推送、不发布、不代发消息、不关机。NV显存问题明确延期至下一版本。diff --git a/docs/RELEASE_2.0.5_PLAN_2026-10-07.md b/docs/RELEASE_2.0.5_PLAN_2026-10-07.mdnew file mode 100644index 00000000..5001d4d8--- /dev/null+++ b/docs/RELEASE_2.0.5_PLAN_2026-10-07.md@@ -0,0 +1,14 @@+# 2.0.5 已完成修复整合与本地测试交付++用户指令:将目前已完成修复合入main,构建2.0.5测试;显存问题下个版本再深入排查。本轮无新的公开推送、Release、上传或关机授权。++main起点578d63c3a0143429b306e26eeb89137473b4d99f;候选工作树 `E:/项目/Veyra/worktrees/release-2.0.5-20261007`,分支 `codex/release-2.0.5-20261007`,起点71483d56f17d85784f6ff1cbb40f83b90747b0d4。已完成的产品修复来自ef2069f、4c917aa,后续仅调查/验收文档及只读采集脚本。++1. 保留PR19/20、OBS软件重绘、AMD NR合成、列表预设等main已有改动;核对全部分支,避免重复覆盖。冻结27个既有工作树及发布包的独立基线,main只允许按本轮实测源树推进。+2. CMake项目/显示/PE版本统一2.0.5;不修改本轮已经验收的产品算法、默认优先级、DLL、模型或驱动。NR缺失Shutdown及NV/AMD显存所有权猜测均不施工。+3. 继承固定Qt6.8.3、patched FFmpeg/libass/串流依赖和运行组件字节,单一生产EXE生成NVIDIA/AMD两个完整便携包。源码/SDK/模型继续隔离。+4. 构建生产及相关定向目标;串行执行契约/预设/统计组件、真实NR播放与FSR导出、AMD缺组件下的入口/选择、窗口及全屏显示同步等检查。AMD HIP/编码与用户显示器实测缺口明确报告。每个测试进程≤300秒,构建≤900秒;不制造压力或竞争负载。+5. 冻结实际源输入、EXE/测试收据,提交实测候选并本地--no-ff合入main;验证合并树与实测树一致。生成对应源码、完整ZIP及逐文件manifest,从最终ZIP独立解压、仅系统PATH和私有profile启动,核对PE版本及包内模块来源。+6. 以DELIVERY.json、main-merge.json和final-check.json交付;公开Release/已发布文件保持。保留必要构建、最终包、源码和验收证据,清理仅本轮重复副本且不得绕过自动审批拒绝。++全部新产物 `E:/项目/Veyra/{archives,build,tests,logs,tmp,test-packages,verify}/release-2.0.5-20261007`。先运行 `python -B scripts/acceptance/release-2.0.5-control.py`;独立start SHA256 `48b998d583676c9c39b14cc417c89d294639060f2e2fd4aa1986b366113625c8`,旧任务guard/baseline不修改。diff --git a/docs/TEST_NOTES_2.0.5.md b/docs/TEST_NOTES_2.0.5.mdnew file mode 100644index 00000000..26e2cdf8--- /dev/null+++ b/docs/TEST_NOTES_2.0.5.md@@ -0,0 +1,12 @@+# Veyra 2.0.5 本地测试版++请解压到新目录运行 `veyra_qml_ui.exe`,勿混装旧运行库。NVIDIA和AMD包来自同一生产源码/EXE,保留原有厂商组件和许可证。本次供测试,公开版仍为2.0.4。++- AMD默认补帧优先FSR;旧配置里不可用的DLSS/VFG选择迁移到可用FSR,其次XeSS,保留启用状态和已有可用手动选择。+- FSR视频补帧导出保留所选后端,不再错误替换为DLSS。XeSS现有集成无可编码纹理,导出会明确提示改选FSR、DLSS或VFG。+- AMD视频NR允许原高分辨率输出,内部模型最高1080p,残差合成回原尺寸;图片模型预算不变。此前RX9000预览通过反馈不代表此次AMD离线推理/编码已通过实卡验收。+- 自动显示同步使用垂直同步,适用于窗口/全屏;仍可手动允许撕裂。软件API验证不等于用户显示器的撕裂、VRR或屏幕延迟已经验收。+- 修复实时统计动画与NR争抢GPU。上一轮RTX5070、普通优先级、原版单层1080p NR:GTA VI 4K30旧/新约6.559/6.559ms;M2 4K60约6.633/6.590ms。该数据来自fix2匹配验证,不冒充本次2.0.5的新性能数据,不外推所有设备。+- 保留OBS兼容模式重绘、多NR导出、PR19 HDR调优及PR20构建兼容修复、光流列表预设等已完成改动。++**NV显存持续增长尚未修复。** 用户决定延期到下一版深入排查,本包没有把Shutdown疑点当成根因修改。真实AMD HIP/硬件编码、用户显示器与真实主机/采集长稳仍需实卡复测。实际本轮检查与失败记录见 `docs/RELEASE_2.0.5_ACCEPTANCE_2026-10-07.md`;组件及载荷身份见 `package-manifest.json`。旧版本说明保留作历史材料。diff --git a/docs/WORKLOG.md b/docs/WORKLOG.mdindex fabb2d5b..02fa9c32 100644--- a/docs/WORKLOG.md+++ b/docs/WORKLOG.md@@ -1,5 +1,13 @@# Veyra 工作记录+## 2026-10-07 2.0.5 本地整合与测试包++用户明确授权将已完成修复合入main并构建2.0.5测试,NV显存持续增长延期到下一版。main起点578d63c;候选从71483d5隔离,产品修复ef2069f/4c917aa、PR19/20与fix1均保留;其后NV文档/只读采集脚本不等于显存修复。本轮仅版本/整合文档与验收打包脚本变动,不扩改产品算法。27个原工作树、495个本地修改/未跟踪文件、14份发布文件已独立封存,start SHA48b998d583676c9c39b14cc417c89d294639060f2e2fd4aa1986b366113625c8;旧基线不改。++产物路径为 E:/项目/Veyra/{archives,build,tests,logs,tmp,test-packages,verify}/release-2.0.5-20261007;受控源码worktrees同名。全新13目标513步构建exit0,EXE acd49a23074b58ec9698d260d63b2d5a59a640627e09a9b83f0127ae47ebb936,PE/显示版本2.0.5;7个CPU契约目标、6个统计组件用例、AMD共享合成10例、实际同步12组、DLSS4X/6X/4X像素复用、FSR H264及SR/原版NR/FSR HEVC、双原版NR HEVC与GUI导出全部通过,四输出完整解码/严格CFR时间线通过。真实NR GUI暂停/全屏/Node接线/恢复/停止30.094秒通过;AMD缺组件选择迁移、手动XeSS/NVIDIA DLSS保留与Flow预设重启通过。GTA VI 4K30/原版1080 NR/普通class2单轮NR约6.295ms、UI36次/秒、视频30fps;不计算与旧非相邻测量的收益。命令、限制及旧fix2匹配性能证据见本轮ACCEPTANCE。++catalog/v2错误在固定List尾重复添加/删除FG;v3在成功后Qt.quit异步退出前Timer重跑,实际exit0但有FAIL,均保留为失败。不改产品规则,按真实Node菜单前置状态并在完成时停测试Timer,v4通过。最终本地main --no-ff合并、树一致、源码/ZIP/CRC/逐文件SHA、独立解压仅系统PATH启动及旧工作区/发布包保护分别以本任务main-merge.json、DELIVERY.json、cold-final-zip.json、final-check.json为准;本段不能代替尚未执行的最终步骤。无新公开发布/推送、压力或竞争程序、子Agent、运行库改写、用户配置改动或关机;NV显存延期。+## 2026-10-06 PR19/20 最终适配验收最终执行 `pr19-pr20-finish.py freeze/commit/merge/push/verify`:565产品输入/161测试与脚本输入/92证据SHA封存,8个新增可达提交无SDK/runtime/model产物。PR20 merge 2e3d239,PR19适配merge357c136,父提交2e3d239+b14dc5a;作者原heads完整保留。source-integration.bundle 73856888 bytes、SHA7bd38da97fce41739dcf3d19ae436ca501a075bc86421a63125e737ec6ff6c60并verify成功。本地main从f8045fb快进357c136、Git树8976fc731aab0e55467e39b42bfe4402ed6ccee3与实测freeze一致,nrvideo普通推送成功。REST核实PR19/20 closed/merged(mergeCommit357c136/2e3d239);原Release/tag/正文/资产对象和4本机发布ZIP SHA保持。main-advance/push/remote-after收据保留。最终收尾仅三个文档及自有cleanup脚本,产品与测试证据保持,最终SHA以final-check.json为准。diff --git a/scripts/acceptance/release-2.0.5-build.py b/scripts/acceptance/release-2.0.5-build.pynew file mode 100644index 00000000..afd3daef--- /dev/null+++ b/scripts/acceptance/release-2.0.5-build.py@@ -0,0 +1,42 @@+"""Build standard and RemotePlay-off configurations with approved dependencies."""+from pathlib import Path+import hashlib,json,os,subprocess,sys+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+label=sys.argv[1];assert label.replace('-','').isalnum()+remote_off='--remote-off' in sys.argv+BUILD=BASE/'build'/TASK/('remote-off' if remote_off else 'standard')+TMP=BASE/'tmp'/TASK/('build-off' if remote_off else 'build')+LOG=BASE/'logs'/TASK/(label+'.log')+for p in (BUILD,TMP,LOG.parent):p.mkdir(parents=True,exist_ok=True)+guard=[sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py')]+subprocess.run(guard,check=True)+settings=[];cache=BASE/'build/list-preset-flow-20261006/CMakeCache.txt'+for line in cache.read_text(encoding='utf8').splitlines():+ if ':' not in line or '=' not in line or line.startswith(('#','//')):continue+ keytype,value=line.split('=',1);key,kind=keytype.split(':',1)+ if kind in ('INTERNAL','STATIC') or key=='VEYRA_DISPLAY_VERSION':continue+ if key.startswith('VEYRA_') or key in ('CMAKE_PREFIX_PATH','CMAKE_MAKE_PROGRAM','PROTOC','PKG_CONFIG_EXECUTABLE'):+ if key=='VEYRA_LIBASS_ROOT':assert (Path(value)/'include/ass/ass.h').is_file()+ settings.append(f'set({key} [[{value}]] CACHE {kind} "Accepted dependencies" FORCE)')+settings.append('set(VEYRA_DISPLAY_VERSION [[2.0.5]] CACHE STRING "Local integration" FORCE)')+settings.append('set(VEYRA_AMD_NR_TEST_GRAPH_SOURCE [['+(ROOT/'src/pipeline/EnhanceGraph.cpp').as_posix()+']] CACHE FILEPATH "Identity diagnostic graph" FORCE)')+if remote_off:settings.append('set(VEYRA_ENABLE_REMOTEPLAY OFF CACHE BOOL "PR20 build validation" FORCE)')+(TMP/'dependencies.cmake').write_text('\n'.join(settings),encoding='utf8')+targets=[t for t in sys.argv[2:] if t!='--remote-off'] or (['veyra_qml_ui'] if remote_off else [+ 'veyra_qml_ui','veyra_hdr_tuning_tests','veyra_effect_chain_tests','veyra_preset_library_tests','veyra_ui_i18n_tests','veyra_effect_availability_tests',+ 'veyra_export_workflow_tests','veyra_amd_nr_graph_tests','veyra_lmxxf_nr_tests',+ 'veyra_repair_contract_tests','veyra_live_timing_tests','veyra_fg_presentation_tests','veyra_qml_quick_tests'])+assert all(t.replace('_','').isalnum() for t in targets)+cmd=TMP/'build.cmd'+cmd.write_text('@echo off\nchcp 65001 >nul\ncall "C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Auxiliary\\Build\\vcvars64.bat" >nul 2>&1\nif errorlevel 1 exit /b 4\n"%TASK_CMAKE%" --preset x64-release -S "%TASK_ROOT%" -B "%TASK_BUILD%" -C "%TASK_TMP%\\dependencies.cmake"\nif errorlevel 1 exit /b 5\n"%TASK_CMAKE%" --build "%TASK_BUILD%" --parallel 6 --target '+' '.join(targets)+'\nexit /b %errorlevel%\n',encoding='ascii')+env=os.environ.copy();env.update(TEMP=str(TMP),TMP=str(TMP),VSLANG='1033',TASK_ROOT=str(ROOT),TASK_BUILD=str(BUILD),TASK_TMP=str(TMP),+ TASK_CMAKE='C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe')+with LOG.open('x',encoding='utf8') as out:+ try:rc=subprocess.run(['cmd.exe','/d','/c',str(cmd)],cwd=ROOT,env=env,stdout=out,stderr=subprocess.STDOUT,timeout=890).returncode+ except subprocess.TimeoutExpired:rc=124+receipt={'exit':rc,'log':str(LOG),'targets':targets,'remotePlayOff':remote_off,+ 'sourceHead':subprocess.check_output(['git','-C',str(ROOT),'rev-parse','HEAD'],text=True).strip(),+ 'dependencyCacheSha256':hashlib.sha256(cache.read_bytes()).hexdigest()}+LOG.with_suffix('.json').write_text(json.dumps(receipt,ensure_ascii=False,indent=2),encoding='utf8')+print('BUILD',rc,LOG);print('\n'.join(LOG.read_text(encoding='utf8',errors='replace').splitlines()[-13:]))+subprocess.run(guard,check=True);raise SystemExit(rc)diff --git a/scripts/acceptance/release-2.0.5-cold.py b/scripts/acceptance/release-2.0.5-cold.pynew file mode 100644index 00000000..a38cda93--- /dev/null+++ b/scripts/acceptance/release-2.0.5-cold.py@@ -0,0 +1,72 @@+"""Cold portable starts with package-only Qt/FFmpeg and private profiles."""+from pathlib import Path+import os,sys,json,subprocess,time,hashlib,ctypes,zipfile+from ctypes import wintypes+BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+ROOT=Path(__file__).resolve().parents[2]+label=sys.argv[1];assert label.replace('-','').isalnum()+from_zip='--zip' in sys.argv+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py')],check=True)+results=[]+api=ctypes.WinDLL('psapi')+api.EnumProcessModulesEx.argtypes=[wintypes.HANDLE,ctypes.POINTER(wintypes.HMODULE),wintypes.DWORD,ctypes.POINTER(wintypes.DWORD),wintypes.DWORD]+api.EnumProcessModulesEx.restype=wintypes.BOOL+api.GetModuleFileNameExW.argtypes=[wintypes.HANDLE,wintypes.HMODULE,wintypes.LPWSTR,wintypes.DWORD]+api.GetModuleFileNameExW.restype=wintypes.DWORD+def loaded_modules(process):+ # Read the loader's paths. Mapped section paths can retain a prior hardlink+ # alias even though the loader selected this package's DLL correctly.+ modules=(wintypes.HMODULE*512)();needed=wintypes.DWORD()+ if not api.EnumProcessModulesEx(int(process._handle),modules,ctypes.sizeof(modules),ctypes.byref(needed),3):return []+ paths=[]+ for module in modules[:min(512,needed.value//ctypes.sizeof(wintypes.HMODULE))]:+ name=ctypes.create_unicode_buffer(32768)+ if api.GetModuleFileNameExW(int(process._handle),module,name,len(name)):paths.append(name.value)+ return paths+for vendor in ('AMD','NVIDIA'):+ app=BASE/'test-packages'/TASK/f'Veyra-2.0.5-{vendor}-win64-portable'+ archive=None;archive_hash=None+ if from_zip:+ archive=app.parent/(app.name+'.zip')+ delivery=json.loads((app.parent/'DELIVERY.json').read_text(encoding='utf8'))+ expected=next(r for r in delivery if r['vendor']==vendor)+ with archive.open('rb') as stream:archive_hash=hashlib.file_digest(stream,'sha256').hexdigest()+ assert archive_hash==expected['archiveSha256']+ extracted=BASE/'verify'/TASK/(label+'-'+vendor)+ extracted.mkdir(parents=True,exist_ok=False)+ with zipfile.ZipFile(archive) as zipped:+ for entry in zipped.infolist():+ target=extracted/entry.filename+ assert target.resolve().is_relative_to(extracted.resolve())+ assert entry.filename.startswith(app.name+'/') and not entry.is_dir()+ assert (entry.external_attr>>16)&0o170000!=0o120000+ zipped.extractall(extracted)+ app=extracted/app.name+ manifest=json.loads((app/'package-manifest.json').read_text(encoding='utf8'))+ for row in manifest['files']:+ item=app/row['path']+ assert item.resolve().is_relative_to(app.resolve()) and not item.is_symlink()+ with item.open('rb') as stream:actual_hash=hashlib.file_digest(stream,'sha256').hexdigest()+ assert item.stat().st_size==row['size'] and actual_hash==row['sha256'],row['path']+ out=BASE/'tests'/TASK/(label+'-'+vendor);tmp=BASE/'tmp'/TASK/(label+'-'+vendor)+ for p in (out,tmp):p.mkdir(parents=True,exist_ok=False)+ logs=BASE/'logs'/TASK;console=logs/(label+'-'+vendor+'.log')+ env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_','QML_'))}+ env.update(TEMP=str(tmp),TMP=str(tmp),PATH=os.environ['SystemRoot']+'/System32;'+os.environ['SystemRoot'],+ QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1',VEYRA_LOG_FILE=str(logs/(label+'-'+vendor+'-engine.log')))+ args=[str(app/'veyra_qml_ui.exe'),'--data-dir',str(out/'profile'),'--size','1280x800','--exit-after','5000']+ modules=set();begin=time.monotonic()+ with console.open('xb') as stream:+ process=subprocess.Popen(args,cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT)+ while process.poll() is None and time.monotonic()-begin<35:+ modules.update(p for p in loaded_modules(process) if p.lower().endswith('.dll'))+ time.sleep(.15)+ if process.poll() is None:process.kill();process.wait(timeout=5);rc=124+ else:rc=process.returncode+ body=console.read_text(encoding='utf8',errors='replace')+ required=[p for p in modules if Path(p).name.lower().startswith(('qt6','avcodec','avformat','avutil','swscale','swresample'))]+ passed=rc==0 and len(required)>=12 and all(Path(p).resolve().is_relative_to(app.resolve()) for p in required) and not any(x in body for x in ('ReferenceError:','TypeError:','[ERROR]','[FATAL]','failed to load'))+ results.append(dict(vendor=vendor,passed=passed,exit=rc,seconds=time.monotonic()-begin,exeSha256=hashlib.sha256((app/'veyra_qml_ui.exe').read_bytes()).hexdigest(),packageModules=sorted(required),privateProfile=str(out/'profile'),archive=str(archive) if archive else None,archiveSha256=archive_hash,extractedApp=str(app) if from_zip else None))+ print(vendor,'PASS' if passed else 'FAIL','modules',len(required),flush=True)+(BASE/'logs'/TASK/(label+'.json')).write_text(json.dumps(results,ensure_ascii=False,indent=2),encoding='utf8')+raise SystemExit(0 if all(r['passed'] for r in results) else 1)diff --git a/scripts/acceptance/release-2.0.5-control.py b/scripts/acceptance/release-2.0.5-control.pynew file mode 100644index 00000000..b50481d5--- /dev/null+++ b/scripts/acceptance/release-2.0.5-control.py@@ -0,0 +1,40 @@+"""Protect the 2.0.5 integration inputs, other worktrees and published assets."""+from pathlib import Path+import hashlib,json,subprocess,sys+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+def sha(path):+ with Path(path).open('rb') as stream:return hashlib.file_digest(stream,'sha256').hexdigest()+def git(*args,cwd=ROOT):return subprocess.check_output(['git',*args],cwd=cwd,stderr=subprocess.PIPE).decode('utf8')+opening=BASE/'archives'/TASK/'start.json'+assert sha(opening)=='48b998d583676c9c39b14cc417c89d294639060f2e2fd4aa1986b366113625c8'+start=json.loads(opening.read_text(encoding='utf8'))+assert ROOT.resolve()==Path(start['worktree']).resolve()+assert git('branch','--show-current').strip()==start['branch']+subprocess.run(['git','merge-base','--is-ancestor',start['sourceBase'],'HEAD'],cwd=ROOT,check=True)+allowed={'AGENTS.md','CMakeLists.txt','docs/CURRENT_STATUS.md','docs/WORKLOG.md',+ 'docs/RELEASE_2.0.5_PLAN_2026-10-07.md','docs/RELEASE_2.0.5_ACCEPTANCE_2026-10-07.md','docs/TEST_NOTES_2.0.5.md','docs/BUILD_2.0.5.md'}+def in_scope(name):return name in allowed or name.startswith('scripts/acceptance/release-2.0.5-')+for name,h in start['trackedSha256'].items():+ assert (ROOT/name).is_file(),name+ if sha(ROOT/name)!=h:assert in_scope(name),name+names=set(filter(None,git('ls-files','-z').split('\0')))|set(filter(None,git('ls-files','--others','--exclude-standard','-z').split('\0')))+for name in names-set(start['trackedSha256']):+ assert in_scope(name),name+ assert Path(name).suffix.lower() not in ('.dll','.exe','.lib','.pdb','.onnx','.bin','.hsaco','.zip','.7z','.ptx'),name+preserved=0+for row in start['preserved_worktrees']:+ location=Path(row['path']);head=git('rev-parse','HEAD',cwd=location).strip()+ if location.resolve()==Path(start['mainPath']).resolve() and head!=row['head']:+ merge=json.loads((BASE/'logs'/TASK/'main-merge.json').read_text(encoding='utf8'))+ assert head==merge['mainAfter'] and merge['mainBefore']==row['head']+ assert git('rev-list','--parents','-n','1',head,cwd=location).strip().split()[1:]==[row['head'],merge['testedSourceCommit']]+ assert git('rev-parse',head+'^{tree}',cwd=location).strip()==git('rev-parse',merge['testedSourceCommit']+'^{tree}').strip()+ else:assert head==row['head'],str(location)+ assert git('status','--porcelain=v1','-z','--untracked-files=all',cwd=location)==row['status'],str(location)+ for name,h in row['modified'].items():+ item=location/name;assert (sha(item) if item.is_file() else None)==h,str(item)+ preserved+=1+if '--published' in sys.argv:+ for row in start['published']:assert sha(row['path'])==row['sha256'],row['path']+subprocess.run(['git','diff','--check'],cwd=ROOT,check=True,capture_output=True)+print('GUARD PASS',preserved,'preserved worktrees; inherited product sources unchanged')diff --git a/scripts/acceptance/release-2.0.5-evidence.py b/scripts/acceptance/release-2.0.5-evidence.pynew file mode 100644index 00000000..96eb8bb5--- /dev/null+++ b/scripts/acceptance/release-2.0.5-evidence.py@@ -0,0 +1,70 @@+"""Freeze this build's real receipts; check the local main merge and final ZIPs."""+from pathlib import Path+import ast,hashlib,json,subprocess,sys,zipfile+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+LOG=BASE/'logs'/TASK;PACK=BASE/'test-packages'/TASK;ARCH=BASE/'archives'/TASK+def sha(path):+ with Path(path).open('rb') as stream:return hashlib.file_digest(stream,'sha256').hexdigest()+def read(path):return json.loads(Path(path).read_text(encoding='utf8'))+def save(path,value):Path(path).write_text(json.dumps(value,ensure_ascii=False,indent=2)+'\n',encoding='utf8')+def git(*args,cwd=ROOT):return subprocess.check_output(['git',*args],cwd=cwd,stderr=subprocess.PIPE).decode('utf8').strip()+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py'),'--published'],check=True)+mode=sys.argv[1];assert mode in ('freeze','close')+exe=BASE/'build'/TASK/'standard/veyra_qml_ui.exe'+if mode=='freeze':+ assert not git('status','--porcelain'),'Commit the tested source before freezing'+ required=['build-production-tests.json','units.json','telemetry.json','graph.json','display.json','fg-pixels.json','export-timestamps.json',+ 'fsr-h264.json','fsr-nr-hevc.json','nr-stack-hevc.json','xess-rejection.json',+ 'gui-amd-default-seed.json','gui-amd-default-migrate.json','gui-amd-xess-keep.json','gui-nvidia-dlss-keep.json',+ 'gui-amd-catalog-v4.json','gui-telemetry.json','gui-fsr-export-second.json','gui-fsr-restore.json','gta-205/result.json']+ for name in required:+ value=read(LOG/name);rows=value if isinstance(value,list) else [value]+ assert rows and all(row.get('passed',row.get('exit')==0) for row in rows),name+ performance=read(LOG/'gta-205/result.json')+ assert performance['exeSha256']==sha(exe) and performance['priorityRequested']=='normal' and not performance['testEnv'] and performance['config']['display']==2+ for sample in read(LOG/'gta-205/meters.json'):+ assert sample['priority']==dict(status='0x0',actual=2),sample+ names=git('ls-files').splitlines()+ tracked={name:sha(ROOT/name) for name in names}+ for p in (ROOT/'scripts/acceptance').glob('release-2.0.5-*.py'):ast.parse(p.read_text(encoding='utf8'))+ receipt=dict(sourceCommit=git('rev-parse','HEAD'),executableSha256=sha(exe),trackedInputs=tracked,+ testReceipts={name:sha(LOG/name) for name in required},+ validationScope='Fresh 2.0.5 build and bounded serial regression checks; previous fix2 A/B measurements remain historical',+ unresolved='NVIDIA VRAM growth deferred; actual AMD HIP/encoder and user-panel tearing unverified')+ with (LOG/'tested-inputs.json').open('x',encoding='utf8') as stream:json.dump(receipt,stream,ensure_ascii=False,indent=2)+ print('FROZEN',len(tracked),'tracked inputs;',len(required),'current receipts;',receipt['sourceCommit'])+else:+ frozen=read(LOG/'tested-inputs.json');head=frozen['sourceCommit']+ assert git('rev-parse','HEAD')==head and not git('status','--porcelain')+ assert sha(exe)==frozen['executableSha256']+ for name,h in frozen['trackedInputs'].items():assert sha(ROOT/name)==h,name+ for name,h in frozen['testReceipts'].items():assert sha(LOG/name)==h,name+ delivery=read(PACK/'DELIVERY.json');cold=read(LOG/'cold-final-zip.json');merge=read(LOG/'main-merge.json')+ assert len(delivery)==2 and len(cold)==2 and all(row['passed'] for row in cold)+ assert merge['testedSourceCommit']==head and merge['treesIdentical']+ main=BASE/'worktrees/main-merge-20261002'+ assert git('rev-parse','HEAD',cwd=main)==merge['mainAfter'] and not git('status','--porcelain',cwd=main)+ assert git('rev-parse','HEAD^{tree}',cwd=main)==git('rev-parse','HEAD^{tree}')+ for item in delivery:+ app=Path(item['app']);manifest=read(app/'package-manifest.json')+ assert item['sourceCommit']==head and item['peVersions']==dict(file='2.0.5.0',product='2.0.5.0')+ assert sha(item['archive'])==item['archiveSha256'] and item['zipCrcAndAllPayloadHashesPassed']+ assert manifest['sourceCommit']==head and not manifest['worktreeDirty'] and manifest['localOnly'] and not manifest['releaseReady']+ assert sha(app/'veyra_qml_ui.exe')==sha(exe)==item['exeSha256']+ probe=next(row for row in cold if row['vendor']==item['vendor'])+ assert probe['archiveSha256']==item['archiveSha256'] and probe['exeSha256']==sha(exe)+ actual={p.relative_to(app).as_posix() for p in app.rglob('*') if p.is_file()}+ assert actual=={row['path'] for row in manifest['files']}|{'package-manifest.json'}+ for row in manifest['files']:assert sha(app/row['path'])==row['sha256'],row['path']+ for name,h in frozen['trackedInputs'].items():+ if name.startswith('qml/'):assert sha(app/name)==h,name+ with zipfile.ZipFile(delivery[0]['sourceZip']) as zipped:+ assert zipped.testzip() is None+ for name,h in frozen['trackedInputs'].items():assert hashlib.sha256(zipped.read('Veyra-2.0.5-source/'+name)).hexdigest()==h,name+ subprocess.run(['git','bundle','verify',str(ARCH/'integration-final.bundle')],cwd=ROOT,check=True)+ receipt=dict(passed=True,version='2.0.5',testedSourceCommit=head,mainCommit=merge['mainAfter'],treesIdentical=True,+ executableSha256=sha(exe),trackedInputs=len(frozen['trackedInputs']),testReceipts=len(frozen['testReceipts']),+ preservedWorktrees=27,preservedDirtyFiles=495,preservedPublishedFiles=14,zipCrcAndAllPayloadHashesPassed=True,+ coldZipValidation=True,delivery=delivery,vramFixed=False,publicReleaseCreated=False)+ save(LOG/'final-check.json',receipt)+ print('FINAL CHECK PASS; main/build/portable ZIPs/source/current tests/old worktrees and public assets verified')diff --git a/scripts/acceptance/release-2.0.5-export-timestamps.py b/scripts/acceptance/release-2.0.5-export-timestamps.pynew file mode 100644index 00000000..55070313--- /dev/null+++ b/scripts/acceptance/release-2.0.5-export-timestamps.py@@ -0,0 +1,25 @@+"""Decode every generated output frame and verify its actual CFR timestamps."""+from pathlib import Path+import hashlib,json,shutil,subprocess,os+from fractions import Fraction+BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+paths=[BASE/'tests'/TASK/label/'result.mp4' for label in ('fsr-h264','fsr-nr-hevc','nr-stack-hevc')]+paths+=list((BASE/'tests'/TASK/'gui-fsr-export-second/outputs').glob('*.mp4'))+assert len(paths)==4+env=os.environ.copy();env.update(TEMP=str(BASE/'tmp'/TASK),TMP=str(BASE/'tmp'/TASK))+results=[]+for path in paths:+ args=[shutil.which('ffprobe'),'-v','error','-select_streams','v:0','-show_streams','-show_frames',+ '-show_entries','stream=width,height,r_frame_rate,duration:frame=best_effort_timestamp_time','-of','json',str(path)]+ probe=json.loads(subprocess.check_output(args,timeout=45,env=env))+ pts=[float(row['best_effort_timestamp_time']) for row in probe['frames']];stream=probe['streams'][0]+ fps=float(Fraction(stream['r_frame_rate']));expected=60 if 'nr-stack-hevc' in path.parts else 120+ assert len(pts)==expected and abs(pts[0])<0.000005 and all(abs(b-a-1/fps)<0.000005 for a,b in zip(pts,pts[1:])),str(path)+ args=[shutil.which('ffmpeg'),'-v','error','-xerror','-i',str(path),'-map','0:v:0','-f','null','-']+ decoded=subprocess.run(args,capture_output=True,timeout=60,env=env)+ assert decoded.returncode==0,decoded.stderr.decode('utf8',errors='replace')+ with path.open('rb') as f:identity=hashlib.file_digest(f,'sha256').hexdigest()+ results.append(dict(path=str(path),passed=True,frames=len(pts),fps=fps,width=stream['width'],height=stream['height'],+ firstPts=pts[0],lastPts=pts[-1],fullDecodePassed=True,strictCfrTimestamps=True,sha256=identity))+(BASE/'logs'/TASK/'export-timestamps.json').write_text(json.dumps(results,ensure_ascii=False,indent=2),encoding='utf8')+print('PASS',len(results),'outputs: complete frame decode and strict CFR timestamps')diff --git a/scripts/acceptance/release-2.0.5-package.py b/scripts/acceptance/release-2.0.5-package.pynew file mode 100644index 00000000..fdd6eaf8--- /dev/null+++ b/scripts/acceptance/release-2.0.5-package.py@@ -0,0 +1,123 @@+"""Package the reviewed 2.0.5 build with unchanged audited vendor components."""+from pathlib import Path,PurePosixPath+import ctypes,hashlib,json,shutil,subprocess,sys,zipfile+from ctypes import wintypes+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007';VERSION='2.0.5'+PACK=BASE/'test-packages'/TASK;BUILD=BASE/'build'/TASK/'standard';LOG=BASE/'logs'/TASK;ARCH=BASE/'archives'/TASK+DEPS=BASE/'releases/publish-2.0.4-20261006/Veyra-2.0.4-dependency-source.zip'+def sha(path):+ with Path(path).open('rb') as stream:return hashlib.file_digest(stream,'sha256').hexdigest()+def read(path):return json.loads(Path(path).read_text(encoding='utf8'))+def save(path,value):Path(path).write_text(json.dumps(value,ensure_ascii=False,indent=2)+'\n',encoding='utf8')+def git(*args):return subprocess.check_output(['git',*args],cwd=ROOT,stderr=subprocess.PIPE).decode('utf8').strip()+def safe(name):+ p=PurePosixPath(name)+ assert name and '\\' not in name and ':' not in name and not p.is_absolute() and '..' not in p.parts and str(p)==name,name+def pe_versions(path):+ api=ctypes.WinDLL('version');unused=wintypes.DWORD()+ api.GetFileVersionInfoSizeW.argtypes=[wintypes.LPCWSTR,ctypes.POINTER(wintypes.DWORD)];api.GetFileVersionInfoSizeW.restype=wintypes.DWORD+ length=api.GetFileVersionInfoSizeW(str(path),ctypes.byref(unused));assert length+ block=ctypes.create_string_buffer(length)+ api.GetFileVersionInfoW.argtypes=[wintypes.LPCWSTR,wintypes.DWORD,wintypes.DWORD,ctypes.c_void_p]+ assert api.GetFileVersionInfoW(str(path),0,length,block)+ ptr=ctypes.c_void_p();size=wintypes.UINT()+ api.VerQueryValueW.argtypes=[ctypes.c_void_p,wintypes.LPCWSTR,ctypes.POINTER(ctypes.c_void_p),ctypes.POINTER(wintypes.UINT)]+ assert api.VerQueryValueW(block,'\\',ctypes.byref(ptr),ctypes.byref(size)) and size.value>=52+ data=ctypes.cast(ptr,ctypes.POINTER(wintypes.DWORD))+ def value(a,b):return '.'.join(map(str,(a>>16,a&65535,b>>16,b&65535)))+ return dict(file=value(data[2],data[3]),product=value(data[4],data[5]))+mode=sys.argv[1];assert mode in ('stage','refresh','finalize')+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py'),'--published'],check=True)+head=git('rev-parse','HEAD');dirty=bool(git('status','--porcelain'))+exe=BUILD/'veyra_qml_ui.exe';versions=pe_versions(exe)+assert versions==dict(file='2.0.5.0',product='2.0.5.0'),versions+assert sha(DEPS)=='4eccde6343d66e0511b641aaacc12b999e424738a383fcce268d762abb3dceb9'+sourcezip=PACK/f'Veyra-{VERSION}-source.zip'+if mode=='finalize':+ assert not dirty,'Commit the tested integration first'+ merge=read(LOG/'main-merge.json');assert merge['testedSourceCommit']==head and merge['treesIdentical']+ frozen=read(LOG/'tested-inputs.json');assert frozen['sourceCommit']==head and frozen['executableSha256']==sha(exe)+ for name,h in frozen['trackedInputs'].items():assert sha(ROOT/name)==h,name+ for name,h in frozen['testReceipts'].items():assert sha(LOG/name)==h,name+ with zipfile.ZipFile(sourcezip,'x',zipfile.ZIP_DEFLATED,compresslevel=6) as zipped:+ for name in git('ls-files').splitlines():+ safe(name)+ assert not name.startswith(('runtime/','runtime_local/','third_party_local/','models/'))+ assert Path(name).suffix.lower() not in ('.dll','.exe','.lib','.pdb','.addon64','.onnx','.bin','.hsaco','.f16','.f32','.ptx','.pyc'),name+ zipped.write(ROOT/name,arcname='Veyra-2.0.5-source/'+name)+ with zipfile.ZipFile(sourcezip) as zipped:+ assert zipped.testzip() is None+ for name,h in frozen['trackedInputs'].items():assert hashlib.sha256(zipped.read('Veyra-2.0.5-source/'+name)).hexdigest()==h,name+ subprocess.run(['git','bundle','create',str(ARCH/'integration-final.bundle'),'578d63c3a0143429b306e26eeb89137473b4d99f..HEAD'],cwd=ROOT,check=True)+ subprocess.run(['git','bundle','verify',str(ARCH/'integration-final.bundle')],cwd=ROOT,check=True)+delivery=[]+for vendor in ('AMD','NVIDIA'):+ source=BASE/'test-packages/stability-export-priority-20261006'/f'Veyra-2.0.4-fix2-{vendor}-win64-portable'+ original=read(source/'package-manifest.json');app=PACK/f'Veyra-{VERSION}-{vendor}-win64-portable'+ assert original['executableSha256']=='65fc23e33598d7efd77ea50ba8062a89beaacb29eb14369ffc78d03563312626'+ immutable={}+ if mode=='stage':app.mkdir(exist_ok=False)+ else:assert app.is_dir()+ for row in original['files']:+ name=row['path'];safe(name);p=source/name+ assert p.resolve().is_relative_to(source.resolve()) and not p.is_symlink()+ assert p.stat().st_size==row['size'] and sha(p)==row['sha256'],name+ if mode=='stage' and not name.startswith('REPAIR_TEST_'):+ dest=app/name;dest.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(p,dest)+ if name.startswith(('runtime/','runtime_local/','models/','licenses/')) or p.suffix.lower()=='.dll' or name in ('release-runtime-manifest.json','vfg-runtime-manifest.json'):+ immutable[name]=row['sha256']+ if mode!='finalize':+ shutil.copy2(exe,app/'veyra_qml_ui.exe')+ for folder,incoming in (('qml',ROOT/'qml'),('shaders',BUILD/'shaders')):+ for p in incoming.rglob('*'):+ if p.is_file():+ dest=app/folder/p.relative_to(incoming);dest.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(p,dest)+ for name in ('RELEASE_2.0.5_PLAN_2026-10-07.md','RELEASE_2.0.5_ACCEPTANCE_2026-10-07.md','TEST_NOTES_2.0.5.md','BUILD_2.0.5.md','NV_VRAM_DEEP_INVESTIGATION_2026-10-07.md'):+ shutil.copy2(ROOT/'docs'/name,app/'docs'/name)+ shutil.copy2(ROOT/'docs/TEST_NOTES_2.0.5.md',app/'TEST_NOTES_2.0.5.md')+ for name,h in immutable.items():assert sha(app/name)==h,name+ assert sha(app/'veyra_qml_ui.exe')==sha(exe)+ actual={p.relative_to(app).as_posix():p for p in app.rglob('*') if p.is_file()}+ for name,p in actual.items():+ safe(name)+ assert not p.is_symlink() and p.suffix.lower() not in ('.pdb','.lib','.addon64','.log','.dmp','.pyc','.whl'),name+ assert not any(part.lower() in ('logs','tmp','outputs','profile','.git') or part.lower().startswith(('user-data','qml-preferences','last-applied','presets.v1')) for part in PurePosixPath(name).parts),name+ assert p.suffix.lower()!='.exe' or name=='veyra_qml_ui.exe',name+ manifest=dict(original)+ manifest.update(version=VERSION,displayVersion=VERSION,candidate=VERSION,sourceCommit=head,sourceArchiveCommit=head,productCodeCommit=head,+ worktreeDirty=dirty,localOnly=True,releaseReady=False,executableSha256=sha(exe),peVersions=versions,+ baseCommit='71483d56f17d85784f6ff1cbb40f83b90747b0d4',baseMainCommit='578d63c3a0143429b306e26eeb89137473b4d99f',+ validationRecord='docs/RELEASE_2.0.5_ACCEPTANCE_2026-10-07.md',+ validation='Current 2.0.5 targeted checks only; see the current acceptance record and DELIVERY',+ softwareValidation='2.0.5 targeted checks recorded separately from inherited fix2 measurements',+ hardwareValidation='Local RTX5070; actual AMD inference/encoder and user display tearing remain unverified',+ knownIssue='NVIDIA VRAM growth remains unresolved and deferred to the next version',+ files=[dict(path=name,size=p.stat().st_size,sha256=sha(p)) for name,p in sorted(actual.items()) if name!='package-manifest.json'])+ manifest.pop('releaseTag',None);manifest.pop('releaseUrl',None)+ corresponding=dict(original['correspondingSource']);corresponding.update(application='../'+sourcezip.name,+ applicationSha256=sha(sourcezip) if mode=='finalize' else None,instructions='docs/BUILD_2.0.5.md',displayVersionOverride='-DVEYRA_DISPLAY_VERSION=2.0.5')+ manifest['correspondingSource']=corresponding+ manifest.pop('sourceZipSha256',None)+ if mode=='finalize':+ manifest['sourceZipSha256']=sha(sourcezip)+ manifest['mainCommit']=merge['mainAfter']+ save(app/'package-manifest.json',manifest)+ receipt=dict(vendor=vendor,app=str(app),sourceCommit=head,exeSha256=sha(exe),peVersions=versions,+ fileCount=len(actual),unchangedComponentCount=len(immutable),dependencySource=str(DEPS),dependencySourceSha256=sha(DEPS))+ if mode=='finalize':+ receipt['mainCommit']=merge['mainAfter']+ archive=PACK/(app.name+'.zip')+ with zipfile.ZipFile(archive,'x',zipfile.ZIP_DEFLATED,compresslevel=6) as zipped:+ for name,p in sorted(actual.items()):zipped.write(p,arcname=app.name+'/'+name)+ with zipfile.ZipFile(archive) as zipped:+ assert zipped.testzip() is None+ assert set(zipped.namelist())=={app.name+'/'+name for name in actual}+ for name,p in actual.items():assert hashlib.sha256(zipped.read(app.name+'/'+name)).hexdigest()==sha(p),name+ receipt.update(archive=str(archive),archiveBytes=archive.stat().st_size,archiveSha256=sha(archive),zipCrcAndAllPayloadHashesPassed=True,+ sourceZip=str(sourcezip),sourceZipSha256=sha(sourcezip))+ delivery.append(receipt);print(json.dumps(receipt,ensure_ascii=False),flush=True)+save(LOG/('packages-'+mode+'.json'),delivery)+if mode=='finalize':+ save(PACK/'DELIVERY.json',delivery)+ sums=''.join(row['archiveSha256']+' '+Path(row['archive']).name+'\n' for row in delivery)+sha(sourcezip)+' '+sourcezip.name+'\n'+ (PACK/'SHA256SUMS.txt').write_text(sums,encoding='ascii')diff --git a/scripts/acceptance/release-2.0.5-perf.py b/scripts/acceptance/release-2.0.5-perf.pynew file mode 100644index 00000000..96b31d12--- /dev/null+++ b/scripts/acceptance/release-2.0.5-perf.py@@ -0,0 +1,105 @@+"""Serial released-package A/B at identical original-NR settings; no GPU load generator."""+from pathlib import Path+import ctypes,hashlib,json,os,re,shutil,statistics,subprocess,sys,time+import psutil+from ctypes import wintypes+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+PACKAGES={'203':BASE/'releases/release-2.0.3-20261004/Veyra-2.0.3-NVIDIA-win64-portable',+ '204':BASE/'releases/publish-2.0.4-20261006/packages/Veyra-2.0.4-NVIDIA-win64-portable',+ '205':BASE/'test-packages'/TASK/'Veyra-2.0.5-NVIDIA-win64-portable'}+MEDIA=Path('E:/Ai/知识/小七姐/GTAVI_An_Extended_Look_4K_Native.mp4') if '--gta' in sys.argv else BASE/'tests/perf-matrix/media/M2.mkv'+def sha(f):+ with Path(f).open('rb') as s:return hashlib.file_digest(s,'sha256').hexdigest()+def copy(src,dst):+ if Path(src).suffix.lower() in ('.dll','.bin','.hsaco','.ptx','.onnx','.cubin','.f16'):os.link(src,dst)+ else:shutil.copy2(src,dst)+ return dst+def gpu():+ p=subprocess.run(['nvidia-smi','--query-gpu=name,driver_version,utilization.gpu,memory.used,clocks.current.graphics,power.draw','--format=csv,noheader,nounits'],capture_output=True,text=True,timeout=8)+ return p.stdout.strip() if p.returncode==0 else 'query failed '+str(p.returncode)+def query_priority(proc):+ gdi=ctypes.WinDLL('gdi32');fn=gdi.D3DKMTGetProcessSchedulingPriorityClass+ fn.argtypes=[wintypes.HANDLE,ctypes.POINTER(ctypes.c_int)];fn.restype=wintypes.LONG+ out=ctypes.c_int(-1);status=fn(int(proc._handle),ctypes.byref(out))+ return {'status':hex(status&0xffffffff),'actual':out.value}+def set_priority(proc,priority):+ gdi=ctypes.WinDLL('gdi32');fn=gdi.D3DKMTSetProcessSchedulingPriorityClass+ fn.argtypes=[wintypes.HANDLE,ctypes.c_int];fn.restype=wintypes.LONG+ return hex(fn(int(proc._handle),{'normal':2,'high':4,'realtime':5}[priority])&0xffffffff)+def foreground_pid():+ user=ctypes.WinDLL('user32');user.GetForegroundWindow.restype=wintypes.HWND+ user.GetWindowThreadProcessId.argtypes=[wintypes.HWND,ctypes.POINTER(wintypes.DWORD)]+ pid=wintypes.DWORD();user.GetWindowThreadProcessId(user.GetForegroundWindow(),ctypes.byref(pid));return pid.value+def focus_owned(proc):+ user=ctypes.WinDLL('user32');callback=ctypes.WINFUNCTYPE(wintypes.BOOL,wintypes.HWND,wintypes.LPARAM)+ windows=[]+ def collect(hwnd,_):+ pid=wintypes.DWORD();user.GetWindowThreadProcessId(hwnd,ctypes.byref(pid))+ if pid.value==proc.pid and user.IsWindowVisible(hwnd):windows.append(hwnd)+ return True+ user.EnumWindows(callback(collect),0)+ if windows:user.SetForegroundWindow(windows[0])+def run(variant,label,priority='normal',seconds=40,test_env=None,explicit=False,display=2,reduced=False,page='pro',software=False,oldUi=False):+ assert label.replace('-','').isalnum() and priority in ('normal','high','realtime')+ subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py')],check=True)+ if variant in PACKAGES:pkg=PACKAGES[variant]+ else:pkg=BASE/'tests'/TASK/('candidate-'+variant)+ app=BASE/'tests'/TASK/('perf-'+label)+ assert not app.exists();shutil.copytree(pkg,app,copy_function=copy,ignore=shutil.ignore_patterns('*.log','logs','user-data-*','*.dmp','*.pdb'))+ if oldUi:shutil.copytree(PACKAGES['203']/'qml',app/'qml',dirs_exist_ok=True)+ shutil.copy2(ROOT/'scripts/acceptance/stability-export-priority-perf.qml',app/'qml/Veyra/RegressionPerf.qml')+ conf={'modern':variant!='203','seconds':seconds,'media':MEDIA.as_posix(),'display':display,'reducedMotion':reduced,'page':page,'oldUi':oldUi}+ main=app/'qml/Veyra/Main.qml';text=main.read_text(encoding='utf8');at=text.rfind('}')+ text=text[:at]+'\n Loader { source:"RegressionPerf.qml"; onLoaded:item.config='+json.dumps(conf,ensure_ascii=True)+' }\n'+text[at:];main.write_text(text,encoding='utf8')+ out=BASE/'logs'/TASK/label;profile=BASE/'tests'/TASK/label/'profile';tmp=BASE/'tmp'/TASK/label+ for p in (out,profile,tmp):p.mkdir(parents=True,exist_ok=False)+ (profile/'qml-preferences.v1.json').write_text(json.dumps({'overlayCompat':'off','gpuPriority':priority,'decode':'auto','reducedMotion':reduced,'obsGameCapture':software}),encoding='utf8')+ env=os.environ.copy()+ for key in tuple(env):+ if key.upper().startswith(('VEYRA_','QT_QUICK_BACKEND','QSG_')):env.pop(key)+ env.update(TEMP=str(tmp),TMP=str(tmp),QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1',VEYRA_LOG_FILE=str(out/'player.log'),VEYRA_VERBOSE_FRAME_LOGS='1')+ if test_env:env.update(test_env)+ mediaReceipt=BASE/'logs'/TASK/('gta-media.json' if '--gta' in sys.argv else 'm2-media.json')+ st=MEDIA.stat();mediaIdentity={'path':str(MEDIA),'bytes':st.st_size,'mtimeNs':st.st_mtime_ns}+ prior=json.loads(mediaReceipt.read_text(encoding='utf8')) if mediaReceipt.exists() else {}+ if any(prior.get(k)!=v for k,v in mediaIdentity.items()):+ mediaIdentity['sha256']=sha(MEDIA);mediaReceipt.write_text(json.dumps(mediaIdentity,ensure_ascii=False,indent=2),encoding='utf8')+ else:mediaIdentity=prior+ receipt={'uiSourceHashes':{n:sha(app/'qml/Veyra'/n) if (app/'qml/Veyra'/n).is_file() else None for n in ('ProPage.qml','NodePage.qml','VTelemetryValue.qml','qmldir')},'variant':variant,'label':label,'priorityRequested':priority,'mediaSha256':mediaIdentity['sha256'],'exeSha256':sha(app/'veyra_qml_ui.exe'),'nrSha256':sha(app/'runtime/experimental/nr-original/nvngx_dlssnr.dll'),'gpuBefore':gpu(),'config':conf,'testEnv':test_env or {},'softwareUiRequested':software}+ t=time.monotonic();meters=[]+ with (out/'console.log').open('xb') as stream:+ proc=subprocess.Popen([str(app/'veyra_qml_ui.exe'),'--data-dir',str(profile),'--page',page,'--size','1280x800','--exit-after','125000'],cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT)+ applied=False+ try:+ while proc.poll() is None and time.monotonic()-t<140:+ elapsed=time.monotonic()-t+ if 3<elapsed and foreground_pid()!=proc.pid:focus_owned(proc)+ if explicit and not applied and elapsed>10 and query_priority(proc)['status']=='0x0':+ receipt['explicitSetStatus']=set_priority(proc,priority);applied=True+ meters.append({'elapsed':elapsed,'gpu':gpu(),'priority':query_priority(proc),'foregroundOwned':foreground_pid()==proc.pid})+ time.sleep(1)+ if proc.poll() is None:proc.kill();proc.wait(timeout=8);rc=124+ else:rc=proc.returncode+ finally:+ if proc.poll() is None:proc.kill();proc.wait(timeout=8)+ text=(out/'player.log').read_text(encoding='utf8',errors='replace');rows=[];raw=[]+ for line in text.splitlines():+ if 'REGRESSION_SAMPLE ' in line:+ r=json.loads(line.split('REGRESSION_SAMPLE ',1)[1]);+ if r['ready'] and 10<=r['position']<=48:rows.append(r)+ if '[player-timing]' in line:raw.append(dict((k,float(v)) for k,v in re.findall(r'(\w+)=(-?\d+(?:\.\d+)?)',line)))+ names=sorted({r['label'] for row in rows for r in row['stages'] if r['measured']})+ summary={}+ for name in names:+ values=[r['ms'] for row in rows for r in row['stages'] if r['label']==name and r['measured']]+ summary[name]={'medianOfOneSecondMeans':statistics.median(values),'min':min(values),'max':max(values),'observations':len(values)}+ passed=rc==0 and 'REGRESSION_PASS' in text and not any(s in text for s in ('REGRESSION_FAIL','ReferenceError:','TypeError:','[ERROR]','[FATAL]')) and len(rows)>=10+ uiRates=[b['uiFrames']-a['uiFrames'] for a,b in zip(rows,rows[1:])]+ receipt.update(uiFramesPerSecondMedian=statistics.median(uiRates) if uiRates else None,exitCode=rc,wallSeconds=time.monotonic()-t,passed=passed,summary=summary,foregroundSamples=sum(r['active'] for r in rows),observations=len(rows),medianSubmitFps=statistics.median(r['fps'] for r in rows) if rows else 0)+ for name,obj in [('result',receipt),('meters',meters),('samples',rows),('raw-timing',raw)]:+ (out/(name+'.json')).write_text(json.dumps(obj,ensure_ascii=False,indent=2),encoding='utf8')+ print(json.dumps(receipt,ensure_ascii=False),flush=True)+ if not passed:print('\n'.join(text.splitlines()[-20:]));raise SystemExit(1)+if __name__=='__main__':run(*sys.argv[1:4],seconds=int(sys.argv[4]) if len(sys.argv)>4 else 40,explicit='--explicit' in sys.argv,display=0 if '--tearing' in sys.argv else 2,+ reduced='--reduced' in sys.argv,page='min' if '--minimal' in sys.argv else 'pro',software='--software' in sys.argv,oldUi='--old-ui' in sys.argv,+ test_env={key:value for flag,key,value in [('--compute','VEYRA_TEST_GRAPH_COMPUTE','1'),('--d3d11','VEYRA_UI_RHI','d3d11'),('--basic','QSG_RENDER_LOOP','basic'),('--scene-info','QSG_INFO','1')] if flag in sys.argv})diff --git a/scripts/acceptance/release-2.0.5-quick.py b/scripts/acceptance/release-2.0.5-quick.pynew file mode 100644index 00000000..35ee3690--- /dev/null+++ b/scripts/acceptance/release-2.0.5-quick.py@@ -0,0 +1,26 @@+"""Bounded software-rendered tests of the actual staged telemetry component."""+from pathlib import Path+import hashlib,json,os,shutil,subprocess,sys,time+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+label=sys.argv[1];assert label.replace('-','').isalnum()+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py')],check=True)+app=BASE/'tests'/TASK/label;tmp=BASE/'tmp'/TASK/label;logs=BASE/'logs'/TASK+app.mkdir(parents=True,exist_ok=False);tmp.mkdir(parents=True,exist_ok=False)+shutil.copy2(BASE/'build'/TASK/'standard/veyra_qml_quick_tests.exe',app/'veyra_qml_quick_tests.exe')+shutil.copytree(ROOT/'qml',app/'qml');shutil.copytree(ROOT/'tests/qml/quick',app/'qml-tests')+qt=BASE/'deps/qt/6.8.3/msvc2022_64'+env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_'))}+env.update(TEMP=str(tmp),TMP=str(tmp),PATH=str(qt/'bin')+';'+env['PATH'],+ QML_IMPORT_PATH=str(qt/'qml'),QT_PLUGIN_PATH=str(qt/'plugins'),+ QT_QUICK_BACKEND='software',QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1')+args=[str(app/'veyra_qml_quick_tests.exe'),'-platform','offscreen','-input',str(app/'qml-tests/tst_telemetry.qml')]+begin=time.monotonic();log=logs/(label+'.log')+with log.open('xb') as stream:+ try:rc=subprocess.run(args,cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT,timeout=120).returncode+ except subprocess.TimeoutExpired:rc=124+body=log.read_text(encoding='utf8',errors='replace')+passed=rc==0 and '0 failed' in body and 'Telemetry::test_frequent_samples' in body+receipt=dict(passed=passed,exit=rc,seconds=time.monotonic()-begin,args=args,softwareOnly=True,+ componentSha256=hashlib.sha256((app/'qml/Veyra/VTelemetryValue.qml').read_bytes()).hexdigest(),log=str(log))+(logs/(label+'.json')).write_text(json.dumps(receipt,ensure_ascii=False,indent=2),encoding='utf8')+print(json.dumps(receipt,ensure_ascii=False));print('\n'.join(body.splitlines()[-22:]));raise SystemExit(0 if passed else 1)diff --git a/scripts/acceptance/release-2.0.5-tests.py b/scripts/acceptance/release-2.0.5-tests.pynew file mode 100644index 00000000..6aafe396--- /dev/null+++ b/scripts/acceptance/release-2.0.5-tests.py@@ -0,0 +1,54 @@+"""Serial, bounded GPU checks with immutable approved runtime components."""+from pathlib import Path+import os,json,sys,subprocess,shutil,hashlib,time+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+label,case=sys.argv[1:3];assert label.replace('-','').isalnum()+out=BASE/'tests'/TASK/label;tmp=BASE/'tmp'/TASK/label;logs=BASE/'logs'/TASK+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py')],check=True)+out.mkdir(parents=True,exist_ok=False);tmp.mkdir(parents=True,exist_ok=False)+app=BASE/'test-packages/obs-export-amdnr-20261006/Veyra-2.0.4-fix1-NVIDIA-win64-portable'+build=BASE/'build'/TASK/'standard'+for p in app.glob('*.dll'):shutil.copyfile(p,out/p.name)+shutil.copytree(build/'shaders',out/'shaders')+env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_'))}+env.update(TEMP=str(tmp),TMP=str(tmp),VEYRA_LOCAL_DATA_DIR=str(out/'profile'),VEYRA_LOG_FILE=str(logs/(label+'-engine.log')),VEYRA_TEST_EXPORT_DEBUG='1')+results=[];args=[]+if case=='units':targets=['veyra_effect_chain_tests','veyra_repair_contract_tests','veyra_preset_library_tests','veyra_ui_i18n_tests','veyra_effect_availability_tests','veyra_live_timing_tests','veyra_hdr_tuning_tests']+elif case=='graph':+ targets=['veyra_amd_nr_graph_tests'];d=out/'runtime/amd-nr';d.mkdir(parents=True);(d/'assets').mkdir()+ shutil.copyfile(build/'lmxxf-test-runtime/LmxxfNrRuntime.dll',d/'LmxxfNrRuntime.dll');(out/'runtime/nvidia').mkdir()+elif case in ('presentation','display-sync'):+ targets=['veyra_fg_presentation_tests'];shutil.copytree(app/'runtime',out/'runtime');shutil.copytree(app/'runtime_local',out/'runtime_local')+ args=[str(out/'pixels'),str(out/'runtime/experimental')]+ if case=='display-sync':args.append(case)+else:+ targets=['veyra_export_workflow_tests'];args=[case,str(BASE/'tests/release-2.0.4-20261005/nr-fixture.mp4'),str(out/'result.mp4')]+ shutil.copytree(app/'runtime',out/'runtime');shutil.copytree(app/'runtime_local',out/'runtime_local')+for target in targets:+ exe=out/(target+'.exe');shutil.copyfile(build/exe.name,exe)+ log=logs/(label+'-'+target+'.log');begin=time.monotonic()+ with log.open('xb') as console:+ try:rc=subprocess.run([str(exe),*args],cwd=out,env=env,stdout=console,stderr=subprocess.STDOUT,timeout=290).returncode+ except subprocess.TimeoutExpired:rc=124+ body=log.read_text(encoding='utf8',errors='replace')+ error_lines=[line for line in body.splitlines() if 'D3D12 ERROR' in line or 'D3D12 CORRUPTION' in line]+ passed=rc==0 and not error_lines+ if case=='display-sync':+ import re+ sections=re.findall(r'DISPLAY_SYNC_BEGIN full=(\d) lowQueue=(\d) mode=(\d)(.*?)DISPLAY_SYNC_END',body,re.S)+ passed=passed and len(sections)==12+ for full,low,mode,section in sections:+ calls=re.findall(r'\[present-contract\] backend=DXGI sync=(\d) flags=0x([0-9A-F]+) hr=0x([0-9A-F]+)',section)+ passed=passed and bool(calls) and all(int(sync)==(0 if mode=='0' else 1) and int(flags,16)==(0x200 if mode=='0' else 0) and int(hr,16)==0 for sync,flags,hr in calls)+ results.append(dict(target=target,exit=rc,passed=passed,seconds=time.monotonic()-begin,exeSHA=hashlib.sha256(exe.read_bytes()).hexdigest(),log=str(log),gpuErrors=error_lines))+ print(target,rc,'PASS' if passed else 'FAIL',flush=True);print('\n'.join(body.splitlines()[-11:]),flush=True)+if (out/'result.mp4').exists():+ probe=json.loads(subprocess.check_output([shutil.which('ffprobe'),'-v','error','-count_frames','-show_streams','-of','json',str(out/'result.mp4')],timeout=30))+ (out/'ffprobe.json').write_text(json.dumps(probe,indent=2),encoding='utf8')+ video=next(s for s in probe['streams'] if s['codec_type']=='video')+ assert int(video['nb_read_frames'])==(120 if case.startswith('fsr-') else {'lifecycle':20,'lifecycle-boundary':2}.get(case,60)),video+ decoded=subprocess.run([shutil.which('ffmpeg'),'-v','error','-xerror','-i',str(out/'result.mp4'),'-map','0:v:0','-f','null','-'],capture_output=True,timeout=60)+ assert decoded.returncode==0,decoded.stderr.decode('utf8',errors='replace')+ results.append(dict(decodedEveryEncodedFrame=True,dimensions=[video['width'],video['height']],frames=int(video['nb_read_frames']),passed=True))+(logs/(label+'.json')).write_text(json.dumps(results,indent=2),encoding='utf8')+raise SystemExit(0 if all(x['passed'] for x in results) else 1)diff --git a/scripts/acceptance/release-2.0.5-ui.py b/scripts/acceptance/release-2.0.5-ui.pynew file mode 100644index 00000000..0935bbed--- /dev/null+++ b/scripts/acceptance/release-2.0.5-ui.py@@ -0,0 +1,46 @@+"""Real QML bridge and isolated portable package; no fake GPU vendor."""+from pathlib import Path+import os,sys,json,subprocess,shutil,time,hashlib+ROOT=Path(__file__).resolve().parents[2];BASE=Path('E:/项目/Veyra');TASK='release-2.0.5-20261007'+label,vendor,case=sys.argv[1:4];assert label.replace('-','').isalnum() and vendor in ('AMD','NVIDIA')+out=BASE/'tests'/TASK/label;tmp=BASE/'tmp'/TASK/label;logs=BASE/'logs'/TASK+subprocess.run([sys.executable,'-B',str(ROOT/'scripts/acceptance/release-2.0.5-control.py')],check=True)+out.mkdir(parents=True,exist_ok=False);tmp.mkdir(parents=True,exist_ok=False)+source=BASE/'releases/publish-2.0.4-20261006/packages'/f'Veyra-2.0.4-{vendor}-win64-portable' if case in ('before','migration-before') else BASE/'test-packages'/TASK/f'Veyra-2.0.5-{vendor}-win64-portable'+def copy(a,b):+ p=Path(a)+ if p.suffix.lower() in ('.dll','.bin','.hsaco','.onnx','.f16','.f32'):+ try:os.link(a,b);return b+ except OSError:pass+ return shutil.copy2(a,b)+app=out/'app';shutil.copytree(source,app,copy_function=copy,ignore=shutil.ignore_patterns('*.log','logs','user-data-*','*.dmp','*.pdb'))+shutil.copy2(ROOT/'scripts/acceptance/release-2.0.5-ui.qml',app/'qml/Veyra/RepairRegression.qml')+conf=dict(case=case,catalogOnly=case in ('before','catalog'),before=case in ('before','migration-before'),restore=case=='restore',media=(BASE/'tests/perf-matrix/media/M2.mkv').as_posix(),exportMedia=(BASE/'tests/release-2.0.4-20261005/nr-fixture.mp4').as_posix())+main=app/'qml/Veyra/Main.qml';text=main.read_text(encoding='utf8');at=text.rfind('}')+main.write_text(text[:at]+'\nLoader{source:"RepairRegression.qml";onLoaded:item.config='+json.dumps(conf)+'}\n'+text[at:],encoding='utf8')+env={k:v for k,v in os.environ.items() if not k.upper().startswith(('VEYRA_','QT_','QSG_'))}+env.update(TEMP=str(tmp),TMP=str(tmp),VEYRA_LOG_FILE=str(logs/(label+'-engine.log')),QML_DISABLE_DISK_CACHE='1',QT_FORCE_STDERR_LOGGING='1')+(out/'outputs').mkdir()+profile=BASE/'tests'/TASK/'gui-fsr-export-second/profile' if case=='restore' else out/'profile'+if case=='telemetry':+ profile.mkdir();(profile/'qml-preferences.v1.json').write_text(json.dumps({'gpuPriority':'normal','overlayCompat':'off'}),encoding='utf8')+if case in ('migration-before','migration','nvidia-keep'):+ shutil.copytree(BASE/'tests'/TASK/'gui-amd-default-seed/profile',profile)+elif case=='xess-keep':+ shutil.copytree(BASE/'tests'/TASK/'gui-amd-default-migrate/profile',profile)+args=[str(app/'veyra_qml_ui.exe'),'--data-dir',str(profile),'--page','pro','--size','1280x800','--exit-after','250000','--export-out',str(out/'outputs')]+console=logs/(label+'.log');begin=time.monotonic()+with console.open('xb') as stream:+ try:rc=subprocess.run(args,cwd=app,env=env,stdout=stream,stderr=subprocess.STDOUT,timeout=270).returncode+ except subprocess.TimeoutExpired:rc=124+body=console.read_text(encoding='utf8',errors='replace')+passed=rc==0 and ('REPAIR_UI_EXPECTED_OLD' if conf['before'] else 'REPAIR_UI_PASS') in body and not any(s in body for s in ('REPAIR_UI_FAIL','ReferenceError:','TypeError:'))+receipt=dict(passed=passed,exit=rc,seconds=time.monotonic()-begin,case=case,vendorPackage=vendor,actualGpu='RTX5070; missing-NVIDIA-runtime gate reproduction is not AMD hardware validation',exeSHA=hashlib.sha256((app/'veyra_qml_ui.exe').read_bytes()).hexdigest(),config=conf)+if case=='export':+ files=list((out/'outputs').glob('*.mp4'));receipt['outputs']=[]+ for f in files:+ probe=json.loads(subprocess.check_output([shutil.which('ffprobe'),'-v','error','-count_frames','-show_streams','-of','json',str(f)],timeout=30));v=next(s for s in probe['streams'] if s['codec_type']=='video')+ receipt['outputs'].append(dict(path=str(f),frames=int(v['nb_read_frames']),width=v['width'],height=v['height'],fps=v['r_frame_rate']))+ passed=passed and len(files)==1 and receipt['outputs'][0]['frames']==120;receipt['passed']=passed+(logs/(label+'.json')).write_text(json.dumps(receipt,ensure_ascii=False,indent=2),encoding='utf8')+print(json.dumps(receipt,ensure_ascii=False));print('\n'.join(body.splitlines()[-12:]));raise SystemExit(0 if passed else 1)diff --git a/scripts/acceptance/release-2.0.5-ui.qml b/scripts/acceptance/release-2.0.5-ui.qmlnew file mode 100644index 00000000..b200eba8--- /dev/null+++ b/scripts/acceptance/release-2.0.5-ui.qml@@ -0,0 +1,168 @@+import QtQuick+Item {+ id:test+ property var config:({})+ property var appWindow:Window.window+ property int ticks:0+ property int phase:0+ property int readyTick:0+ property bool exportStarted:false+ property double pausePosition:0+ property int uiFrames:0+ function require(v,s){if(!v)throw new Error(s)}+ function preset(){const p=veyra.presets.find(p=>p.name==="FSR repair regression");require(p!==undefined,"saved list preset missing");require(veyra.applyPresetIndex(p.index),"apply preset refused")}+ function saved(){console.log("REPAIR_UI_SAVED",JSON.stringify({backend:veyra.fgBackendName,multiplier:veyra.fgMultiplier,enabled:veyra.fgEnabled,flow:veyra.flowQuality,content:veyra.contentRate}));require(veyra.fgBackendName==="fsr3"&&veyra.fgMultiplier===2&&veyra.fgEnabled,"FSR saved choice");require(veyra.flowQuality===2&&veyra.contentRate===2,"shared flow saved in list preset")}+ Connections {target:veyra;function onNotice(text,error){console.log("REPAIR_UI_NOTICE",text,error)}}+ Connections {target:test.appWindow;function onFrameSwapped(){++test.uiFrames}}+ Timer {id:runner;interval:300;running:true;repeat:true;onTriggered:{try{+ ++test.ticks;test.require(test.ticks<800,"240s deadline phase="+test.phase)+ if(test.phase===0){+ if(test.ticks<10)return+ if(test.config.case==="seed-dlss"){+ veyra.nodeMode=0;veyra.nrEnabled=false;veyra.srEnabled=false+ veyra.fgBackendName="dlss";veyra.fgMultiplier=6;veyra.fgEnabled=true+ test.require(veyra.fgBackendName==="dlss"&&veyra.fgEnabled&&veyra.fgMultiplier===6,"seed live list DLSS 6X")+ veyra.nodeMode=1;veyra.fgBackendName="dlss";veyra.fgMultiplier=4;veyra.fgEnabled=false+ test.require(veyra.nodeMode===1&&veyra.fgBackendName==="dlss","seed inactive node DLSS choice")+ veyra.nodeMode=0;test.require(veyra.fgEnabled&&veyra.fgMultiplier===6,"seed mode roundtrip")+ console.log("REPAIR_UI_PASS");runner.stop();Qt.quit();return+ }+ if(["migration-before","migration","nvidia-keep","xess-keep"].includes(test.config.case)){+ console.log("REPAIR_UI_DEFAULT",test.config.case,veyra.fgBackendName,veyra.fgMultiplier,veyra.fgEnabled,veyra.nodeMode)+ const old=test.config.case==="migration-before"+ const nv=test.config.case==="nvidia-keep"+ const expected=old||nv?"dlss":test.config.case==="xess-keep"?"xess":"fsr3"+ test.require(veyra.nodeMode===0&&veyra.fgBackendName===expected,"restored list backend")+ test.require(veyra.fgMultiplier===(old?1:nv?6:2)&&veyra.fgEnabled===!old,"list multiplier and enabled state")+ veyra.nodeMode=1+ test.require(veyra.nodeMode===1&&veyra.fgBackendName===(old||nv?"dlss":"fsr3"),"inactive node backend restored")+ test.require(!veyra.fgEnabled,"disabled node stage must remain disabled")+ veyra.nodeMode=0+ test.require(veyra.fgBackendName===expected&&veyra.fgEnabled===!old,"list return preserves backend and switch")+ if(test.config.case==="migration"){+ veyra.fgBackendName="xess";test.require(veyra.fgBackendName==="xess"&&veyra.fgMultiplier===2,"manual XeSS choice remains available")+ }+ console.log(old?"REPAIR_UI_EXPECTED_OLD":"REPAIR_UI_PASS");runner.stop();Qt.quit();return+ }+ if(test.config.restore){+ test.saved();veyra.flowQuality=0;veyra.contentRate=0;veyra.fgEnabled=false+ test.preset();test.saved();console.log("REPAIR_UI_PASS");runner.stop();Qt.quit();return+ }+ if(test.config.case==="telemetry"){+ veyra.nodeMode=0;veyra.muted=true;veyra.reducedMotion=false+ veyra.nrEnabled=false;veyra.srEnabled=false;veyra.fgEnabled=false;veyra.videoHdr=false;veyra.colorEnabled=false+ if(!veyra.nrLayers.length)veyra.addEffect("nr")+ test.require(veyra.nrLayers.length===1,"single list NR layer")+ const n=veyra.nrLayers[0].index+ for(const p of [["runtime",3],["sizePolicy",0],["style",0],["total",1],["temporal",0],["antiFlicker",0],["correctionEnabled",0]])+ test.require(veyra.setNrLayerParameter(n,p[0],p[1]),"list NR parameter "+p[0])+ veyra.nrEnabled=true;veyra.displaySync=2+ veyra.openPath(test.config.media);test.phase=10;return+ }+ veyra.nodeMode=0;veyra.muted=true;veyra.nrEnabled=false;veyra.srEnabled=false;veyra.fgEnabled=false+ console.log("REPAIR_UI_CATALOG",JSON.stringify(veyra.fgBackendChoices),JSON.stringify(veyra.effectCatalog))+ const generic=veyra.effectCatalog.find(p=>p.id==="frame-generation")+ const dlss=veyra.fgBackendChoices.find(p=>p.id==="dlss")+ const fsr=veyra.fgBackendChoices.find(p=>p.id==="fsr3")+ test.require(generic!==undefined&&fsr!==undefined&&!fsr.disabled,"FSR component available")+ if(test.config.catalogOnly){+ test.require(dlss.disabled,"missing NVIDIA runtime is required to reproduce old generic-entry gate")+ if(!test.config.before)test.require(veyra.fgBackendName==="fsr3","missing DLSS provider defaults to FSR before adding")+ // List mode owns a fixed FG tail. The Add Effect menu is in Node mode,+ // whose fresh draft has no FG node. Exercise that actual UI contract.+ veyra.nodeMode=1+ test.require(veyra.nodeMode===1,"open Node Add Effect context")+ test.require(!veyra.chain.some(p=>p.type==="frame-generation"),"fresh node draft has no FG")+ const added=veyra.addEffect("frame-generation")+ if(test.config.before){test.require(generic.disabled&&added<0,"old gate did not reproduce");console.log("REPAIR_UI_EXPECTED_OLD");runner.stop();Qt.quit();return}+ test.require(!generic.disabled&&added>=0,"generic FG entry must use any available provider")+ test.require(veyra.fgBackendName==="fsr3"&&veyra.chain.filter(p=>p.type==="frame-generation").length===1,"Node add uses available FSR once")+ veyra.nodeMode=0+ }else{+ // The fresh NVIDIA list already contains its disabled FG stage.+ // The missing-runtime package above exercises adding the absent stage.+ veyra.fgBackendName="dlss";veyra.fgMultiplier=6+ }+ veyra.fgBackendName="fsr3";veyra.fgMultiplier=2;veyra.fgEnabled=true+ veyra.flowQuality=2;veyra.contentRate=2;veyra.fgMotionSource=0+ test.saved();test.require(veyra.savePresetAs("FSR repair regression",21,false),"save list Chain+FG+Flow preset")+ veyra.flowQuality=0;veyra.contentRate=0;veyra.fgEnabled=false+ test.preset();test.saved()+ if(test.config.catalogOnly){console.log("REPAIR_UI_PASS");runner.stop();Qt.quit();return}+ veyra.displaySync=2;veyra.outputRateMode=0+ veyra.openPath(test.config.media);test.phase=1+ }else if(test.phase>=10){+ test.require(!veyra.failed,"telemetry lifecycle player failed")+ const dwell=test.ticks-test.readyTick+ if(test.phase===10){+ if(!veyra.running||!veyra.nrActive||veyra.position<2)return+ if(!test.readyTick)test.readyTick=test.ticks+ if(dwell<10)return+ test.pausePosition=veyra.position;veyra.togglePlayPause();test.phase=11;test.readyTick=test.ticks+ }else if(test.phase===11){+ if(dwell<6)return+ test.require(veyra.paused&&Math.abs(veyra.position-test.pausePosition)<0.2,"pause must retain media position")+ console.log("REPAIR_UI_TELEMETRY","paused",test.uiFrames,JSON.stringify(veyra.stageTimings))+ veyra.togglePlayPause();test.phase=12;test.readyTick=test.ticks+ }else if(test.phase===12){+ if(dwell<10)return+ test.require(!veyra.paused&&veyra.nrActive,"resume NR")+ test.appWindow.showFullScreen();test.phase=13;test.readyTick=test.ticks+ }else if(test.phase===13){+ if(dwell<10)return+ test.require(veyra.nrActive,"fullscreen NR")+ test.appWindow.showNormal();veyra.seekTo(12);test.phase=14;test.readyTick=test.ticks+ }else if(test.phase===14){+ if(dwell<10||veyra.position<12)return+ test.appWindow.page="node";test.require(veyra.nodeMode===1,"node page mode")+ const i=veyra.addEffect("nr");test.require(i>=0,"add node NR")+ for(const p of [["runtime",3],["sizePolicy",0],["temporal",0],["antiFlicker",0],["correctionEnabled",0]])+ test.require(veyra.setNrLayerParameter(i,p[0],p[1]),"node NR parameter "+p[0])+ const node=veyra.chain.find(p=>p.index===i)+ test.require(node!==undefined&&veyra.insertNodeAfter(node.id,0),"connect NR between input and output")+ test.phase=15;test.readyTick=test.ticks+ }else if(test.phase===15){+ if(dwell<12||!veyra.nrActive)return+ console.log("REPAIR_UI_TELEMETRY","node",JSON.stringify(veyra.nodeTimings),JSON.stringify(veyra.nodeConnections))+ veyra.nodeMode=0;test.appWindow.page="pro";test.phase=16;test.readyTick=test.ticks+ }else if(test.phase===16){+ if(dwell<10||!veyra.nrActive)return+ test.require(veyra.nrLayers.length===1&&veyra.nrLayers[0].runtime===3&&!veyra.fgEnabled&&!veyra.srEnabled,"list configuration survives mode roundtrip")+ veyra.reducedMotion=true;test.phase=17;test.readyTick=test.ticks+ }else if(test.phase===17){+ if(dwell<5)return+ test.require(veyra.reducedMotion&&veyra.nrActive,"reduced-motion switch preserves NR")+ veyra.stopPlayback();test.phase=18;test.readyTick=test.ticks+ }else if(test.phase===18){+ if(dwell<5)return+ test.require(!veyra.running,"stop must finish")+ console.log("REPAIR_UI_PASS");runner.stop();Qt.quit()+ }+ }else if(test.phase===1){+ test.require(!veyra.failed,"FSR preview failed "+veyra.runStatus)+ if(!veyra.running||veyra.position<2)return+ test.require(veyra.fgBackendName==="fsr3"&&veyra.fgEnabled,"live FSR selection rolled back")+ if(!test.readyTick)test.readyTick=test.ticks+ console.log("REPAIR_UI_SAMPLE",JSON.stringify({position:veyra.position,fps:veyra.submitFps,backend:veyra.fgBackendName,status:veyra.presentationStatus,detail:veyra.runStatusDetail}))+ if(test.ticks-test.readyTick<12)return+ test.appWindow.showFullScreen();test.phase=2;test.readyTick=test.ticks+ }else if(test.phase===2){+ test.require(!veyra.failed,"fullscreen preview failed")+ if(test.ticks-test.readyTick<12)return+ test.appWindow.showNormal();test.phase=3;test.readyTick=test.ticks+ }else if(test.phase===3){+ if(test.ticks-test.readyTick<8)return+ veyra.exportCompletionSound=false;veyra.exportHevc=false;veyra.exportRateControl=1+ veyra.addExportFiles([test.config.exportMedia]);test.phase=4+ }else if(test.phase===4){+ if(veyra.exportReadyCount<1)return+ veyra.startExport();test.require(veyra.exportRunning,"FSR GUI export rejected")+ test.exportStarted=true;test.phase=5+ }else if(test.phase===5){+ if(veyra.exportRunning)return+ test.require(veyra.exportItems.some(p=>p.state==="done"),"FSR GUI export failed "+JSON.stringify(veyra.exportItems))+ console.log("REPAIR_UI_EXPORT",JSON.stringify(veyra.exportItems));test.saved()+ console.log("REPAIR_UI_PASS");runner.stop();Qt.quit()+ }+ }catch(e){console.error("REPAIR_UI_FAIL",test.phase,e.message);runner.stop();Qt.exit(3)}}}+}