Add full source parity validation workflow
This commit is contained in:
164
docs/WEB_SOURCE_PARITY_FULL_VALIDATION.md
Normal file
164
docs/WEB_SOURCE_PARITY_FULL_VALIDATION.md
Normal file
@@ -0,0 +1,164 @@
|
||||
# Web Blender 对标 Blender 5.2 的完整验证流程
|
||||
|
||||
## 1. 目的与结论口径
|
||||
|
||||
本流程验证 Web 项目是否按 Blender 5.2 源程序的声明路由、原生 WebEngine/WASM、Main/SceneIR、Worker、前端和 Chromium 生产入口工作。它不把“有一个按钮”“路由已分类”或“代表性烟测通过”误报为 Blender 全量等价。
|
||||
|
||||
最终报告必须同时给出两个数字:
|
||||
|
||||
| 口径 | 当前基线 | 通过条件 |
|
||||
| --- | ---: | --- |
|
||||
| Web 产品工作流 | 16 模块、34 功能、101 内部子模块 | 既有一次性烟测和定点修复全部通过 |
|
||||
| Blender 源程序对标单元 | 3802 单元 | 每个单元有 source-backed 行为 receipt;只有路由分类不能通过 |
|
||||
|
||||
当前基线来自 `dynamic-inventory.json` 和 `blender-feature-route-catalog.json`:3802/3802 已分类,1025 项已有精确行为证据,2777 项仍为 `UNVERIFIED`。因此在 2777 项补齐前,报告的 `sourceParityStatus` 必须是 `PARTIAL`,不得写成全量 parity complete。
|
||||
|
||||
## 2. 强制规则
|
||||
|
||||
1. 只使用 Chromium;不运行 Firefox/WebKit 作为本项目发布结论。
|
||||
2. 所有编辑必须通过 Blender 5.2 原生 WebEngine/WASM 和权威 Main;JS/Three.js 只能是 UI、视图和协议适配层。
|
||||
3. 复用已有 SHA-256 证据;一次性功能烟测和内部子模块烟测不得重跑。新增修复只重跑对应失败层。
|
||||
4. 源码检索只允许批次入口:`node tools/web/search-wbv2-batch-source.mjs --pattern <text> [--runtime <allowlisted-path>]`;全量清单只在明确审计命令中读取。
|
||||
5. 每个正例必须配套负例、无突变检查、undo/redo、save/reopen 或明确的 reader-only 证明。
|
||||
6. 任何环境缺失、构件 hash 漂移、Blender 版本/编译能力不匹配、测试失败都保持 `BLOCKED`,不得用跳过或假结果替代。
|
||||
|
||||
## 3. 验证阶段
|
||||
|
||||
### A. 上下文和仓库一致性
|
||||
|
||||
```bash
|
||||
node tools/web/print-task-context.mjs
|
||||
node tools/web/check-task-context.mjs
|
||||
node tools/web/check-context-governance.mjs
|
||||
git diff --check
|
||||
```
|
||||
|
||||
验证当前任务、parent manifest、输入预算和工作树证据没有漂移。
|
||||
|
||||
### B. 源程序清单与路由对标
|
||||
|
||||
```bash
|
||||
npm --prefix web run test:wbv2-inventory
|
||||
node tools/web/check-source-dynamic-inventory.mjs
|
||||
npm --prefix web run test:blender-rna-inventory
|
||||
npm --prefix web run test:blender-operator-inventory
|
||||
npm --prefix web run test:blender-family-inventory
|
||||
npm --prefix web run test:blender-format-inventory
|
||||
npm --prefix web run test:blender-editor-inventory
|
||||
npm --prefix web run test:blender-core-inventory
|
||||
npm --prefix web run test:blender-parity-map
|
||||
npm --prefix web run test:blender-gap-audit
|
||||
node tools/web/audit-wbv2-feature-completeness.mjs
|
||||
node tools/web/check-wbv2-feature-smoke-plan.mjs
|
||||
node tools/web/check-wbv2-submodule-smoke-plan.mjs
|
||||
```
|
||||
|
||||
记录 `unitCount`、`classifiedCount`、`unavailableUnits`、`verifiedUnits`、`unverifiedUnits`、`sourceTreeSha256`。`UNAVAILABLE=0` 只表示入口分类完整,不表示逐单元行为通过。
|
||||
|
||||
### C. 协议、静态质量、单元和原生构件
|
||||
|
||||
```bash
|
||||
npm --prefix web run typecheck
|
||||
npm --prefix web run lint
|
||||
node tools/web/run-unit-tests.mjs
|
||||
npm --prefix web run test:local-deps
|
||||
node tools/web/check-web-engine-source-sync.mjs
|
||||
node tools/web/check-deployment-contract.mjs
|
||||
node tools/web/check-deployment-http.mjs
|
||||
node tools/web/check-deployment-cache.mjs
|
||||
source tools/web/emscripten-env.sh
|
||||
cmake --build build_web_blender6 --target web_engine --parallel "$(nproc)"
|
||||
```
|
||||
|
||||
构件必须绑定同一源码指纹,开发/公开/WASM 构件的 SHA-256 必须一致。使用 Blender 对标时记录:
|
||||
|
||||
```bash
|
||||
BLENDER_BIN=build_blender_native/bin/blender \
|
||||
npm --prefix web run release:v1-acceptance
|
||||
```
|
||||
|
||||
若该 Blender 构建的能力与声明不符(例如 `USD=False`),必须取得具有对应能力的官方/可复现构件;在此之前 USD 对标项为 `BLOCKED`,不能伪造通过。
|
||||
|
||||
### D. V1 声明功能逐项验收
|
||||
|
||||
```bash
|
||||
npm --prefix web run release:v1-acceptance
|
||||
npm --prefix web run test:v1-acceptance-coverage
|
||||
npm --prefix web run test:v1-acceptance-evidence
|
||||
npm --prefix web run test:v1-acceptance-release-binding
|
||||
```
|
||||
|
||||
该阶段按 `docs/status/parity-ledger.json` 的 N-015 至 N-026 家族去重后执行 49 个唯一入口、50 个声明,覆盖非 Mesh、Grease Pencil、Paint、Physics、Lighting、Compositor、Sequencer、Tracking、Asset、Editor、Scripting、Release。
|
||||
|
||||
### E. 全量 Chromium 功能验证
|
||||
|
||||
```bash
|
||||
npm --prefix web run test:e2e -- --workers=1
|
||||
npm --prefix web run test:browser
|
||||
npm --prefix web run test:v1-user-loop
|
||||
npm --prefix web run test:network-interruption
|
||||
npm --prefix web run test:device-loss
|
||||
npm --prefix web run test:oom-recovery
|
||||
npm --prefix web run test:storage-quota
|
||||
npm --prefix web run test:malicious-blends
|
||||
npm --prefix web run test:asset-library
|
||||
```
|
||||
|
||||
使用 `google-chrome`,当前实际收集 350 个测试;单元层当前实际收集 429 个测试。数量随源码演进,以运行器实际收集数为准。关注:主线程/Worker、WASM、OPFS、undo/redo、保存重开、取消、恢复、恶意输入和移动/桌面布局。
|
||||
|
||||
### F. 性能、资源、发布和恢复
|
||||
|
||||
```bash
|
||||
npm --prefix web run test:release-performance
|
||||
npm --prefix web run test:geometry-10m-performance
|
||||
npm --prefix web run test:texture-4k-performance
|
||||
npm --prefix web run test:texture-8k-performance
|
||||
npm --prefix web run test:simulation-cache-performance
|
||||
npm --prefix web run test:long-media-performance
|
||||
npm --prefix web run test:release-package
|
||||
npm --prefix web run release:offline
|
||||
npm --prefix web run test:binary-archive
|
||||
npm --prefix web run test:source-archive
|
||||
npm --prefix web run test:deployment-runbook
|
||||
npm --prefix web run test:upgrade-runbook
|
||||
npm --prefix web run test:rollback-runbook
|
||||
npm --prefix web run test:operations-diagnostics
|
||||
npm --prefix web run test:operations-rehearsal
|
||||
npm --prefix web run test:rc-docs
|
||||
npm --prefix web run release:rc-manifest
|
||||
```
|
||||
|
||||
### G. 发布站点验证
|
||||
|
||||
```bash
|
||||
WEB_ORIGIN=https://49.232.250.35:58014 \
|
||||
node tools/web/check-deployed-web-blender.mjs
|
||||
```
|
||||
|
||||
至少验证:HTTPS 证书、三项 COOP/COEP/CORP、CSP、HTML/manifest/WASM/SVG MIME、强 ETag、WASM `206` Range、完整 WASM SHA-256、Chromium `isSecureContext`、`crossOriginIsolated`、WASM ready、打开真实 `.blend`、执行一次原生 `Add CUBE` Main mutation、保存/重开和无控制台/网络错误。
|
||||
|
||||
## 4. 失败处理
|
||||
|
||||
- `sourceParityStatus=PARTIAL`:保留 2777 个未验证单元清单,生成下一批 source-backed evidence 任务。
|
||||
- 单个功能失败:只重跑其 family 和直接依赖,不重跑已通过的一次性烟测。
|
||||
- 构件 hash 漂移:停止浏览器验证,重新 build、同步 receipt、再继续。
|
||||
- Blender 对标环境缺能力:记录 `BLOCKED` 及可执行文件/归档 SHA-256,禁止降级为“通过”。
|
||||
- 线上部署失败:保留当前 release,检查回滚目录,不删除浏览器数据或旧 release。
|
||||
|
||||
## 5. 机器报告
|
||||
|
||||
执行器:`tools/web/run-web-source-parity-validation.mjs`。
|
||||
|
||||
```bash
|
||||
node tools/web/run-web-source-parity-validation.mjs
|
||||
```
|
||||
|
||||
报告:`tests/golden/WBV2/full-source-parity-validation-report.json`,每个阶段记录命令、退出码、耗时、日志路径和 SHA-256,并写出:
|
||||
|
||||
```text
|
||||
sourceParityStatus: READY | PARTIAL | BLOCKED
|
||||
webProductStatus: READY | BLOCKED
|
||||
releaseStatus: READY | BLOCKED
|
||||
```
|
||||
|
||||
只有 `sourceParityStatus=READY`、`webProductStatus=READY`、`releaseStatus=READY` 且报告自身 hash 已绑定,才允许声明“按源程序全量对标验证完成”。
|
||||
Reference in New Issue
Block a user