mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
fix(ci): [CI-01] reject rendering substitutions in installed validation
This commit is contained in:
1 parent
eba8c29fa7
commit
6af43208af
13 files changed
+3271
-11
No files matched your search
@@ -1,10 +1,9 @@
|
||||
import assert from 'node:assert/strict'
|
||||
import process from 'node:process'
|
||||
import { defineConfig } from '@playwright/test'
|
||||
import base from './playwright.config.js'
|
||||
import { browserScopeConfig, installedPackages } from './scripts/browser-validation/scope.ts'
|
||||
import { browserScopeConfig, installedPackages, verifyInstalledBrowserEnvironment } from './scripts/browser-validation/scope.ts'
|
||||
import { verifyInstalledArtifacts } from './scripts/installed-artifacts.mjs'
|
||||
|
||||
assert(process.env.ARTPLAYER_BROWSER_ARTIFACTS, 'Use yarn test:browser:installed with checked tarballs')
|
||||
verifyInstalledBrowserEnvironment(process.env)
|
||||
verifyInstalledArtifacts(process.cwd(), process.env.ARTPLAYER_BROWSER_ARTIFACTS, installedPackages)
|
||||
export default defineConfig(base, browserScopeConfig('installed'))
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,60 @@
|
||||
# CI-01:安装验收入口拒绝渲染诊断替换
|
||||
|
||||
基线 `eba8c29fa78c8040204bab3dc9773500842a2ddd`。本轮修复安装浏览器验收的环境
|
||||
策略缺口,CI-01 整体继续 doing。没有修改播放器/插件源码、公开 API、类型、
|
||||
版本、Yarn 锁或已配置的 CI 矩阵/权限;没有推送或触发远端作业。
|
||||
|
||||
## 复现及实现
|
||||
|
||||
原 `browserInvocation('installed', ...)` 会接受九个实际启用的 JASSUB 诊断
|
||||
开关,改变 custom canvas、on-demand、offscreen、asyncRender、rAF读取、
|
||||
截图、原生bitmap、读取等待及单任务队列。它也接受 Multiple Subtitles 的
|
||||
`ARTPLAYER_SOURCE_RESTORE_EVENT=1`,用原生事件等待代替既定的Promise/seeking
|
||||
条件。即使 tarball 哈希正确,这些配置也不是标准安装测试的原条件。
|
||||
|
||||
此外,直接 import `playwright.installed.config.js` 仅校验安装字节,会绕过
|
||||
launcher 已有的 MediaBunny/Iframe/Mask/DASH 诊断限制。本轮用子进程先指定
|
||||
不存在的 map 和诊断参数:旧配置走到 ENOENT,证明环境策略没有先执行。
|
||||
原测试结果6通过/11失败,其中10项对应新发现的环境替换,1项对应直接配置路径。
|
||||
|
||||
把现有策略抽为 `scope.ts` 的 `verifyInstalledBrowserEnvironment(env)`,
|
||||
由 launcher 和 installed config 在读取 tarball 之前共同调用,并增加上述
|
||||
十个精确启用值的校验。错误明确指出变量;不偷偷删除用户选择的诊断参数。
|
||||
直接配置同时获得原有 MediaBunny/Iframe/Mask/DASH 规则,避免维护两份策略。
|
||||
|
||||
这不是禁止播放器用户配置 offscreen,也没有全局关闭异步渲染。标准 native
|
||||
JASSUB 用例保留显式主线程路径,hybrid 按浏览器能力运行;用例内部显式覆盖
|
||||
onDemandRender=true/false 的矩阵仍保留。外部环境不能悄悄替换这些既定条件。
|
||||
明确停用的值允许进入;不替换恢复条件的事件 trace 仍允许。普通 source 和
|
||||
`yarn test:browser` 诊断继续可用,caller 环境不被修改。
|
||||
|
||||
## 验证
|
||||
|
||||
固定 Node24.21.0、YarnClassic1.22.22,Windows。
|
||||
|
||||
| 验证 | 实际结果 |
|
||||
| --- | --- |
|
||||
| 修改前环境回归 | 17项:6 pass / 11 fail |
|
||||
| 修改后最终入口回归 | 18 pass,含明确停用值、source保持、真实配置子进程、子进程退出0/17 |
|
||||
| `yarn test:ci` | 77 pass,CI矩阵/汇总/影响/Pages/消费者原规则保留 |
|
||||
| docs-tools严格类型、scoped lint | 通过;初次lint的对象换行已修正 |
|
||||
| `yarn test:package --browser` | 20包重新构建、pack、隔离安装及离线frozen复装成功,133.89秒 |
|
||||
| 安装消费者 | core/chapter 的36项运行时、5旧类型模式、8精确类型模式通过;不是20包全部类型验收 |
|
||||
| 正常 installed Chromium JASSUB生命周期 | 4 pass / 0 skip / 0 retry;真实视频替换、两种on-demand、重复销毁、无效Worker URL、CSP失败清理 |
|
||||
|
||||
原20包 map `run-yqnfgx` 因 DASH 源码已更新被新鲜度检查拒绝;没有绕过检查
|
||||
或只替换哈希,重新执行正常打包生成 `run-uRbTbe`。新包的浏览器选择、源文件
|
||||
和归档摘要由原有 verifier 校验,成功用例使用安装后的候选,而不是回退源码。
|
||||
消费者隔离安装按既有脚本使用 offline/ignore-scripts;本轮没有重新安装根
|
||||
工作区依赖。没有把安装成功当作历史 WebKit/JASSUB 渲染问题已解决。
|
||||
|
||||
脚本维护文档、浏览器说明及CI说明同步更新。机器证据保留前后测试日志、精确
|
||||
安装map、运行结果、源输入和归档指纹,见
|
||||
[ci-rendering-policy-validation.json](../baselines/ci-rendering-policy-validation.json)。
|
||||
提交前计划、风险、风险测试、严格工具链及diff检查通过。
|
||||
|
||||
本地已复现并修复的入口缺口登记为 CI-BROWSER-MODE-01;它的关闭范围只包含
|
||||
以上既有规则和明确列出的十个替换开关,不宣称自动发现将来新增的所有诊断参数。
|
||||
后续添加能改变断言、fixture、SDK或执行范围的环境开关时,需同时更新共用策略
|
||||
和对应负例。更多平台、远端CI/取消/缓存验证和完整插件验收仍按原任务执行。
|
||||
回退本提交仅恢复旧验收环境策略,不影响 npm 消费者的运行行为。
|
||||
@@ -198,3 +198,10 @@ build:ts 生成声明 URL 清单后重建站点浏览器产物,check:editor-ty
|
||||
消费者拆分,见[拆分记录](changes/2026-09-15-CI-01-browser-matrix.md)。60 分钟预算
|
||||
尚未经过完整远端验证;保留完整用例和失败报告,后续依据各组合实测数据决定是否
|
||||
还需按文件分片。不能从本地子集通过推断整个工作流可在预算内完成。
|
||||
|
||||
安装范围的环境策略现由入口和 Playwright installed 配置共同校验。JASSUB 的
|
||||
渲染/截图/队列替换及 Multiple Subtitles 的原生事件恢复对照不能继承进入标准
|
||||
安装验收;MediaBunny/Iframe/Mask/DASH 既有规则也不能通过直接载入配置绕开。
|
||||
普通 source/ad hoc 诊断保持可用,明确停用的环境值不被误拒绝。详见
|
||||
[CI-01 环境策略记录](changes/2026-09-15-CI-01-rendering-policy.md)。这只是本地
|
||||
测试入口修复,不代表原有浏览器失败、远端工作流或发布门槛已关闭。
|
||||
+1
-1
@@ -524,7 +524,7 @@
|
||||
- ENG-09: [记录](changes/2026-09-12-ENG-09-integration.md) [记录](baselines/engineering-integration.json)
|
||||
- ENG-10: [记录](changes/2026-09-10-ENG-10-test-reliability.md) [记录](test-reliability.md)
|
||||
- ENG-11: [记录](build-analysis.md) [记录](baselines/bundle-attribution.json) [记录](changes/2026-09-11-ENG-11-build-analysis.md)
|
||||
- CI-01: [记录](ci-setup.md) [记录](changes/2026-09-13-CI-01-matrix-summary.md) [记录](baselines/ci-matrix-validation.json) [记录](changes/2026-09-13-CI-01-node-consumers.md) [记录](baselines/node-consumer-validation.json) [记录](changes/2026-09-14-CI-01-installed-full.md) [记录](baselines/ci-installed-full-validation.json) [记录](changes/2026-09-14-CI-01-source-chromium.md) [记录](baselines/ci-source-chromium-validation.json) [记录](changes/2026-09-15-CI-01-ads-installed.md) [记录](baselines/ci-ads-installed-validation.json) [记录](changes/2026-09-15-CI-01-subtitles-installed.md) [记录](baselines/ci-subtitles-installed-validation.json) [记录](changes/2026-09-15-CI-01-adaptive-installed.md) [记录](baselines/ci-adaptive-installed-validation.json) [记录](changes/2026-09-15-CI-01-asr-cast-installed.md) [记录](baselines/ci-asr-cast-installed-validation.json) [记录](changes/2026-09-15-CI-01-mediabunny-installed.md) [记录](baselines/ci-mediabunny-installed-validation.json) [记录](changes/2026-09-15-CI-01-jassub-installed.md) [记录](baselines/ci-jassub-installed-validation.json) [记录](changes/2026-09-15-CI-01-danmuku-installed.md) [记录](baselines/ci-danmuku-installed-validation.json) [记录](changes/2026-09-15-CI-01-browser-matrix.md) [记录](baselines/ci-browser-matrix-validation.json) [记录](changes/2026-09-15-CI-01-iframe-installed.md) [记录](baselines/ci-iframe-installed-validation.json) [记录](changes/2026-09-15-CI-01-vast-installed.md) [记录](baselines/ci-vast-installed-validation.json)
|
||||
- CI-01: [记录](ci-setup.md) [记录](changes/2026-09-13-CI-01-matrix-summary.md) [记录](baselines/ci-matrix-validation.json) [记录](changes/2026-09-13-CI-01-node-consumers.md) [记录](baselines/node-consumer-validation.json) [记录](changes/2026-09-14-CI-01-installed-full.md) [记录](baselines/ci-installed-full-validation.json) [记录](changes/2026-09-14-CI-01-source-chromium.md) [记录](baselines/ci-source-chromium-validation.json) [记录](changes/2026-09-15-CI-01-ads-installed.md) [记录](baselines/ci-ads-installed-validation.json) [记录](changes/2026-09-15-CI-01-subtitles-installed.md) [记录](baselines/ci-subtitles-installed-validation.json) [记录](changes/2026-09-15-CI-01-adaptive-installed.md) [记录](baselines/ci-adaptive-installed-validation.json) [记录](changes/2026-09-15-CI-01-asr-cast-installed.md) [记录](baselines/ci-asr-cast-installed-validation.json) [记录](changes/2026-09-15-CI-01-mediabunny-installed.md) [记录](baselines/ci-mediabunny-installed-validation.json) [记录](changes/2026-09-15-CI-01-jassub-installed.md) [记录](baselines/ci-jassub-installed-validation.json) [记录](changes/2026-09-15-CI-01-danmuku-installed.md) [记录](baselines/ci-danmuku-installed-validation.json) [记录](changes/2026-09-15-CI-01-browser-matrix.md) [记录](baselines/ci-browser-matrix-validation.json) [记录](changes/2026-09-15-CI-01-iframe-installed.md) [记录](baselines/ci-iframe-installed-validation.json) [记录](changes/2026-09-15-CI-01-vast-installed.md) [记录](baselines/ci-vast-installed-validation.json) [记录](changes/2026-09-15-CI-01-rendering-policy.md) [记录](baselines/ci-rendering-policy-validation.json)
|
||||
- CI-02: [记录](changes/2026-09-14-CI-02-pages-artifact.md) [记录](baselines/pages-artifact-validation.json) [记录](pages-deployment.md)
|
||||
- PILOT-01: [记录](changes/2026-09-10-PILOT-01-chapter.md) [记录](baselines/pilot-validation.json)
|
||||
- CORE-01: [记录](changes/2026-09-10-CORE-01-typed-utils.md) [记录](baselines/core-utils-validation.json)
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# 进度与证据
|
||||
|
||||
## CI-01 安装验收环境策略修复
|
||||
|
||||
原入口允许十个渲染/恢复诊断替换,直接installed配置还绕开部分既有策略。
|
||||
现由共用校验保护入口和配置;原11项回归失败,最终18项入口测试与77项CI
|
||||
工程测试通过,明确停用值和普通诊断命令保持可用。
|
||||
|
||||
旧安装map因DASH源码过期被拒绝,正常重新构建/pack/安装20包;Chromium
|
||||
真实安装JASSUB生命周期4项通过。消费者仍仅验证core/chapter的36运行时、
|
||||
5旧类型与8精确类型模式,不能扩大成全包验收。见[记录](changes/2026-09-15-CI-01-rendering-policy.md)和[证据](baselines/ci-rendering-policy-validation.json)。
|
||||
|
||||
CI-BROWSER-MODE-01在明确列出的入口/开关范围内关闭,CI-01仍进行中,
|
||||
任务计数不变。没有生产API、版本或依赖修改,无推送或远端运行。
|
||||
|
||||
|
||||
## PKG-JASSUB-09 原生调用阻塞证据
|
||||
|
||||
单个未确认绘制任务仍复现Firefox停顿;精确计时显示createImageBitmap约10秒后
|
||||
|
||||
@@ -285,3 +285,4 @@
|
||||
| DASH-CLEANUP-01 | resolved / 已复现 | DASH 菜单和 SDK 清理吞掉 falsy 异常或丢失首个错误 | PKG-DASH-CLEANUP-01, PKG-DASH-05 |
|
||||
| HLS-EXAMPLE-01 | resolved / 已复现 | HLS示例换源累积销毁监听器且原生回退仍安装SDK控制插件 | SITE-HLS-01, EX-03 |
|
||||
| DASH-EXAMPLE-01 | resolved / 已复现 | DASH示例重复销毁SDK、无MSE仍注册插件且空语言回调抛错 | SITE-DASH-01, EX-03 |
|
||||
| CI-BROWSER-MODE-01 | resolved / 已复现 | Installed browser validation can inherit rendering substitutions and direct config loading bypasses launcher diagnostic policy | CI-01 |
|
||||
@@ -6712,6 +6712,27 @@
|
||||
"refactor/baselines/dash-docs-validation.json"
|
||||
],
|
||||
"resolutionRationale": "Tests execute the actual example and both guides enforce byte-equivalent code. Replaced and final SDKs each receive one destroy call, unsupported setup creates no SDK or plugin, nullable language formatting retains existing language labels and numeric ID zero. This closes the example defects only; complete package/device/DRM acceptance remains separate."
|
||||
},
|
||||
{
|
||||
"id": "CI-BROWSER-MODE-01",
|
||||
"title": "Installed browser validation can inherit rendering substitutions and direct config loading bypasses launcher diagnostic policy",
|
||||
"confirmation": "reproduced",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"CI-01"
|
||||
],
|
||||
"evidence": [
|
||||
"refactor/changes/2026-09-15-CI-01-rendering-policy.md",
|
||||
"refactor/baselines/ci-rendering-policy-validation.json",
|
||||
"test/browser-validation.test.js"
|
||||
],
|
||||
"compatibleResolution": "Share environment validation between launcher and installed config; reject active JASSUB fixture modes and subtitle restoration replacement while retaining explicit ad hoc/source diagnostics and inactive values.",
|
||||
"closureCriteria": "Old/new negative cases reject substitutions before artifact access through both entries, while standard installed tests execute verified actual tarballs and source diagnostics remain usable.",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-15-CI-01-rendering-policy.md",
|
||||
"refactor/baselines/ci-rendering-policy-validation.json"
|
||||
],
|
||||
"resolutionRationale": "Eleven new regression failures against the old implementation become passing; final eighteen entry tests and seventy-seven CI tests pass. Fresh twenty-package preparation and four actual installed Chromium lifecycle cases verify the normal path. Scope excludes future unreviewed flags and full CI acceptance."
|
||||
}
|
||||
]
|
||||
}
|
||||
+3
-1
@@ -782,7 +782,9 @@
|
||||
"changes/2026-09-15-CI-01-iframe-installed.md",
|
||||
"baselines/ci-iframe-installed-validation.json",
|
||||
"changes/2026-09-15-CI-01-vast-installed.md",
|
||||
"baselines/ci-vast-installed-validation.json"
|
||||
"baselines/ci-vast-installed-validation.json",
|
||||
"changes/2026-09-15-CI-01-rendering-policy.md",
|
||||
"baselines/ci-rendering-policy-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -58,6 +58,21 @@ local reports before rerunning the same scope. Invocation JSON records arguments
|
||||
and artifact identity; result JSON records the child's actual exit. Preflight
|
||||
errors occur before starting Playwright and remain in the terminal/CI tee log.
|
||||
Listing tests with `--list` is collection evidence only, not playback validation.
|
||||
`verifyInstalledBrowserEnvironment()` in `scope.ts` runs in both the launcher
|
||||
and the installed Playwright config, before reading installed artifacts. Direct
|
||||
config loading therefore cannot bypass the launcher's existing MediaBunny,
|
||||
Iframe, Mask or DASH execution-policy checks. Both paths also reject active
|
||||
JASSUB fixture substitutions (custom canvas, on-demand/offscreen/async selection,
|
||||
rAF/screenshot observation, bitmap/idle/single-flight controls) and Multiple
|
||||
Subtitles' native-event restoration control. Explicit inactive values remain
|
||||
valid; source tracing that does not replace the restoration condition remains
|
||||
available. This protects the standard test contract, not the player's public
|
||||
runtime configuration. The existing native JASSUB test keeps its explicit
|
||||
main-thread setting, and hybrid still selects actual browser capability.
|
||||
For deliberate alternate scheduling/rendering, use `yarn test:browser` with
|
||||
explicit input selection or the source launcher; do not label that run as the
|
||||
standard installed scope. No environment variable is silently cleared to turn a
|
||||
diagnostic run into an apparent normal result.
|
||||
The complete five-package installed main subset was run on Windows with two
|
||||
workers: 255 successful cases across 11 files and three engines, including six
|
||||
unsupported WebKit Document PiP capability records. See
|
||||
|
||||
@@ -90,16 +90,34 @@ export function browserInvocation(scope: string, args: string[], environment: No
|
||||
delete env.ARTPLAYER_BROWSER_ARTIFACTS
|
||||
}
|
||||
else {
|
||||
assert(env.ARTPLAYER_BROWSER_ARTIFACTS, 'Installed browser checks require ARTPLAYER_BROWSER_ARTIFACTS')
|
||||
assert(env.ARTPLAYER_MB_BROWSER_CANDIDATE !== '1', 'Installed browser checks must retain MediaBunny historical controls')
|
||||
assert(env.ARTPLAYER_MASK_PROFILE !== '1', 'Installed browser checks cannot enable Mask CPU profiling')
|
||||
assert(!['ARTPLAYER_IFRAME_BASELINE', 'ARTPLAYER_IFRAME_LIFECYCLE_ONLY', 'ARTPLAYER_IFRAME_BOUNDARIES_ONLY'].some(name => env[name] === '1'), 'Installed browser checks must retain Iframe candidate and historical controls')
|
||||
assert(!env.ARTPLAYER_DASH_DIAGNOSTIC_SDK || env.ARTPLAYER_DASH_DIAGNOSTIC_SDK === 'none', 'Installed browser checks require the unchanged DASH SDK')
|
||||
assert(!['ARTPLAYER_DASH_DIAGNOSE_STALL', 'ARTPLAYER_DASH_DIAGNOSE_GETTER', 'ARTPLAYER_DASH_DIAGNOSE_METRICS'].some(name => env[name] === '1'), 'Installed browser checks cannot use DASH recovery diagnostics')
|
||||
verifyInstalledBrowserEnvironment(env)
|
||||
}
|
||||
return { scope, env, args: ['test', `--config=playwright.${scope}.config.js`, ...args], directory: `refactor/.cache/browser-${scope}` }
|
||||
}
|
||||
|
||||
export function verifyInstalledBrowserEnvironment(env: NodeJS.ProcessEnv) {
|
||||
assert(env.ARTPLAYER_BROWSER_ARTIFACTS, 'Installed browser checks require ARTPLAYER_BROWSER_ARTIFACTS')
|
||||
assert(env.ARTPLAYER_MB_BROWSER_CANDIDATE !== '1', 'Installed browser checks must retain MediaBunny historical controls')
|
||||
assert(env.ARTPLAYER_MASK_PROFILE !== '1', 'Installed browser checks cannot enable Mask CPU profiling')
|
||||
assert(!['ARTPLAYER_IFRAME_BASELINE', 'ARTPLAYER_IFRAME_LIFECYCLE_ONLY', 'ARTPLAYER_IFRAME_BOUNDARIES_ONLY'].some(name => env[name] === '1'), 'Installed browser checks must retain Iframe candidate and historical controls')
|
||||
assert(!env.ARTPLAYER_DASH_DIAGNOSTIC_SDK || env.ARTPLAYER_DASH_DIAGNOSTIC_SDK === 'none', 'Installed browser checks require the unchanged DASH SDK')
|
||||
assert(!['ARTPLAYER_DASH_DIAGNOSE_STALL', 'ARTPLAYER_DASH_DIAGNOSE_GETTER', 'ARTPLAYER_DASH_DIAGNOSE_METRICS'].some(name => env[name] === '1'), 'Installed browser checks cannot use DASH recovery diagnostics')
|
||||
for (const [name, active] of [
|
||||
['ARTPLAYER_JASSUB_CUSTOM_CANVAS', 'true'],
|
||||
['ARTPLAYER_JASSUB_ON_DEMAND', 'false'],
|
||||
['ARTPLAYER_JASSUB_OFFSCREEN', 'default'],
|
||||
['ARTPLAYER_JASSUB_READBACK_FRAME', 'true'],
|
||||
['ARTPLAYER_JASSUB_ASYNC_RENDER', 'false'],
|
||||
['ARTPLAYER_JASSUB_SCREENSHOT', 'true'],
|
||||
['ARTPLAYER_JASSUB_CONTROL_BITMAP', 'true'],
|
||||
['ARTPLAYER_JASSUB_CONTROL_IDLE_READBACK', 'true'],
|
||||
['ARTPLAYER_JASSUB_CONTROL_SINGLE_FLIGHT', 'true'],
|
||||
['ARTPLAYER_SOURCE_RESTORE_EVENT', '1'],
|
||||
] as const) {
|
||||
assert(env[name] !== active, `Installed browser checks cannot use ${name}=${active}; use an explicit diagnostic browser run`)
|
||||
}
|
||||
}
|
||||
|
||||
export function browserScopeConfig(scope: BrowserScope): PlaywrightTestConfig {
|
||||
const directory = `refactor/.cache/browser-${scope}`
|
||||
return {
|
||||
|
||||
@@ -70,6 +70,67 @@ test('Installed validation rejects diagnostic SDK substitutions and recovery pro
|
||||
assert.equal(browserInvocation('installed', [], { ...base, ARTPLAYER_DASH_DIAGNOSTIC_SDK: 'none' }).env.ARTPLAYER_DASH_DIAGNOSTIC_SDK, 'none')
|
||||
})
|
||||
|
||||
const renderingDiagnostics = [
|
||||
['ARTPLAYER_JASSUB_CUSTOM_CANVAS', 'true'],
|
||||
['ARTPLAYER_JASSUB_ON_DEMAND', 'false'],
|
||||
['ARTPLAYER_JASSUB_OFFSCREEN', 'default'],
|
||||
['ARTPLAYER_JASSUB_READBACK_FRAME', 'true'],
|
||||
['ARTPLAYER_JASSUB_ASYNC_RENDER', 'false'],
|
||||
['ARTPLAYER_JASSUB_SCREENSHOT', 'true'],
|
||||
['ARTPLAYER_JASSUB_CONTROL_BITMAP', 'true'],
|
||||
['ARTPLAYER_JASSUB_CONTROL_IDLE_READBACK', 'true'],
|
||||
['ARTPLAYER_JASSUB_CONTROL_SINGLE_FLIGHT', 'true'],
|
||||
['ARTPLAYER_SOURCE_RESTORE_EVENT', '1'],
|
||||
]
|
||||
|
||||
for (const [name, value] of renderingDiagnostics) {
|
||||
test(`Installed validation rejects inherited rendering substitutions: ${name}`, () => {
|
||||
const env = { ARTPLAYER_BROWSER_ARTIFACTS: '/installed/map.json', [name]: value }
|
||||
assert.throws(() => browserInvocation('installed', [], env), error => error.message.includes(name))
|
||||
assert.equal(browserInvocation('source', [], env).env[name], value)
|
||||
assert.equal(env[name], value)
|
||||
})
|
||||
}
|
||||
|
||||
test('Installed rendering checks preserve explicit inactive switches and source tracing', () => {
|
||||
const env = {
|
||||
ARTPLAYER_BROWSER_ARTIFACTS: '/installed/map.json',
|
||||
ARTPLAYER_JASSUB_CUSTOM_CANVAS: 'false',
|
||||
ARTPLAYER_JASSUB_ON_DEMAND: 'true',
|
||||
ARTPLAYER_JASSUB_OFFSCREEN: 'false',
|
||||
ARTPLAYER_JASSUB_READBACK_FRAME: 'false',
|
||||
ARTPLAYER_JASSUB_ASYNC_RENDER: 'true',
|
||||
ARTPLAYER_JASSUB_SCREENSHOT: 'false',
|
||||
ARTPLAYER_JASSUB_CONTROL_BITMAP: 'false',
|
||||
ARTPLAYER_JASSUB_CONTROL_IDLE_READBACK: 'false',
|
||||
ARTPLAYER_JASSUB_CONTROL_SINGLE_FLIGHT: 'false',
|
||||
ARTPLAYER_SOURCE_RESTORE_EVENT: '0',
|
||||
ARTPLAYER_SOURCE_SEEK_TRACE: 'events',
|
||||
}
|
||||
assert.deepEqual(browserInvocation('installed', [], env).env, { ...env, ARTPLAYER_BROWSER_SCOPE: 'installed' })
|
||||
})
|
||||
|
||||
test('Direct installed configuration rejects diagnostics before checking artifact files', () => {
|
||||
const missing = path.resolve('refactor/.cache/absent-diagnostic-artifact-map.json')
|
||||
assert(!fs.existsSync(missing))
|
||||
for (const [name, value] of [
|
||||
['ARTPLAYER_JASSUB_SCREENSHOT', 'true'],
|
||||
['ARTPLAYER_SOURCE_RESTORE_EVENT', '1'],
|
||||
['ARTPLAYER_DASH_DIAGNOSTIC_SDK', 'upstream4'],
|
||||
['ARTPLAYER_MB_BROWSER_CANDIDATE', '1'],
|
||||
]) {
|
||||
const run = spawnSync(process.execPath, ['--input-type=module', '-e', 'await import("./playwright.installed.config.js")'], {
|
||||
encoding: 'utf8',
|
||||
windowsHide: true,
|
||||
timeout: 10000,
|
||||
env: { ...process.env, ARTPLAYER_BROWSER_ARTIFACTS: missing, [name]: value },
|
||||
})
|
||||
assert.equal(run.status, 1, run.stderr)
|
||||
assert(!run.stderr.includes('ENOENT'), run.stderr)
|
||||
assert.match(run.stderr, /Installed|unchanged|historical/)
|
||||
}
|
||||
})
|
||||
|
||||
for (const code of [0, 17]) {
|
||||
test(`Browser runner preserves actual child exit ${code} and source input identity`, () => {
|
||||
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'artplayer-browser-runner-'))
|
||||
|
||||
@@ -396,6 +396,10 @@ host has exhibited a roughly ten-second stall despite a green eventual-pixel
|
||||
result; a single outstanding task does not eliminate the Firefox issue. These
|
||||
timings identify API boundaries, not a native stack or the underlying cause.
|
||||
See [the native-call record](../../refactor/changes/2026-09-15-PKG-JASSUB-09-native-call.md).
|
||||
These JASSUB rendering/scheduling switches are deliberately rejected by the
|
||||
standard installed-scope launcher and config. Use the ad hoc browser command
|
||||
shown in the diagnostic records, with an explicitly selected input, to retain
|
||||
the distinction between controlled experiments and unchanged installed tests.
|
||||
|
||||
`ARTPLAYER_JASSUB_SCREENSHOT=true` adds a separate observation path to the native
|
||||
JASSUB spec. `jassub-display.js` decodes a clipped composited page PNG using the
|
||||
|
||||
Reference in new issue
Block a user