mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
test(auto-thumbnail): [PKG-AUTO-THUMB-02] reproduce extraction and lifecycle failures
This commit is contained in:
1 parent
cdc252b158
commit
9cd6659ab4
11 files changed
+2441
-14
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,78 @@
|
||||
# Auto-thumbnail 失败与原生对照
|
||||
|
||||
`PKG-AUTO-THUMB-02` 补64项旧行为回归,八份固定夹具各执行八类问题。
|
||||
配合01的38项正常/分发契约,成功、失败、切源和销毁有可重跑对照。
|
||||
这里测试通过意味着 **成功复现旧缺陷**,不是候选已经修复。
|
||||
生产源码和包版本本步仍未变化,下一步03负责模块和生命周期修复。
|
||||
|
||||
## 受控故障
|
||||
|
||||
| 情况 | 实际旧行为 | 03应建立的候选断言 |
|
||||
| --- | --- | --- |
|
||||
| destroy期间等待Blob | 迟到回调继续写thumbnails,最终URL存活,decoder src/handlers未清 | 取消后不写UI、不创建URL;清理decoder/监听器/本任务URL |
|
||||
| 切源后旧metadata迟到 | 旧width/旧源覆盖新结果,两个任务URL同时留存 | 代际检查覆盖metadata/seek/Blob,只有当前任务可发布 |
|
||||
| 重复metadata | 创建三个独立decoder和三个未释放URL | 新任务替换旧任务,并明确保留预览与释放的时机 |
|
||||
| 编码回调逆序到达 | 完整→空白→半成品倒退,每次撤销前一可用URL | 串行或按代际/序号提交可用帧,不能倒退 |
|
||||
| toBlob返回null | 先撤销可用URL,再抛错;核心配置仍指向已失效URL | 验证Blob后才替换;失败有归属并释放临时资源 |
|
||||
| drawImage/toBlob同步抛错 | 异常逃逸,decoder和回调未清 | 出错后停止任务,继续清理,即使个别清理动作再抛错 |
|
||||
| getContext为null/原生media error | 前者稍后在drawImage抛错,后者没有处理者 | 失败不能静默挂起,不能冒充可用输出 |
|
||||
| 核心thumbnails setter抛错 | 新URL泄漏,后续帧继续工作 | 保留错误身份、收回新URL、停止失效任务及迟到副作用 |
|
||||
|
||||
这些测试控制的是事件/编码回调,媒体对象不是原生解码器。无效数值、重入、跨实例、
|
||||
监听器安装/清理失败还需03的候选测试补齐,不能从上述八类推断穷尽覆盖。
|
||||
01中的旧高度参数、异步注册、CJS形状与类型推导问题保持独立处理。
|
||||
|
||||
## 三浏览器真实证据
|
||||
|
||||
最终9项原生测试覆盖1.0.1 main、1.1.0 main和冻结工作区main,分别运行
|
||||
Chromium153.0.8010.12、Firefox155.0、Windows WebKit26.6,均无重试/跳过。
|
||||
使用真实HTTP `/test/pattern.mp4`、原生seek、canvas.toBlob JPEG编码、BlobURL及img.decode
|
||||
读取像素。仅 **延迟交付原生编码结果** 来确定性验证竞争,没有替换视频帧或Blob内容。
|
||||
核心一侧是最小宿主替身,故这不是05的新旧核心联调、8082示例或真实Safari验收。
|
||||
|
||||
每项原生证据都记录:0/2/4/6秒附近四次seek,五份编码(第一份空白),最终拼图
|
||||
800×45,四个已填格子的采样点,完整/空白两份回调的交付顺序,destroy前后更新及
|
||||
URL存活状态。最终URL在destroy后仍存活,迟到空白回调仍写入并撤销前一份URL。
|
||||
测试结束由测试方清理decoder和URL,明确不是旧插件完成了清理。
|
||||
|
||||
### WebKit黑色采样没有作为能力豁免
|
||||
|
||||
首次运行6项通过、3项WebKit像素断言失败;后续独立loadeddata+两次动画帧对照显示,
|
||||
不播放就draw也可能黑色(包括Chromium对照)。这不足以认定平台不支持。
|
||||
再加入可见、静音的独立video,等待播放前进至少0.25秒后暂停和draw,三个浏览器
|
||||
均得到彩色原始像素及JPEG;红色静态canvas→JPEG也通过。
|
||||
|
||||
WebKit旧插件仍在四个采样点得到黑色JPEG,原生播放对照的原始/编码像素均有颜色。
|
||||
因此登记`AUTO-THUMB-PIXEL-01`为**旧抽帧路径缺陷**,根因仍需03用解码/帧就绪证据细化。
|
||||
没有将它归为不可用或跳过,也没有把“返回了JPEG”当成抽帧成功;不以四个采样点
|
||||
声称整幅图每个像素都是黑色。Firefox/Chromium旧插件的四格均采到彩色像素。
|
||||
|
||||
最终测试严格断言这些旧版差异以及原生阳性对照,不是删除像素断言来通过。
|
||||
三个中间诊断运行(各6通过/3失败)和完整最终9通过报告/附件均独立归档。
|
||||
未来候选须验证可用像素,不能继承历史黑色结果作为成功标准。
|
||||
Windows的黑色历史断言明确限制在win32/WebKit,不将该平台现象硬编码成所有系统的
|
||||
WebKit行为;其他系统接受有正常采样的输出,若仍黑则必须是WebKit并保留同一原生阳性
|
||||
对照。最后这项平台边界调整经过定向lint和整组9项原生重跑;Linux托管CI本步未执行。
|
||||
|
||||
### 03前置实验线索(不是候选验收)
|
||||
|
||||
另用独立本地HTTP/原生video探测DOM挂载、loadeddata、播放、帧回调和seek条件。
|
||||
Windows WebKit26.6的该运行没有requestVideoFrameCallback;脱离DOM的等待/播放
|
||||
仍产生透明原始像素,挂载后追加seek可出现有效像素。display:none仍透明;
|
||||
将video渲染为1×1会把正常蓝色采样变成灰色平均值,**不能以非黑判定内容正确**。
|
||||
visibility:hidden且保留正常尺寸的探测保留了正常采样颜色,可作为03验证方向。
|
||||
首次seek位置还有偏离目标的记录,需要验证精确帧条件,不能直接把实验代码作为实现。
|
||||
原始记录在`.cache/auto-thumbnail-readiness-initial.{mjs,json,log}`和
|
||||
`.cache/auto-thumbnail-readiness-probe.{mjs,json,log}`;实验有明确不支持/超时结果,
|
||||
不计入上面9项验收,也不据此关闭像素风险。
|
||||
|
||||
## 执行与接续
|
||||
|
||||
- `yarn test:auto-thumbnail`:64项旧失败对照+38项冻结契约。
|
||||
- `yarn test:browser test/browser/auto-thumbnail.spec.js`:9项固定历史原生对照。
|
||||
- Node64项纳入`test:unit`;基线38项由`test:baseline`继续执行。
|
||||
- 03按入口注册、任务/源所有权、抽帧/编码、错误清理拆分,并保留有效旧调用;
|
||||
新增的候选回归先在冻结旧版失败,再在源码/构建产物/原生浏览器通过。
|
||||
- 04迁严格TS与声明,05最终核心/真实设备,06实际tarball和完整demo,不合并冒充完成。
|
||||
|
||||
详见[机器验证记录](auto-thumbnail-failures-validation.json)。本步不推送、不发布。
|
||||
@@ -0,0 +1,23 @@
|
||||
# PKG-AUTO-THUMB-02 旧失败回归与原生像素
|
||||
|
||||
在八份冻结夹具上增加64项失败行为对照,覆盖销毁/切源/重复metadata/逆序编码/
|
||||
null Blob/draw与encode异常/缺context与media错误/核心setter异常。
|
||||
保留01正常契约,根脚本新增test:auto-thumbnail并将64项纳入test:unit,无新依赖。
|
||||
|
||||
新增9项三浏览器原生HTTP/video/seek/JPEG/URL/像素测试,手动延迟原生编码结果交付以
|
||||
确定性复现销毁后更新和逆序覆盖。没有将宿主替身包装成核心联调,原生媒体内容未伪造。
|
||||
WebKit首轮像素失败后增加四格采样、独立loadeddata、可见静音播放和静态红色JPEG对照。
|
||||
播放/静态阳性对照均成功,旧抽帧路径四点仍黑,故作为待修缺陷而不是能力豁免。
|
||||
诊断失败运行完整保留,最终历史断言9项通过并不代表候选已修复。
|
||||
|
||||
AUTO-THUMB-LIFE-01和AUTO-THUMB-ENCODE-01从source-observed变为reproduced,
|
||||
新增AUTO-THUMB-PIXEL-01;均保持open。无效输入/重入/跨实例等候选边界继续03补齐。
|
||||
下一步修改生产源码并建立候选成功标准;04保留独立TS/类型工作。
|
||||
|
||||
见[故障表](../baselines/auto-thumbnail-failures.md)及
|
||||
[验证](../baselines/auto-thumbnail-failures-validation.json)。
|
||||
回退此提交只移除本步测试/脚本/记录;生产代码、发布版本、dist均未变。独立本地提交,
|
||||
不推送、不发布。
|
||||
|
||||
最终完整CI1766项(1520单元+14工程+232基线)、339生产TS检查通过;历史原生9项通过,
|
||||
没有重试/跳过/未处理浏览器错误。源码修复是独立03任务,不把历史缺陷复现记为修复完成。
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 222 项,范围 22 个包及工作区/示例。
|
||||
|
||||
状态:todo 98 / doing 11 / blocked 0 / done 113 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
状态:todo 97 / doing 11 / blocked 0 / done 114 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
|
||||
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
| ID | 范围 / 步骤 | 前置依赖 | 交付物 | 验收条件 | 风险 | 状态 |
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| PKG-AUTO-THUMB-01 | artplayer-plugin-auto-thumbnail<br>核对包契约与历史用法 | BASE-05 | url/width/number/scale、异步工厂和渐进缩略图更新 | 源码/声明/README/demo/发布包差异已登记;公开形状和版本范围冻结 | H | done |
|
||||
| PKG-AUTO-THUMB-02 | artplayer-plugin-auto-thumbnail<br>建立特有行为与错误测试 | PKG-AUTO-THUMB-01, ENG-03, ENG-05 | 抽帧边界、短视频、失败、连续来源和销毁中的抽帧 | 旧版本行为可重跑,成功/失败/切源/销毁有必要断言 | H | todo |
|
||||
| PKG-AUTO-THUMB-02 | artplayer-plugin-auto-thumbnail<br>建立特有行为与错误测试 | PKG-AUTO-THUMB-01, ENG-03, ENG-05 | 抽帧边界、短视频、失败、连续来源和销毁中的抽帧 | 旧版本行为可重跑,成功/失败/切源/销毁有必要断言 | H | done |
|
||||
| PKG-AUTO-THUMB-03 | artplayer-plugin-auto-thumbnail<br>整理内部职责与资源 | PKG-AUTO-THUMB-02, CORE-09, CORE-19 | 隐藏 video、seek 队列、canvas 编码与 Blob URL 清理 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | todo |
|
||||
| PKG-AUTO-THUMB-04 | artplayer-plugin-auto-thumbnail<br>迁移自有源码和公开类型 | PKG-AUTO-THUMB-03, ENG-04, ENG-06, CORE-07 | 抽帧结果和真实异步插件返回类型兼容 | 严格类型检查、旧消费样例通过;声明路径/导出和同步异步兼容 | H | todo |
|
||||
| PKG-AUTO-THUMB-05 | artplayer-plugin-auto-thumbnail<br>验证新旧核心和组合 | PKG-AUTO-THUMB-04, CORE-22 | 旧核心/候选核心预览、多次加载无过期缩略图覆盖 | 最终核心与原支持范围核心分别通过;设备/SDK 缺证据不能标完成 | H | todo |
|
||||
@@ -495,6 +495,7 @@
|
||||
- PKG-AUDIO-04: [记录](changes/2026-09-12-PKG-AUDIO-04-types.md) [记录](baselines/audio-types-validation.json)
|
||||
- PKG-AUDIO-05: [记录](changes/2026-09-12-PKG-AUDIO-05-combinations.md) [记录](baselines/audio-combinations-first.json) [记录](baselines/audio-combinations-checkpoint.json) [记录](audio-validation.md)
|
||||
- PKG-AUTO-THUMB-01: [记录](baselines/auto-thumbnail-release.json) [记录](baselines/auto-thumbnail-contract.md) [记录](changes/2026-09-13-PKG-AUTO-THUMB-01-contract.md) [记录](baselines/auto-thumbnail-contract-validation.json)
|
||||
- PKG-AUTO-THUMB-02: [记录](baselines/auto-thumbnail-failures.md) [记录](baselines/auto-thumbnail-failures-validation.json) [记录](changes/2026-09-13-PKG-AUTO-THUMB-02-failures.md)
|
||||
- PKG-HLS-01: [记录](baselines/hls-control-contract.md) [记录](baselines/hls-control-release.json) [记录](changes/2026-09-11-PKG-HLS-01-contract.md)
|
||||
- PKG-HLS-02: [记录](hls-validation.md) [记录](baselines/hls-sdk.json) [记录](baselines/hls-validation.json) [记录](changes/2026-09-11-PKG-HLS-02-tests.md)
|
||||
- PKG-HLS-03: [记录](changes/2026-09-12-PKG-HLS-03-modules.md) [记录](baselines/hls-modules-validation.json) [记录](hls-validation.md)
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
# 进度与证据
|
||||
|
||||
## PKG-AUTO-THUMB-02 完成:失败回归和原生抽帧对照
|
||||
|
||||
64项旧行为测试覆盖8份冻结夹具的销毁/切源/重复metadata/逆序Blob/null Blob/
|
||||
draw与encode异常/缺context和media错误/setter异常。9项三浏览器原生HTTP/video/
|
||||
seek/JPEG/像素对照复现迟到更新;WebKit旧插件四点黑色,而播放及静态JPEG对照有色,
|
||||
登记为待修抽帧路径缺陷,不作为能力豁免。保留3次中间诊断失败报告和最终完整报告。
|
||||
完整CI1766项、339生产TS通过。新增test:auto-thumbnail,Node64项纳入test:unit。
|
||||
问题已复现并记录但源码尚未修复,03负责资源/抽帧重构;独立隐藏渲染实验仅作03线索。
|
||||
见[故障表](baselines/auto-thumbnail-failures.md)和[验证](baselines/auto-thumbnail-failures-validation.json)。
|
||||
222项:114 done、11 doing、97 todo;185风险,新增像素风险与已有相关风险均open。
|
||||
|
||||
|
||||
## PKG-AUTO-THUMB-01 完成:自动缩略图发布与行为基线
|
||||
|
||||
核实全部三个npm版本及16成员,冻结8份工作区输入。明确1.0.0缺main/legacy,
|
||||
|
||||
@@ -186,5 +186,6 @@
|
||||
| AUTO-THUMB-TYPE-01 | open / 已复现 | Published declarations misdescribe async registration and switch height/number option fields across generations | PKG-AUTO-THUMB-04 |
|
||||
| AUTO-THUMB-EXPORT-01 | open / 已复现 | Published 1.0.1 CommonJS default namespace differs from the direct function exported by 1.1.0 | PKG-AUTO-THUMB-04, PKG-AUTO-THUMB-06 |
|
||||
| AUTO-THUMB-DIST-01 | open / 已复现 | Published 1.0.0 archive lacks declared main and legacy runtimes | PKG-AUTO-THUMB-06 |
|
||||
| AUTO-THUMB-LIFE-01 | open / 源码/产物事实 | Extraction tasks, decoder handlers and final object URLs lack source-switch and destroy ownership | PKG-AUTO-THUMB-02, PKG-AUTO-THUMB-03, PKG-AUTO-THUMB-05 |
|
||||
| AUTO-THUMB-ENCODE-01 | open / 源码/产物事实 | Unserialized encodes include blank output and lack media/canvas/input failure handling | PKG-AUTO-THUMB-02, PKG-AUTO-THUMB-03, PKG-AUTO-THUMB-05 |
|
||||
| AUTO-THUMB-LIFE-01 | open / 已复现 | Extraction tasks, decoder handlers and final object URLs lack source-switch and destroy ownership | PKG-AUTO-THUMB-02, PKG-AUTO-THUMB-03, PKG-AUTO-THUMB-05 |
|
||||
| AUTO-THUMB-ENCODE-01 | open / 已复现 | Unserialized encodes include blank output and lack media/canvas/input failure handling | PKG-AUTO-THUMB-02, PKG-AUTO-THUMB-03, PKG-AUTO-THUMB-05 |
|
||||
| AUTO-THUMB-PIXEL-01 | open / 已复现 | Historical auto-thumbnail yields black sampled JPEG cells on Windows WebKit while played native video and static JPEG controls yield color | PKG-AUTO-THUMB-03, PKG-AUTO-THUMB-05 |
|
||||
+31
-6
@@ -4051,7 +4051,7 @@
|
||||
{
|
||||
"id": "AUTO-THUMB-LIFE-01",
|
||||
"title": "Extraction tasks, decoder handlers and final object URLs lack source-switch and destroy ownership",
|
||||
"confirmation": "source-observed",
|
||||
"confirmation": "reproduced",
|
||||
"status": "open",
|
||||
"owners": [
|
||||
"PKG-AUTO-THUMB-02",
|
||||
@@ -4061,15 +4061,19 @@
|
||||
"evidence": [
|
||||
"refactor/baselines/auto-thumbnail-release.json",
|
||||
"refactor/baselines/auto-thumbnail-contract.md",
|
||||
"refactor/scripts/auto-thumbnail-contract.test.mjs"
|
||||
"refactor/scripts/auto-thumbnail-contract.test.mjs",
|
||||
"test/auto-thumbnail.test.js",
|
||||
"refactor/baselines/auto-thumbnail-failures.md",
|
||||
"refactor/baselines/auto-thumbnail-failures-validation.json"
|
||||
],
|
||||
"compatibleResolution": "Cancel obsolete work and release owned resources while retaining live options and progressive usable sheet updates.",
|
||||
"closureCriteria": "Delayed callbacks, repeated metadata, switching, destroy, multiple instances and failure cleanup are reproduced then pass source/artifacts and native browser checks."
|
||||
"closureCriteria": "Delayed callbacks, repeated metadata, switching, destroy, multiple instances and failure cleanup are reproduced then pass source/artifacts and native browser checks.",
|
||||
"workspaceState": "Task02 reproduces old failures with 64 controlled tests and native delayed JPEG callbacks. Candidate fixes, numeric validation, reentrancy and complete cleanup boundaries remain task03; status stays open."
|
||||
},
|
||||
{
|
||||
"id": "AUTO-THUMB-ENCODE-01",
|
||||
"title": "Unserialized encodes include blank output and lack media/canvas/input failure handling",
|
||||
"confirmation": "source-observed",
|
||||
"confirmation": "reproduced",
|
||||
"status": "open",
|
||||
"owners": [
|
||||
"PKG-AUTO-THUMB-02",
|
||||
@@ -4079,10 +4083,31 @@
|
||||
"evidence": [
|
||||
"refactor/baselines/auto-thumbnail-release.json",
|
||||
"refactor/baselines/auto-thumbnail-contract.md",
|
||||
"refactor/scripts/auto-thumbnail-contract.test.mjs"
|
||||
"refactor/scripts/auto-thumbnail-contract.test.mjs",
|
||||
"test/auto-thumbnail.test.js",
|
||||
"refactor/baselines/auto-thumbnail-failures.md",
|
||||
"refactor/baselines/auto-thumbnail-failures-validation.json"
|
||||
],
|
||||
"compatibleResolution": "Preserve JPEG grid/time/scale while bounding jobs, sequencing valid updates and handling null Blob, invalid media and thrown callbacks.",
|
||||
"closureCriteria": "Fault controls and native valid/corrupt media prove no stale sheet replacement, leaked URLs or unhandled async callbacks; capability limitations remain explicit."
|
||||
"closureCriteria": "Fault controls and native valid/corrupt media prove no stale sheet replacement, leaked URLs or unhandled async callbacks; capability limitations remain explicit.",
|
||||
"workspaceState": "Task02 reproduces old failures with 64 controlled tests and native delayed JPEG callbacks. Candidate fixes, numeric validation, reentrancy and complete cleanup boundaries remain task03; status stays open."
|
||||
},
|
||||
{
|
||||
"id": "AUTO-THUMB-PIXEL-01",
|
||||
"title": "Historical auto-thumbnail yields black sampled JPEG cells on Windows WebKit while played native video and static JPEG controls yield color",
|
||||
"confirmation": "reproduced",
|
||||
"status": "open",
|
||||
"owners": [
|
||||
"PKG-AUTO-THUMB-03",
|
||||
"PKG-AUTO-THUMB-05"
|
||||
],
|
||||
"evidence": [
|
||||
"test/browser/auto-thumbnail.spec.js",
|
||||
"refactor/baselines/auto-thumbnail-failures.md",
|
||||
"refactor/baselines/auto-thumbnail-failures-validation.json"
|
||||
],
|
||||
"compatibleResolution": "Establish actual decoded-frame readiness for the existing timeline/grid and preserve silent independent extraction; do not waive colored pixel checks as unsupported media.",
|
||||
"closureCriteria": "Candidate source and artifacts generate usable sampled pixels on native browser controls with lifecycle checks; supported Safari and core combinations remain explicit final gates."
|
||||
}
|
||||
]
|
||||
}
|
||||
+6
-2
@@ -1755,11 +1755,15 @@
|
||||
"ENG-03",
|
||||
"ENG-05"
|
||||
],
|
||||
"status": "todo",
|
||||
"status": "done",
|
||||
"risk": "H",
|
||||
"deliverable": "抽帧边界、短视频、失败、连续来源和销毁中的抽帧",
|
||||
"acceptance": "旧版本行为可重跑,成功/失败/切源/销毁有必要断言",
|
||||
"evidence": []
|
||||
"evidence": [
|
||||
"baselines/auto-thumbnail-failures.md",
|
||||
"baselines/auto-thumbnail-failures-validation.json",
|
||||
"changes/2026-09-13-PKG-AUTO-THUMB-02-failures.md"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "PKG-AUTO-THUMB-03",
|
||||
|
||||
Reference in new issue
Block a user