test(ci): [CI-JASSUB-SOURCE-01] include source in native JASSUB checks

This commit is contained in:
Harvey Zhao committed 2026-09-15 22:14:36 +08:00
1 parent 5862f60b0e
commit 5e0447fc51
12 files changed
+6113 -31

No files matched your search

@@ -145,11 +145,16 @@ failure, stale video frames and incorrect fallback ratechange payloads. They ass
the old failures, not candidate fixes. Candidate lifecycle and polyfill tests separately
verify the local patch. PKG-JASSUB-05 retains complete combination/device acceptance.
`yarn test:browser test/browser/jassub-native.spec.js --workers=1` loads the actual
published wrapper, Worker, WASM and default font with offscreenRender=false.
Without ARTPLAYER_JASSUB_ARTIFACT this remains a historical test: the published wrapper
still fails Windows WebKit when its quality counters stay zero. Set that variable to
the normal candidate build to test the fix. Native RVFC and increasing quality counters
`yarn test:browser test/browser/jassub-native.spec.js --workers=1` loads both the
published wrapper and an in-memory build of current source, with actual Worker,
WASM and default font and offscreenRender=false. Each input runs against three
core versions. Source candidates are named and recorded as source-build even though
they have no artifact file path; direct instance destruction followed by host
destruction applies to every candidate. The published wrapper still fails Windows
WebKit when its quality counters stay zero, and that failure remains observable.
ARTPLAYER_JASSUB_ARTIFACT selects only the explicit build for focused diagnostics;
an installed map retains the published/installed pair and rejects explicit overrides.
Native RVFC and increasing quality counters
retain their existing behavior. Only the polyfill's observed all-zero counters can use
finite changed media time with readyState >= 2 and no active seek; this approximate path
limits each continuous callback chain to 30 Hz and still reports zero presented frames.
@@ -186,8 +191,11 @@ ARTPLAYER_BROWSER_ARTIFACTS to the generated map and run
the published native-render control and adds the installed candidate for all three
core versions. Lifecycle, hybrid and render-failure suites use the verified
installed candidate; without a map they build current source, unless an explicit
artifact is selected. The native-render suite retains its historical default in
source mode. The platform suite has no JASSUB wrapper/WASM and is a control only.
artifact is selected. The native-render suite also includes both published and
source candidates by default. CLI collection regressions in
`test/browser-validation.test.js` protect all three cores, explicit-file selection
and rejection of missing/mixed inputs. The platform suite has no JASSUB
wrapper/WASM and is a control only.
Its optional `ARTPLAYER_JASSUB_CONTROL_SINGLE_FLIGHT=true` bounds the native
Worker queue to one draw while retaining concurrent canvas readback. It measures
the synchronous createImageBitmap call separately from Promise settlement and
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,56 @@
# CI-JASSUB-SOURCE-01 原生 JASSUB 当前源码覆盖
2026-09-15,分支 `codex/compatible-modernization`,基线 `5862f60b0`。
本任务修改浏览器测试选择和工程回归;关联 API-05、API-09 及 CI-01。
## 问题与修改
完整 WebKit 源码回归发现,`jassub-native.spec.js` 默认只加载 npm 1.1.0,
只有安装映射或显式 artifact 才构造候选输入。实际 Playwright CLI 收集负例
复现默认只有三个旧包用例,缺少当前源码与三套核心的组合。
现在统一调用 browserCandidate,默认保留发布包并加入当前源码;安装映射继续
验证发布包与已安装候选,显式单文件环境变量继续只运行所选诊断产物。缺失文件
和安装映射混用显式文件继续失败,不回退。来源以 provenance.kind 判别,不能
用 file 是否为空判别:内存源码构建的 file 为 null,仍是候选。
同样修正源码候选的直接销毁分支。在销毁 ArtPlayer 前,要求核心仍存活、worker
只终止一次、JASSUB 画布归零;随后销毁核心,原有最终清理断言继续执行。
这防止宿主销毁掩盖插件直接销毁失败。未更改字幕像素、seek、布局、资源或错误
断言,没有提高超时、增加重试或跳过旧失败。
生产运行时、公开 JS/TS API、事件时序、DOM/CSS、SDK 字节和分发入口均未更改。
无需新增依赖、锁文件变化或重建生产产物。包内 ARCHITECTURE、浏览器测试说明
和执行器维护说明同步输入语义;测试输入归 browserCandidate,宿主与插件资源
所有权保持既有实现。本任务不承担新的生产模块拆分或公开声明迁移。
## 实际验证
固定 Node 24.21.0 / Yarn 1.22.22 / Windows。完整机器证据、来源 SHA、资源结果、
逐项附件和错误见[验证记录](../baselines/jassub-source-selection-validation.json)。
- 修改前真实 CLI 收集回归退出1:实际三个发布包用例,缺三个源码用例。
- `node --test test/browser-validation.test.js`:20通过、0失败/跳过。
覆盖默认源码、显式文件和缺失/混用拒绝,实际调用 Playwright CLI,未伪造收集器。
- 两个修改的 JS 文件定向 ESLint 通过。
- `yarn test:browser test/browser/jassub-native.spec.js --workers=1 --reporter=json`:
Chromium 153.0.8010.12、Firefox 155.0、Windows WebKit 26.6 共18项,
15通过、3失败、0跳过/重试,71.107秒,退出1。当前源码九项全部通过:实际
WASM/字体资源、字幕绘制、seek/布局和直接销毁后宿主销毁;失败均为发布1.1.0
在WebKit的首次字幕像素为零,保持原断言。候选帧时钟修复见 PKG-JASSUB-07。
- `yarn test:browser:source --list --project=chromium`:174文件/1667项,退出0。
**只收集,没有执行1667项**;列表报告的 skipped 不是运行后的能力跳过。
- 使用已有 `run-5UdGXT/browser-artifacts.json` 收集原生 JASSUB:六项,退出0,
发布与安装候选各三核心。辅助函数仍验证所选运行时指纹,但此处没有重新打包
文档或实际执行安装包播放,不能当作当前最终候选验收。
- 计划、风险生成/检查、风险校验器负例、严格工具链与 Git diff 检查完成后提交。
## 结论与边界
关闭本任务的候选输入覆盖缺口;CI-01、JASSUB 完整组合和设备验证仍未完成。
本次使用默认受测 offscreen=false 的原生 worker/WASM 路径,不代表 hybrid、
offscreen、ESM 或物理设备验收。不把旧包失败改写为通过,也不声称完整矩阵全绿。
完成提交主题:`test(ci): [CI-JASSUB-SOURCE-01] include source in native JASSUB checks`。
回退该独立提交恢复原测试选择;无需消费者迁移或重建运行时。仅本地提交,
没有推送、部署、远端 Actions 运行或 npm 发布。
+8 -6
View File
@@ -2,9 +2,9 @@
> 由 tasks.json 生成。请修改数据后运行 `node refactor/scripts/plan.mjs --write`,不要手改本表。
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 280 项,范围 22 个包及工作区/示例。
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 281 项,范围 22 个包及工作区/示例。
状态:todo 43 / doing 21 / blocked 0 / done 216 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
状态:todo 43 / doing 21 / blocked 0 / done 217 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
@@ -27,7 +27,7 @@
| artplayer-plugin-dash-control | 1.1.0 | PKG-DASH-01, PKG-DASH-02, PKG-DASH-03, PKG-DASH-04, PKG-DASH-SEEK-01, PKG-DASH-MENU-01, PKG-DASH-05, PKG-DASH-06, SITE-DASH-01, PKG-DASH-CLEANUP-01 |
| artplayer-plugin-document-pip | 1.1.0 | PKG-DPIP-01, PKG-DPIP-02, PKG-DPIP-03, PKG-DPIP-04, PKG-DPIP-05, PKG-DPIP-06 |
| artplayer-plugin-hls-control | 1.1.0 | PKG-HLS-01, PKG-HLS-02, PKG-HLS-03, PKG-HLS-04, PKG-HLS-SDK-01, PKG-HLS-05, PKG-HLS-06, SITE-HLS-01, PKG-HLS-PACK-01, CI-TYPES-01 |
| artplayer-plugin-jassub | 1.1.0 | PKG-JASSUB-01, PKG-JASSUB-02, PKG-JASSUB-03, PKG-JASSUB-04, PKG-JASSUB-05, PKG-JASSUB-06, PKG-JASSUB-07, PKG-JASSUB-08, PKG-JASSUB-09, PKG-JASSUB-10 |
| artplayer-plugin-jassub | 1.1.0 | PKG-JASSUB-01, PKG-JASSUB-02, PKG-JASSUB-03, PKG-JASSUB-04, PKG-JASSUB-05, PKG-JASSUB-06, PKG-JASSUB-07, PKG-JASSUB-08, PKG-JASSUB-09, PKG-JASSUB-10, CI-JASSUB-SOURCE-01 |
| artplayer-plugin-multiple-subtitles | 1.2.0 | PKG-MULTI-SUB-01, PKG-MULTI-SUB-02, PKG-MULTI-SUB-03, PKG-MULTI-SUB-04, PKG-MULTI-SUB-07, PKG-MULTI-SUB-08, PKG-MULTI-SUB-05, PKG-MULTI-SUB-06, PKG-MULTI-SUB-09, PKG-MULTI-SUB-10, PKG-MULTI-SUB-11 |
| artplayer-plugin-vast | 1.2.0 | PKG-VAST-01, PKG-VAST-02, PKG-VAST-03, PKG-VAST-04, PKG-VAST-05, PKG-VAST-06, PKG-VAST-07, ENG-LINT-02, SITE-EDITOR-VAST-01 |
| artplayer-plugin-vtt-thumbnail | 1.1.0 | PKG-VTT-THUMB-01, PKG-VTT-THUMB-02, PKG-VTT-THUMB-03, PKG-VTT-THUMB-04, PKG-VTT-THUMB-05, PKG-VTT-THUMB-06, SITE-VTT-01 |
@@ -96,11 +96,12 @@
| CI-01 | workspace<br>增强兼容矩阵、并发缓存与 CI 报告 | DOC-10, ENG-08, ENG-09, ENG-10 | OS/Node/TS/浏览器与影响范围矩阵、缓存、超时、汇总检查和 artifact 报告 | 固定安装、失败/取消不误报、核心影响全生态;检查只读,失败证据可追溯 | H | doing |
| CI-02 | workspace<br>分离并改进 GitHub Pages 部署 | DOC-10, ENG-02, SITE-03 | Pages artifact 部署配置、旧路径/域名核对、预检和迁移恢复指南 | 部署只取受信任已验证产物;本地实现可验收,远端 source/环境和实际部署状态单独登记 | H | done |
| CI-03 | workspace<br>建立 npm 分包候选与发布工作流 | DOC-10, CI-01, REL-08, REL-04, CI-NPM-01 | 候选准备、精确 artifact 发布配置、OIDC 评估、版本/tag/registry 预检和部分失败恢复 | 不自动发布;明确逐包信任前置和 dry run 限制,不能重建未验证内容或重发冲突版本;按版本清单校验各包下一 major 和预发布/正式 tag,保留旧核心支持范围 | H | todo |
| CI-04 | workspace<br>验收 GitHub 流水线与远端发布准入 | CI-01, CI-02, CI-03, SITE-06, CI-BROWSER-01, CI-TYPES-01, CI-TYPES-02, SITE-EDITOR-VAST-01 | 静态/干净环境检查、真实 PR 正反例、候选 dry run、required checks/Pages/npm 必需配置状态及运维指南 | 必要 Actions 证据和远端配置核对齐全;缺失保持未完成,真实 publish/deploy 仍在授权发布步骤执行 | H | todo |
| CI-04 | workspace<br>验收 GitHub 流水线与远端发布准入 | CI-01, CI-02, CI-03, SITE-06, CI-BROWSER-01, CI-TYPES-01, CI-TYPES-02, SITE-EDITOR-VAST-01, CI-JASSUB-SOURCE-01 | 静态/干净环境检查、真实 PR 正反例、候选 dry run、required checks/Pages/npm 必需配置状态及运维指南 | 必要 Actions 证据和远端配置核对齐全;缺失保持未完成,真实 publish/deploy 仍在授权发布步骤执行 | H | todo |
| CI-BROWSER-01 | workspace<br>分离源码与已安装产物浏览器验证范围 | ENG-05, ENG-07 | 完整源码入口、明确已安装包子集、分开的报告目录与失败传播 | 混用输入旧红新绿;源码默认保留所有spec,已安装入口严格校验四包来源;两类报告都保留,源码失败不能误报全绿;不代表完整远端或全包验收 | M | done |
| CI-NPM-01 | workspace<br>从已验收候选准备不可重建的npm交付包 | DOC-10, REL-08, REL-04 | 复用严格准入台账、复制精确tarball、绑定源码/工具链/证据/摘要的本地准备命令及反向测试;供CI-03后续受信任artifact工作流使用 | 缺候选或任一准入缺口即拒绝;不构建、不安装、不联网或发布;阻止路径越界、脏源码、复制期间漂移及半成品冒充完成,声明远端信任/OIDC/registry预检仍未实现 | H | done |
| CI-TYPES-01 | workspace, artplayer-plugin-audio-track, artplayer-plugin-hls-control<br>接入 Audio/HLS 安装后严格类型消费者 | ENG-07, PKG-AUDIO-04, PKG-HLS-04 | 共享隔离编译器模块、真实 tarball 的五模式正反例和声明路径证据 | 旧/新编译器所有正例通过,每条无效调用实际报错;仓库外声明解析、缺声明/any/逃逸负例有效;保留独立运行时和浏览器验收 | M | done |
| CI-TYPES-02 | workspace<br>将全部库包的独立安装类型验证接入CI | CI-TYPES-01, ENG-07 | 21库包完整检查清单、实际构建和隔离安装测试调度、失败证据汇总及必需CI门槛 | 不得漏包或用通用导入替代历史类型契约;准备失败不消费旧产物;记录每包实际结果并传播失败,保留运行时/设备/未决兼容门槛 | M | done |
| CI-JASSUB-SOURCE-01 | workspace, artplayer-plugin-jassub<br>将当前源码纳入 JASSUB 原生字幕默认验证 | CI-BROWSER-01, PKG-JASSUB-07 | 源码与发布包原生字幕配对、来源标识及独立销毁验证,真实 CLI 收集回归和三引擎证据 | 默认各三核心覆盖当前源码和发布包,明确显式诊断与安装映射边界;候选九项真实 WASM 绘制和清理通过;保留旧版失败,不冒充全量或真机验收 | M | done |
## 2.1 早期试点
@@ -255,7 +256,7 @@
| PKG-JASSUB-03 | artplayer-plugin-jassub<br>整理内部职责与资源 | PKG-JASSUB-02, CORE-15, CORE-16 | 仅整理自有 adapter/销毁;保留第三方文件及来源 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | done |
| PKG-JASSUB-04 | artplayer-plugin-jassub<br>迁移自有源码和公开类型 | PKG-JASSUB-03, ENG-04, ENG-06, CORE-07 | JASSUB option/instance 的兼容类型包装,vendor JS 例外记录 | 严格类型检查、旧消费样例通过;声明路径/导出和同步异步兼容 | H | done |
| PKG-JASSUB-05 | artplayer-plugin-jassub<br>验证新旧核心和组合 | PKG-JASSUB-04, CORE-22, PKG-JASSUB-07, PKG-JASSUB-08, PKG-JASSUB-09, PKG-JASSUB-10 | 真实 worker/WASM 字幕渲染与全屏、旧核心测试 | 最终核心与原支持范围核心分别通过;设备/SDK 缺证据不能标完成 | H | todo |
| PKG-JASSUB-06 | artplayer-plugin-jassub<br>验证分发并同步文档 | PKG-JASSUB-05, ENG-07 | jassub.js、外部资源路径、许可和离线失败记录;接续 VENDOR-04/05 完整组件/字体通知、LGPL 源码分发核对及六份未明确字体的分发处置 | tarball 入口/资源、类型、8082 demo 和 README 一致,有回退记录;来源身份已由01冻结,完整通知和未明确字体的发布处理必须闭环,不能以来源相同替代许可结论 | H | todo |
| PKG-JASSUB-06 | artplayer-plugin-jassub<br>验证分发并同步文档 | PKG-JASSUB-05, ENG-07, CI-JASSUB-SOURCE-01 | jassub.js、外部资源路径、许可和离线失败记录;接续 VENDOR-04/05 完整组件/字体通知、LGPL 源码分发核对及六份未明确字体的分发处置 | tarball 入口/资源、类型、8082 demo 和 README 一致,有回退记录;来源身份已由01冻结,完整通知和未明确字体的发布处理必须闭环,不能以来源相同替代许可结论 | H | todo |
| PKG-JASSUB-07 | artplayer-plugin-jassub<br>修复 vendor 生命周期与字幕时钟 | PKG-JASSUB-03, PKG-JASSUB-02 | 独立记录 vendor 适配差异;幂等销毁、跨容器 setVideo、构造回滚、逐帧归属和倍率/能力边界;查询 timeout/Worker error 的缺失数据回调及每请求监听器/定时器清理(JASSUB-QUERY-01) | 保持公开真实 instance、同步方法与资源路径;保留原 vendor 来源指纹并记录每项实际补丁;候选修复正例和真实字幕/失败/时钟验证通过,未证实设备不得冒充通过 | H | done |
| PKG-JASSUB-08 | artplayer-plugin-jassub<br>修复默认 offscreen 初始化消息顺序 | PKG-JASSUB-07 | 在释放排队绘制消息前转移初始画布;独立 vendor 补丁、默认模式原生回归和维护文档 | 保留默认能力选择、Worker/资源和公开同步 API;旧红新绿消息顺序测试及真实默认 offscreen 播放/seek/全屏通过,主线程绘制保持 | H | done |
| PKG-JASSUB-09 | artplayer-plugin-jassub<br>修复 hybrid 迟到绘制与销毁后画布重建 | PKG-JASSUB-08 | 释放旧混合绘制 bitmap,不改变新模式的画布/时钟;销毁后切字幕不重新分配画布;来源补丁、原生排队消息及维护记录 | 旧红新绿验证旧帧不能重建画布/解除新绘制等待;正常 hybrid 绘制保持;真实 Worker/ImageBitmap 交错、主线程及默认模式回归通过,能力缺口明确 | H | doing |
@@ -536,7 +537,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) [记录](changes/2026-09-15-CI-01-rendering-policy.md) [记录](baselines/ci-rendering-policy-validation.json) [记录](changes/2026-09-15-SITE-ROUTES-01-html-inventory.md) [记录](baselines/site-routes-validation.json) [记录](baselines/ci-source-firefox-validation.json) [记录](changes/2026-09-15-SITE-EDITOR-VAST-01-consumer.md) [记录](changes/2026-09-15-CI-01-source-webkit.md) [记录](baselines/ci-source-webkit-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) [记录](changes/2026-09-15-SITE-ROUTES-01-html-inventory.md) [记录](baselines/site-routes-validation.json) [记录](baselines/ci-source-firefox-validation.json) [记录](changes/2026-09-15-SITE-EDITOR-VAST-01-consumer.md) [记录](changes/2026-09-15-CI-01-source-webkit.md) [记录](baselines/ci-source-webkit-validation.json) [记录](changes/2026-09-15-CI-JASSUB-SOURCE-01-native-inputs.md) [记录](baselines/jassub-source-selection-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)
@@ -736,3 +737,4 @@
- CI-TYPES-01: [记录](changes/2026-09-15-CI-TYPES-01-installed-consumers.md) [记录](baselines/installed-plugin-types-validation.json)
- CI-TYPES-02: [记录](changes/2026-09-15-CI-TYPES-02-ecosystem.md) [记录](baselines/ecosystem-types-validation.json)
- SITE-EDITOR-VAST-01: [记录](changes/2026-09-15-SITE-EDITOR-VAST-01-consumer.md) [记录](baselines/editor-vast-consumer-validation.json) [记录](baselines/ci-source-firefox-validation.json) [记录](vast-type-decision.md)
- CI-JASSUB-SOURCE-01: [记录](changes/2026-09-15-CI-JASSUB-SOURCE-01-native-inputs.md) [记录](baselines/jassub-source-selection-validation.json)
+14
View File
@@ -1,5 +1,19 @@
# 进度与证据
## CI-JASSUB-SOURCE-01 原生字幕源码覆盖
修复默认原生 JASSUB 只加载 npm 包的测试缺口;现在发布包和当前源码各覆盖三核心,
来源按 kind 判别,源码也执行插件直接销毁后再销毁宿主。新增真实 CLI 收集正反例,
20项 Node 检查通过。最终三引擎18项:15通过、3个旧版WebKit像素失败、0跳过/重试;
候选9项均通过,并在宿主仍存活时证明worker仅终止一次、画布清零。
完整源码只重新收集:174文件/1667项,并非执行通过;旧安装映射只收集6项,
不计为新包播放验收。见[记录](changes/2026-09-15-CI-JASSUB-SOURCE-01-native-inputs.md)、[证据](baselines/jassub-source-selection-validation.json)。
生产代码、类型、分发与依赖未变,CI-01和JASSUB完整兼容/设备门槛继续开放。
新增任务独立完成后为217 done、21 doing、43 todo,共281。下一步检查其他原生
用例是否存在相同候选输入缺口;不重复无变化的全量运行,不推送或发布。
## CI-01 完整 Windows WebKit 源码回归
固定ae56937d3、Node24.21.0/Yarn1.22.22,174文件/1664项完整运行:
+1
View File
@@ -289,3 +289,4 @@
| AUTO-THUMB-REGISTRATION-01 | resolved / 已复现 | Delayed direct factory installation on a destroyed host retains subscriptions and can restart hidden decoding | PKG-AUTO-THUMB-13 |
| SITE-HTML-INVENTORY-01 | resolved / 已复现 | New documentation HTML is missing from historical demo route coverage, failing the complete local CI check | SITE-ROUTES-01 |
| SITE-EDITOR-VAST-01 | resolved / 已复现 | Monaco browser consumer still assumes the workspace VAST namespace after the approved npm-root restoration | SITE-EDITOR-VAST-01 |
| CI-JASSUB-SOURCE-01 | resolved / 已复现 | Default native JASSUB source runs select only the published plugin and omit the current source | CI-JASSUB-SOURCE-01 |
+21
View File
@@ -6809,6 +6809,27 @@
"test/browser/editor-declarations.spec.js"
],
"resolutionRationale": "The full Firefox collection exposed an obsolete test contract. The corrected consumer passes in Chromium, Firefox and Windows WebKit with five exact negative diagnostics and zero positive/declaration errors; four generator tests still pass. No production declaration or SDK behavior changed."
},
{
"id": "CI-JASSUB-SOURCE-01",
"title": "Default native JASSUB source runs select only the published plugin and omit the current source",
"confirmation": "reproduced",
"status": "resolved",
"owners": [
"CI-JASSUB-SOURCE-01"
],
"evidence": [
"refactor/changes/2026-09-15-CI-JASSUB-SOURCE-01-native-inputs.md",
"refactor/baselines/jassub-source-selection-validation.json",
"test/browser/jassub-native.spec.js",
"test/browser-validation.test.js"
],
"compatibleResolution": "Always build/select the current candidate and pair it with the immutable published control unless an explicit diagnostic artifact was selected. Identify candidates by provenance kind rather than a nullable file.",
"closureCriteria": "Real CLI collection regression, source candidate across three cores and three engines with actual WASM pixels and direct cleanup before host destruction; retain historical failures and installed selection guards.",
"resolutionEvidence": [
"refactor/baselines/jassub-source-selection-validation.json"
],
"resolutionRationale": "Old collection omits three source cases. Twenty Node checks pass after correction; all nine source browser combinations render, seek and clean workers/canvases before host destruction. Three published WebKit failures remain visible; no production contract changed."
}
]
}
+28 -3
View File
@@ -790,7 +790,9 @@
"baselines/ci-source-firefox-validation.json",
"changes/2026-09-15-SITE-EDITOR-VAST-01-consumer.md",
"changes/2026-09-15-CI-01-source-webkit.md",
"baselines/ci-source-webkit-validation.json"
"baselines/ci-source-webkit-validation.json",
"changes/2026-09-15-CI-JASSUB-SOURCE-01-native-inputs.md",
"baselines/jassub-source-selection-validation.json"
]
},
{
@@ -850,7 +852,8 @@
"CI-BROWSER-01",
"CI-TYPES-01",
"CI-TYPES-02",
"SITE-EDITOR-VAST-01"
"SITE-EDITOR-VAST-01",
"CI-JASSUB-SOURCE-01"
],
"status": "todo",
"risk": "H",
@@ -2677,7 +2680,8 @@
],
"dependsOn": [
"PKG-JASSUB-05",
"ENG-07"
"ENG-07",
"CI-JASSUB-SOURCE-01"
],
"status": "todo",
"risk": "H",
@@ -6048,6 +6052,27 @@
"baselines/ci-source-firefox-validation.json",
"vast-type-decision.md"
]
},
{
"id": "CI-JASSUB-SOURCE-01",
"phase": "2.2 GitHub CI/CD",
"title": "将当前源码纳入 JASSUB 原生字幕默认验证",
"scope": [
"workspace",
"artplayer-plugin-jassub"
],
"dependsOn": [
"CI-BROWSER-01",
"PKG-JASSUB-07"
],
"status": "done",
"risk": "M",
"deliverable": "源码与发布包原生字幕配对、来源标识及独立销毁验证,真实 CLI 收集回归和三引擎证据",
"acceptance": "默认各三核心覆盖当前源码和发布包,明确显式诊断与安装映射边界;候选九项真实 WASM 绘制和清理通过;保留旧版失败,不冒充全量或真机验收",
"evidence": [
"changes/2026-09-15-CI-JASSUB-SOURCE-01-native-inputs.md",
"baselines/jassub-source-selection-validation.json"
]
}
]
}
+10 -3
View File
@@ -23,8 +23,10 @@ HLS MSE cases, with per-file reasons in the record. Passed counts also include
controlled hosts, capability boundaries and historical-defect assertions.
Source scope retains explicit historical and committed-artifact cases; its name
does not promise every dependency is rebuilt from current source in every test.
The native JASSUB source default still selects the published artifact; its three
failures cannot be presented as candidate-native failures or candidate acceptance.
At those checkpoints the native JASSUB source default selected only the published
artifact; its three failures are not candidate-native failures or acceptance.
CI-JASSUB-SOURCE-01 subsequently adds current-source candidates on all three cores
while retaining the original published controls and their unaltered assertions.
Full installed, remote Actions and physical-device acceptance remain separate.
`yarn test:browser:installed` requires ARTPLAYER_BROWSER_ARTIFACTS from
@@ -166,7 +168,12 @@ and physical/long-run verification remain separate. See
JASSUB adds its native rendering, lifecycle, hybrid, render-failure and platform
control files. The native-render file retains published inputs and adds installed
candidates; its source-mode historical default stays unchanged. Three other
candidates; its source default now builds and checks current source alongside
published controls. Explicit ARTPLAYER_JASSUB_ARTIFACT selects only that file for
focused diagnostics; missing files and installed overrides fail without fallback.
Candidate identity, test naming and direct-then-host destruction use provenance
kind rather than the existence of a file path. The source collector is protected
by real Playwright --list tests, not a duplicate hard-coded suite roster. Three other
wrapper suites build source unless an installed map or explicit artifact selects
them. Installed worker JS and both WASM files are served at the existing URLs,
with archived-member and frozen-resource hashes verified before serving. The
+40
View File
@@ -8,6 +8,46 @@ import process from 'node:process'
import test from 'node:test'
import { browserInvocation, browserScopeConfig, installedTests } from '../scripts/browser-validation/scope.ts'
function collectNativeJassub(overrides = {}) {
const env = { ...process.env }
for (const name of Object.keys(env)) {
if (name.startsWith('ARTPLAYER_JASSUB_') || name === 'ARTPLAYER_BROWSER_ARTIFACTS' || name.startsWith('PLAYWRIGHT_JSON_OUTPUT'))
delete env[name]
}
return spawnSync(process.execPath, ['node_modules/@playwright/test/cli.js', 'test', '--config=playwright.config.js', 'test/browser/jassub-native.spec.js', '--list', '--reporter=json', '--project=chromium'], {
encoding: 'utf8',
env: { ...env, ...overrides },
windowsHide: true,
timeout: 60000,
maxBuffer: 8 * 1024 * 1024,
})
}
test('Native JASSUB collection includes current source and published controls for every core', () => {
const source = collectNativeJassub()
assert.equal(source.status, 0, source.stderr || source.stdout)
const titles = JSON.parse(source.stdout).suites.flatMap(suite => suite.specs.map(spec => spec.title)).sort()
const cores = ['candidate', 'published', 'published-5.3.1-beta.1']
const expected = ['candidate source-build', 'published 1.1.0'].flatMap(input => cores.map(core => `JASSUB ${input} renders actual WASM subtitles through seek and layout with ${core} core, customCanvas=false, defaultOffscreen=false`)).sort()
assert.deepEqual(titles, expected)
const explicit = collectNativeJassub({ ARTPLAYER_JASSUB_ARTIFACT: path.resolve('packages/artplayer-plugin-jassub/dist/artplayer-plugin-jassub.js') })
assert.equal(explicit.status, 0, explicit.stderr || explicit.stdout)
const selected = JSON.parse(explicit.stdout).suites.flatMap(suite => suite.specs.map(spec => spec.title)).sort()
assert.deepEqual(selected, cores.map(core => `JASSUB candidate artifact renders actual WASM subtitles through seek and layout with ${core} core, customCanvas=false, defaultOffscreen=false`).sort())
})
test('Native JASSUB rejects missing explicit artifacts and mixed installed selection without fallback', () => {
const missing = path.resolve('refactor/.cache/absent-jassub-native-artifact.js')
assert(!fs.existsSync(missing))
const explicit = collectNativeJassub({ ARTPLAYER_JASSUB_ARTIFACT: missing })
assert.equal(explicit.status, 1)
assert.match(explicit.stdout + explicit.stderr, /ENOENT/)
const mixed = collectNativeJassub({ ARTPLAYER_JASSUB_ARTIFACT: missing, ARTPLAYER_BROWSER_ARTIFACTS: '/unused/installed-map.json' })
assert.equal(mixed.status, 1)
assert.match(mixed.stdout + mixed.stderr, /Installed browser checks cannot override artplayer-plugin-jassub artifact/)
})
test('Source invocation clears inherited artifact selection without changing caller environment', () => {
const environment = { ARTPLAYER_BROWSER_ARTIFACTS: '/installed/map.json', KEEP: 'value' }
const source = browserInvocation('source', ['--project=chromium'], environment)
+12 -6
View File
@@ -326,10 +326,14 @@ candidate plugins to the exact main/legacy files being tested.
Frozen-plugin retained DOM, candidate cleanup and unsupported API outcomes remain
distinct; the old plugin's observed loss is not complete-delivery acceptance.
`jassub-native.spec.js` runs actual published JASSUB 1.1.0, its native Worker,
fixed local WASM/font and authored ASS cues with offscreenRender=false. It checks
real canvas pixels before/after seek, CSS web fullscreen and normal destruction.
Windows WebKit currently fails the default frame-clock path; the explicitly
`jassub-native.spec.js` runs both published JASSUB 1.1.0 and current source by
default, each on three cores, with native Worker, fixed local WASM/font and
authored ASS cues with offscreenRender=false. It checks real canvas pixels
before/after seek, CSS web fullscreen and destruction. Source candidates use
direct instance destruction before host cleanup, just like explicit/installed
candidates. Selected-input attachments distinguish source-build from published
and installed artifacts; a missing source file path is not a historical identity.
Windows WebKit currently fails the published default frame-clock path; the explicitly
selected ARTPLAYER_JASSUB_ON_DEMAND=false diagnostic passes on the candidate core.
This is a retained historical failure, not a waived browser gate. The server must
serve WASM as application/wasm for native streaming compilation. Archive failed
@@ -339,8 +343,10 @@ For candidate registration regressions, set ARTPLAYER_JASSUB_ARTIFACT to a built
main/legacy global file. Those runs also destroy the exposed instance before host
cleanup. ARTPLAYER_JASSUB_CUSTOM_CANVAS=true supplies a caller-owned canvas and
asserts it remains connected after destroy(false). The native report records the
artifact hash and both mode choices. This does not change the default published
baseline or establish ESM/offscreen/device acceptance.
artifact hash and both mode choices. An explicit file selects that input alone;
normal source/installed runs retain the historical control alongside the candidate.
The original historical failure is not waived. These checks do not establish
ESM/offscreen/device acceptance.
`jassub-render-failure.spec.js` uses an actual Worker/WASM bitmap and native copies.
It intentionally closes one bitmap to provoke native Canvas InvalidStateError,
+17 -6
View File
@@ -14,8 +14,8 @@ const publishedCode = readMember(archive, member).toString()
if (hash(publishedCode) !== release.files[member])
throw new Error('Published JASSUB artifact changed')
const published = { code: publishedCode, provenance: { kind: 'published', version: release.version, integrity: release.integrity, member, sha256: hash(publishedCode) } }
const candidate = process.env.ARTPLAYER_BROWSER_ARTIFACTS || explicitArtifact ? await browserCandidate('artplayer-plugin-jassub', explicitArtifact) : null
const inputs = process.env.ARTPLAYER_BROWSER_ARTIFACTS ? [published, candidate] : [candidate || published]
const candidate = await browserCandidate('artplayer-plugin-jassub', explicitArtifact)
const inputs = explicitArtifact ? [candidate] : [published, candidate]
const customCanvas = process.env.ARTPLAYER_JASSUB_CUSTOM_CANVAS === 'true'
const onDemandRender = process.env.ARTPLAYER_JASSUB_ON_DEMAND !== 'false'
const defaultOffscreen = process.env.ARTPLAYER_JASSUB_OFFSCREEN === 'default'
@@ -57,9 +57,10 @@ Dialogue: 0,${screenshotReadback ? '0:00:40.00,0:01:50.00' : '0:00:05.00,0:00:30
const testedSubtitles = screenshotReadback ? subtitles.replace('&H00FFFFFF', '&H0000FF00') : subtitles
for (const { code, provenance } of inputs) {
const artifact = provenance.kind !== 'published' ? provenance.file : null
const isCandidate = provenance.kind !== 'published'
const label = isCandidate ? (provenance.kind === 'source-build' ? 'candidate source-build' : 'candidate artifact') : `published ${release.version}`
for (const core of ['candidate', 'published', 'published-5.3.1-beta.1']) {
test(`JASSUB ${artifact ? 'candidate artifact' : `published ${release.version}`} renders actual WASM subtitles through seek and layout with ${core} core, customCanvas=${customCanvas}, defaultOffscreen=${defaultOffscreen}`, async ({ page, context }, testInfo) => {
test(`JASSUB ${label} renders actual WASM subtitles through seek and layout with ${core} core, customCanvas=${customCanvas}, defaultOffscreen=${defaultOffscreen}`, async ({ page, context }, testInfo) => {
await testInfo.attach('jassub-selected-input', { contentType: 'application/json', body: JSON.stringify({ core, provenance }) })
const resources = []
const external = []
@@ -228,8 +229,18 @@ for (const { code, provenance } of inputs) {
await pixels(page, 'restored')
}
await testInfo.attach('actual-jassub-page', { body: await page.screenshot(), contentType: 'image/png' })
if (artifact)
await page.evaluate(() => window.jassub.destroy())
if (isCandidate) {
const directDestroy = await page.evaluate(() => {
window.jassub.destroy()
return {
coreAlive: !window.art.isDestroy && window.Artplayer.instances.includes(window.art),
workers: window.jassubNative.workers.map(worker => worker.terminated),
canvases: document.querySelectorAll('.JASSUB').length,
}
})
await testInfo.attach('jassub-direct-destroy', { body: JSON.stringify(directDestroy), contentType: 'application/json' })
expect(directDestroy).toEqual({ coreAlive: true, workers: [1], canvases: 0 })
}
await page.evaluate(() => window.art.destroy(false))
if (customCanvas)
expect(await page.evaluate(() => window.jassubUserCanvas.isConnected)).toBe(true)