test(web): simplify suite console assertions filter the Emscripten syscall stub
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

__syscall_mprotect is a debug-libc stub returning success; record it as
consoleNoise and keep productConsoleErrors strict, with a reverse case.
Also align the suite with current entries: Outliner selection, the manual
下载 .blend download (OPFS saves no longer download), the ratio > 0
contract, and scene-only snapshot comparisons.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-29 05:10:19 +08:00
parent 390d487eb8
commit 68b19d37dc
3 changed files with 116 additions and 35 deletions

View File

@@ -468,3 +468,26 @@ Web 视图里在大纲中 Ctrl+点击选中两个对象后,原生选择被覆
**5. 声明**
- `acceptance: NOT_CLAIMED`:单次有头通过只代表该候选、该环境,不给出整体完成度。
---
### mesh-simplify 控制台断言残余关闭(回执 simplify-console-20261129)
**1. 归因(用历史回执代替重新编译的 A/B)**
- `tests/golden/WBV2-P1424-001/lod-recovery-20261021/` 的 10 份历史回执(早于 decimate 改动)全部 `status: failed`,`consoleErrors` 均为同样的两条 `warning: unsupported syscall: __syscall_mprotect`;`tests/golden/WBV2-P1424-001/mesh-simplify-20261020/` 无 console 失败。据此该失败早于本轮引擎改动,无需回退打标代码做 A/B。
- 该行来自 Emscripten 调试版 libc 的系统调用桩 `.emsdk/upstream/emscripten/system/lib/libc/emscripten_syscall_stubs.c`:`__syscall_mprotect` 只在非 NDEBUG 构建 `REPORT`,并 `return 0`(注释 "let's not and say we did")。调用方拿到成功,无可观察功能影响。
- 运行时探针(Playwright + 生产候选):两条消息分别出现在引擎 WASM 模块两次实例化期间、场景解析之前,与 Decimate 计算无关。
**2. 测试修正(`web/tests/e2e/mesh-simplify-production.spec.ts`)**
- 新增 `RUNTIME_STUB_NOISE` 窄过滤(仅 `warning: unsupported syscall: __syscall_<name>`),断言改用 `productErrors`;回执保留原始 `consoleErrors` 并新增 `consoleNoise` / `productConsoleErrors`。
- 新增反向用例 `console noise filter keeps real product errors`:桩消息被过滤,注入的真实 `console.error` 仍被捕获。
- 同批修正测试与当前产品入口的漂移:Outliner 树节点选择(视口侧栏同名节点引发 strict 冲突);保存改用「下载 .blend」入口(OPFS 保存不再自动下载,`saveBlend()` 仍先落 OPFS);COLLAPSE 比例 0 按 `protocol/simplify.ts:188` 与引擎 `ratio <= 0` 契约断言拒绝;快照比较剔除编辑器会话状态;项目动作锁未释放时按提示重试应用。
**3. 结果**
- `web/tests/e2e/mesh-simplify-production.spec.ts` 12 例全部通过;回执目录 `tests/golden/WBV2-P1424-001/simplify-console-20261129/`;候选 `web_engine.wasm` sha256 `f0a528ae44be8335d4c340bcc5d08ffb1e450b9e5420318dba50370d4fab8280`。
- 每份通过回执 `consoleNoise` 非空、`productConsoleErrors` 为空;反向用例回执含 2 条注入错误。
- 本批只跑该文件;配置内其余 3 个 spec(`mesh-lod-reader-production`、`object-hierarchy-production`、`hierarchy-simplify-combined`)未在本批运行。
- `acceptance: NOT_CLAIMED`:单次、单候选、单环境结果,不给整体完成度。

View File

@@ -118,4 +118,4 @@ node tools/web/generate-decimate-golden.mjs \
### 残余补充
- 用例证据 JSON 由运行器归档到回执 `artifacts/evidence/`;Playwright 仅对失败用例保留附件路径,运行器按本次运行时间过滤 `web/test-results/**/decimate-*.json` 复制。
- `web/tests/e2e/mesh-simplify-production.spec.ts` 当前失败于「控制台错误必须为空」断言(记录里只有 `warning: unsupported syscall: __syscall_mprotect`),几何断言通过;与本次改动的关系未做 A/B 归因,单独排查。
- `web/tests/e2e/mesh-simplify-production.spec.ts` 控制台断言残余**已关闭**(回执 `tests/golden/WBV2-P1424-001/simplify-console-20261129`,候选 wasm `f0a528ae…`,12 例通过):`__syscall_mprotect` 是 Emscripten 调试版 libc 的系统调用桩(`return 0`,仅非 NDEBUG 打印),按窄规则过滤且原始文本仍进回执;同批修正 Outliner 选择器、OPFS 保存改走「下载 .blend」入口、COLLAPSE 比例 0 契约与快照会话状态比较。