mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-20 12:11:20 -08:00
refactor(mask): [PKG-MASK-03] isolate model runs and release stale work
This commit is contained in:
1 parent
6c989deccd
commit
aba125262a
23 files changed
+1835
-379
No files matched your search
@@ -0,0 +1,187 @@
|
||||
{
|
||||
"task": "PKG-MASK-03",
|
||||
"node": "v24.21.0",
|
||||
"platform": "win32",
|
||||
"scope": "Source controller and output ownership with controlled SDK/RAF/canvas; normal three-format builds. No native inference or GPU cleanup acceptance.",
|
||||
"source": [
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/src/config.js",
|
||||
"sha256": "b055e6a3f5814207cfac452904853813a67b98c63c0c70695c3da133353d8129"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/src/controller.js",
|
||||
"sha256": "b6b546484e0f3ba9ff38da57d7a14f8d522adfff3e85da9d788516e7551b1bed"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/src/index.js",
|
||||
"sha256": "3e518e52fc1ede883d3acca6d5ee66fd6da0d343dfa5803386d23f0bbd72c90f"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/src/output.js",
|
||||
"sha256": "142a29ac269065122323ad10d7103d01eba8e2776cd2bcf40f988332330709e5"
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/src/sdk.js",
|
||||
"sha256": "caa21c19aac14fd8634e2867e6d712f217e7bb47cbb36667947e436dc30b2984"
|
||||
}
|
||||
],
|
||||
"tests": {
|
||||
"command": "yarn test:danmuku-mask",
|
||||
"log": "refactor/.cache/mask03-integrated-final.log",
|
||||
"logSha256": "6800ef6f0988f81ee3ea80fffd1a1401b210b8e2d038c206b7a62995351bbf3d",
|
||||
"passed": 96,
|
||||
"candidate": 36,
|
||||
"frozenDefects": 54,
|
||||
"frozenContract": 6,
|
||||
"failed": 0,
|
||||
"skipped": 0,
|
||||
"cases": [
|
||||
"✔ Danmuku Mask freezes all published stable archive members and their actual Git associations (0.6332ms)",
|
||||
"✔ Both published declarations retain optional options, synchronous registration, async start and void stop (45.5503ms)",
|
||||
"✔ Actual main and legacy exports preserve historical CommonJS and browser global forms without starting a model (270.2566ms)",
|
||||
"✔ Frozen owned source keeps its defaults, ready/destroy hooks and alpha mask pixel boundary without a real SDK (20.0664ms)",
|
||||
"✔ Frozen zero numeric options use historical OR defaults while false smoothSegmentation is retained (2.3961ms)",
|
||||
"✔ SDK-08 distinguishes the frozen Yarn adapter and local resource bytes from unversioned CDN resolution (0.8288ms)",
|
||||
"✔ Historical SDK probes replace exactly five call sites and retain verified input identities (1.6883ms)",
|
||||
"✔ frozen-source: historical stop during initialization is undone by late initialization (5.4237ms)",
|
||||
"✔ frozen-source: historical inference completion after destroy writes a mask and revives RAF (1.6315ms)",
|
||||
"✔ frozen-source: historical repeated start leaves a second RAF chain after stop (1.6516ms)",
|
||||
"✔ published-1.1.0-main: historical stop during initialization is undone by late initialization (29.7697ms)",
|
||||
"✔ published-1.1.0-main: historical inference completion after destroy writes a mask and revives RAF (4.2542ms)",
|
||||
"✔ published-1.1.0-main: historical repeated start leaves a second RAF chain after stop (5.5539ms)",
|
||||
"✔ published-1.1.0-legacy: historical stop during initialization is undone by late initialization (42.0313ms)",
|
||||
"✔ published-1.1.0-legacy: historical inference completion after destroy writes a mask and revives RAF (10.7785ms)",
|
||||
"✔ published-1.1.0-legacy: historical repeated start leaves a second RAF chain after stop (3.312ms)",
|
||||
"✔ published-1.1.0-module: historical stop during initialization is undone by late initialization (29.5567ms)",
|
||||
"✔ published-1.1.0-module: historical inference completion after destroy writes a mask and revives RAF (7.2118ms)",
|
||||
"✔ published-1.1.0-module: historical repeated start leaves a second RAF chain after stop (8.5416ms)",
|
||||
"✔ published-1.0.0-main: historical stop during initialization is undone by late initialization (62.8032ms)",
|
||||
"✔ published-1.0.0-main: historical inference completion after destroy writes a mask and revives RAF (16.2368ms)",
|
||||
"✔ published-1.0.0-main: historical repeated start leaves a second RAF chain after stop (11.9776ms)",
|
||||
"✔ published-1.0.0-legacy: historical stop during initialization is undone by late initialization (60.0044ms)",
|
||||
"✔ published-1.0.0-legacy: historical inference completion after destroy writes a mask and revives RAF (13.9692ms)",
|
||||
"✔ published-1.0.0-legacy: historical repeated start leaves a second RAF chain after stop (12.9393ms)",
|
||||
"✔ published-1.0.0-module: historical stop during initialization is undone by late initialization (62.9506ms)",
|
||||
"✔ published-1.0.0-module: historical inference completion after destroy writes a mask and revives RAF (13.5528ms)",
|
||||
"✔ published-1.0.0-module: historical repeated start leaves a second RAF chain after stop (15.421ms)",
|
||||
"✔ frozen-source: historical stop during initialization does not dispose the late model (1.3067ms)",
|
||||
"✔ frozen-source: historical destroy during initialization does not dispose the late model (1.0049ms)",
|
||||
"✔ frozen-source: historical stop during inference cannot prevent its pending write (0.9691ms)",
|
||||
"✔ frozen-source: historical concurrent starts initialize two models and lose disposal ownership (1.28ms)",
|
||||
"✔ frozen-source: historical inference rejection logs once per frame and keeps retrying (1.7847ms)",
|
||||
"✔ frozen-source: historical fulfilled false WebGL selection does not trigger CPU fallback (1.3902ms)",
|
||||
"✔ frozen-source: historical rejected WebGL selection tries CPU and ignores its fulfilled boolean (2.1617ms)",
|
||||
"✔ frozen-source: historical CPU rejection rejects explicit start before creating a model (1.8598ms)",
|
||||
"✔ frozen-source: historical model initialization rejection resolves start and polls without a model (1.3122ms)",
|
||||
"✔ frozen-source: historical missing danmuku rejects start after allocating the model and makes stop throw (0.9713ms)",
|
||||
"✔ frozen-source: historical unavailable 2D context logs read failures and keeps the frame loop (1.1514ms)",
|
||||
"✔ frozen-source: historical canvas allocation failure rejects start but leaves the initialized model owned (0.8525ms)",
|
||||
"✔ frozen-source: historical canvas read security failure is logged and retried without clearing the previous mask (1.2027ms)",
|
||||
"✔ frozen-source: historical zero RAF id survives stop and retained ready listeners restart after destroy (1.0528ms)",
|
||||
"✔ frozen-source: historical ready-backend unhandled rejection is observed only in a fatal isolated child (2903.2536ms)",
|
||||
"✔ frozen-source: historical missing-video unhandled rejection is observed only in a fatal isolated child (2990.5019ms)",
|
||||
"✔ published-1.1.0-main: historical stop during initialization does not dispose the late model (3.81ms)",
|
||||
"✔ published-1.1.0-main: historical destroy during initialization does not dispose the late model (3.343ms)",
|
||||
"✔ published-1.1.0-main: historical stop during inference cannot prevent its pending write (14.4356ms)",
|
||||
"✔ published-1.1.0-main: historical concurrent starts initialize two models and lose disposal ownership (3.56ms)",
|
||||
"✔ published-1.1.0-main: historical inference rejection logs once per frame and keeps retrying (5.4085ms)",
|
||||
"✔ published-1.1.0-main: historical fulfilled false WebGL selection does not trigger CPU fallback (19.8639ms)",
|
||||
"✔ published-1.1.0-main: historical rejected WebGL selection tries CPU and ignores its fulfilled boolean (7.0089ms)",
|
||||
"✔ published-1.1.0-main: historical CPU rejection rejects explicit start before creating a model (2.6735ms)",
|
||||
"✔ published-1.1.0-main: historical model initialization rejection resolves start and polls without a model (3.21ms)",
|
||||
"✔ published-1.1.0-main: historical missing danmuku rejects start after allocating the model and makes stop throw (3.5393ms)",
|
||||
"✔ published-1.1.0-main: historical unavailable 2D context logs read failures and keeps the frame loop (3.0877ms)",
|
||||
"✔ published-1.1.0-main: historical canvas allocation failure rejects start but leaves the initialized model owned (2.7232ms)",
|
||||
"✔ published-1.1.0-main: historical canvas read security failure is logged and retried without clearing the previous mask (3.4678ms)",
|
||||
"✔ published-1.1.0-main: historical zero RAF id survives stop and retained ready listeners restart after destroy (3.1487ms)",
|
||||
"✔ published-1.1.0-main: historical ready-backend unhandled rejection is observed only in a fatal isolated child (3039.1198ms)",
|
||||
"✔ published-1.1.0-main: historical missing-video unhandled rejection is observed only in a fatal isolated child (2950.6901ms)",
|
||||
"✔ Mask candidate instances sharing SDK and RAF retain independent models, layers and cancellation (6.5051ms)",
|
||||
"✔ Mask candidate retains synchronous registrar, optional options, exact public methods and Promise<void> start (3.5659ms)",
|
||||
"✔ Mask candidate preserves OR defaults, false smooth setting, snapshot and exact SDK interpretation (1.6287ms)",
|
||||
"✔ Mask candidate stop during webgl prevents late output and RAF revival (1.1136ms)",
|
||||
"✔ Mask candidate stop during init prevents late output and RAF revival (0.9582ms)",
|
||||
"✔ Mask candidate stop during segment prevents late output and RAF revival (1.0316ms)",
|
||||
"✔ Mask candidate stop during mask prevents late output and RAF revival (1.185ms)",
|
||||
"✔ Mask candidate stop during draw prevents late output and RAF revival (1.06ms)",
|
||||
"✔ Mask candidate destroy during webgl prevents late output and RAF revival (0.8933ms)",
|
||||
"✔ Mask candidate destroy during init prevents late output and RAF revival (1.1325ms)",
|
||||
"✔ Mask candidate destroy during segment prevents late output and RAF revival (1.3227ms)",
|
||||
"✔ Mask candidate destroy during mask prevents late output and RAF revival (1.9155ms)",
|
||||
"✔ Mask candidate destroy during draw prevents late output and RAF revival (1.4494ms)",
|
||||
"✔ Mask candidate concurrent and repeated starts keep one initialization and one inference chain (1.482ms)",
|
||||
"✔ Mask candidate restart waits for old inference and model disposal without blocking stop settlement (1.1059ms)",
|
||||
"✔ Mask candidate repeated stops cannot bypass a pending disposal when restarting (1.1706ms)",
|
||||
"✔ Mask candidate synchronous SDK reentry does not overlap old and new runs (1.1659ms)",
|
||||
"✔ Mask candidate cancels RAF id zero, detaches exact listeners and ignores start after destroy (1.4668ms)",
|
||||
"✔ Mask candidate no readable dimensions waits without invoking inference (1.3263ms)",
|
||||
"✔ Mask candidate backend false keeps old interpretation while rejection tries CPU (3.3682ms)",
|
||||
"✔ Mask candidate rejects explicit backend failure and observes automatic ready failure (2.0741ms)",
|
||||
"✔ Mask candidate model rejection retains resolved start and logged error without idle retry loop (1.527ms)",
|
||||
"✔ Mask candidate noLayer initialization fails without retaining resources (2.1708ms)",
|
||||
"✔ Mask candidate noVideo initialization fails without retaining resources (1.1812ms)",
|
||||
"✔ Mask candidate noContext initialization fails without retaining resources (1.3588ms)",
|
||||
"✔ Mask candidate canvasError initialization fails without retaining resources (1.4164ms)",
|
||||
"✔ Mask candidate inference and canvas-read errors keep the old active retry outlet (2.6162ms)",
|
||||
"✔ Mask candidate late SDK rejection after cancellation remains observed and silent (1.3766ms)",
|
||||
"✔ Mask candidate already-destroyed registration does not install listeners or allocate resources (0.9332ms)",
|
||||
"✔ Mask candidate subscription rollback preserves original failure and prior host styles (1.9141ms)",
|
||||
"✔ Mask candidate immediate stop skips backend/model startup and public start settles (1.4292ms)",
|
||||
"✔ Mask candidate cancelled backend/model rejection is observed without retry or late log (1.6941ms)",
|
||||
"✔ Mask candidate disposal rejection is observed, clears canvas and allows independent restart (1.6381ms)",
|
||||
"✔ Mask candidate empty segmentation retains existing mask and a single active loop (1.1239ms)",
|
||||
"✔ Mask candidate cancelled inference cannot overwrite a subsequent external mask write (1.1616ms)",
|
||||
"✔ Mask candidate retains template capture before evaluating option getters (1.0374ms)"
|
||||
]
|
||||
},
|
||||
"checks": [
|
||||
{
|
||||
"file": "refactor/.cache/mask03-build.log",
|
||||
"sha256": "4c198f39b981759a137c5c6a69f8166f497bc3946519e64c1e17e585d0db77d5"
|
||||
},
|
||||
{
|
||||
"file": "refactor/.cache/mask03-integrated-lint.log",
|
||||
"sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
||||
}
|
||||
],
|
||||
"regression": {
|
||||
"log": "refactor/.cache/mask03-canvas-disposal-red.log",
|
||||
"sha256": "1f0fd4d3f2e3a6e4a98789138ca3cfdc98c38336fe08b9f8ea39e92597fc90e9",
|
||||
"cause": "Private bitmap retained while model disposal never resolved; release independent canvas first."
|
||||
},
|
||||
"review": {
|
||||
"independent": "Read-only controller/SDK/reentry review found no concrete blocker; added before-gate model disposal assertion and shared-SDK multiple-instance case.",
|
||||
"artifacts": "Candidate helper only builds source and substitutes SDK. Built main/legacy/ESM are not covered by its controlled lifecycle run."
|
||||
},
|
||||
"artifacts": [
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.js",
|
||||
"copy": "docs/compiled/artplayer-plugin-danmuku-mask.js",
|
||||
"sha256": "406a8c28207d386cffe1e61dc79afd8a6a9d5cbd1dc8e1661b4febbf48182f55",
|
||||
"bytes": 907181
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.legacy.js",
|
||||
"copy": "docs/compiled/artplayer-plugin-danmuku-mask.legacy.js",
|
||||
"sha256": "62d61dcedd3e90fa480589c2f1e3168c97635232c98ffe8c25c7918a2f3c66db",
|
||||
"bytes": 910266
|
||||
},
|
||||
{
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/dist/artplayer-plugin-danmuku-mask.mjs",
|
||||
"copy": "docs/compiled/artplayer-plugin-danmuku-mask.mjs",
|
||||
"sha256": "51936576383129170125b33d2983858e0841ea507368970f6d154bc9d78583b1",
|
||||
"bytes": 1732398
|
||||
}
|
||||
],
|
||||
"publicTypes": {
|
||||
"file": "packages/artplayer-plugin-danmuku-mask/types/artplayer-plugin-danmuku-mask.d.ts",
|
||||
"sha256": "f2b67f82a6471b79d921a7376b24620d0ed8284a3e1882b0f75a9b38dfac3638",
|
||||
"changed": false
|
||||
},
|
||||
"limitations": [
|
||||
"SDK model operations are unabortable; restart waits for old work settlement.",
|
||||
"body-segmentation 1.0.2 dispose calls MediaPipe close without returning its result; no native close completion is proven.",
|
||||
"Actual models, native video/CSS, SDK fallback, GPU resources and cross-instance backend state remain PKG-MASK-05.",
|
||||
"Full TypeScript/public declaration migration remains PKG-MASK-04; distribution/notice work remains PKG-MASK-06."
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
# PKG-MASK-03 生命周期与模块拆分
|
||||
|
||||
## 结构与契约
|
||||
|
||||
入口保留同步注册及 name/start/stop,start 为 Promise<void>,stop 同步返回 undefined。
|
||||
拆为 config(原样快照默认值)、sdk(后端/模型接口)、output(私有画布与遮罩提交)、
|
||||
controller(运行归属与调度)和 index(公开门面)。JS 与 TS 渐进共存;完整类型迁移
|
||||
属于04,未声称本步完成TS。包内 ARCHITECTURE.md 记录状态、资源、维护入口及限制。
|
||||
|
||||
保留模板先捕获、OR/undefined 默认值、general/mediapipe、WebGL fulfilled false
|
||||
不触发CPU fallback、二值颜色及严格RGB>250透明规则、data URL和原有样式。没有改
|
||||
公开声明、依赖、版本、事件或默认模型CDN。新增 test:danmuku-mask 脚本并将候选
|
||||
用例加入 test:unit,复用现有 Node/Yarn/测试依赖,不需更新锁文件。
|
||||
|
||||
## 缺陷修复及可观察差异
|
||||
|
||||
历史54项缺陷探针保留原始来源。候选对 backend/model/segment/mask/draw 每个等待点
|
||||
验证 stop/destroy 后不晚写、不复活RAF、不提前dispose;并发start共享初始化,
|
||||
每个注册只拥有一条推理链,stop可及时完成等待中的公共start。销毁撤销精确监听器。
|
||||
stop现在释放模型和独立画布,重启重新初始化,存在真实的重启开销;重启先等待旧的
|
||||
不可取消SDK工作及可观察dispose结果,不能把新旧推理并发作为加速。
|
||||
|
||||
初始化失败不再维持空转RAF;模型创建失败仍记录原错误并resolve,后端/画布失败
|
||||
仍拒绝显式start,ready自动调用会观察拒绝。缺节点/2D上下文和0尺寸的失败边界更清楚。
|
||||
审查中复现了dispose挂起时私有画布仍为300×150,已先释放独立bitmap再等待模型;
|
||||
保留红测日志及最终断言。多个播放器共享受控SDK/RAF时,停止一个不改变另一个的
|
||||
模型、图层或帧;这不代表真实TF全局状态已验收。
|
||||
|
||||
## 实际验证
|
||||
|
||||
Node24.21.0下 yarn test:danmuku-mask:96通过、0失败/跳过,其中36候选、54历史缺陷、
|
||||
6历史契约;不能把历史探针计为候选修复验证。定向lint通过。正常构建main、legacy、
|
||||
ESM成功且docs副本逐字节一致。源码helper替换SDK,只验证受控生命周期;没有声称
|
||||
这些用例验证了内嵌SDK的发布产物运行。独立只读审查未发现具体阻断,指出的阶段
|
||||
dispose断言已补充。机器证据见 [生命周期验证](../baselines/danmuku-mask-lifecycle-validation.json)。
|
||||
|
||||
## 剩余门槛与回退
|
||||
|
||||
SDK1.0.2公开dispose不返回底层MediaPipe close完成,因此只能证明调用和自有资源
|
||||
释放,不能证明WASM/GPU结束;没有使用私有SDK字段规避边界。永不完成的SDK工作仍可
|
||||
阻塞下一次start,stop仍可完成其公共Promise。MASK-LIFETIME保留真实资源证据待办并
|
||||
由05接续;模型解释、实际fallback、CORS/切源/真实画面/组合及发布许可仍未关闭。
|
||||
03按内部结构与受控归属完成,04/05/06依次推进;没有降低最终发布要求。
|
||||
|
||||
回退本任务源码、脚本和测试后正常重建三种产物;不修改历史夹具,不推送或发布。
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
基线:`40fcda6a37d0049d42e49c1e64e70d4fd9ba5f7f`。总任务 231 项,范围 22 个包及工作区/示例。
|
||||
|
||||
状态:todo 68 / doing 14 / blocked 0 / done 149 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
状态:todo 67 / doing 14 / blocked 0 / done 150 / deferred 0。风险 L/M/H 表示兼容风险,不表示工期。
|
||||
|
||||
前置依赖是启动条件;验收是完成条件。任务可以继续拆分,但不能复用或悄悄删除旧 ID。
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
| --- | --- | --- | --- | --- | --- | --- |
|
||||
| PKG-MASK-01 | artplayer-plugin-danmuku-mask<br>核对包契约与历史用法 | BASE-05 | 模型参数、start/stop、默认下载路径及 mask 样式 | 源码/声明/README/demo/发布包差异已登记;公开形状和版本范围冻结;接续 SDK-08,分别核实 Yarn 解析版本、未固定版本的模型 solutionPath 和资源来源 | H | done |
|
||||
| PKG-MASK-02 | artplayer-plugin-danmuku-mask<br>建立特有行为与错误测试 | PKG-MASK-01, ENG-03, ENG-05 | 加载期间停止/销毁、重复启动、推理失败、WebGL/CPU 边界 | 旧版本行为可重跑,成功/失败/切源/销毁有必要断言 | H | done |
|
||||
| PKG-MASK-03 | artplayer-plugin-danmuku-mask<br>整理内部职责与资源 | PKG-MASK-02, CORE-18, PKG-DANMUKU-07 | 模型加载/推理/画布输出分离,阻止重叠推理与过期写入 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | todo |
|
||||
| PKG-MASK-03 | artplayer-plugin-danmuku-mask<br>整理内部职责与资源 | PKG-MASK-02, CORE-18, PKG-DANMUKU-07 | 模型加载/推理/画布输出分离,阻止重叠推理与过期写入 | 结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过 | H | done |
|
||||
| PKG-MASK-04 | artplayer-plugin-danmuku-mask<br>迁移自有源码和公开类型 | PKG-MASK-03, ENG-04, ENG-06, CORE-07 | 模型 adapter、canvas 和选项的精确类型 | 严格类型检查、旧消费样例通过;声明路径/导出和同步异步兼容 | H | todo |
|
||||
| PKG-MASK-05 | artplayer-plugin-danmuku-mask<br>验证新旧核心和组合 | PKG-MASK-04, CORE-22 | 真实模型和 danmuku/seek/全屏组合,GPU 资源释放 | 最终核心与原支持范围核心分别通过;设备/SDK 缺证据不能标完成 | H | todo |
|
||||
| PKG-MASK-06 | artplayer-plugin-danmuku-mask<br>验证分发并同步文档 | PKG-MASK-05, ENG-07 | danmuku.mask.js、资源版本/许可、CPU fallback 和包体积证据 | tarball 入口/资源、类型、8082 demo 和 README 一致,有回退记录 | H | todo |
|
||||
@@ -534,6 +534,7 @@
|
||||
- PKG-JASSUB-01: [记录](baselines/jassub-release.json) [记录](baselines/jassub-vendor.json) [记录](baselines/jassub-font-metadata.json) [记录](baselines/jassub-contract.md) [记录](baselines/jassub-contract-validation.json) [记录](changes/2026-09-13-PKG-JASSUB-01-baseline.md)
|
||||
- PKG-MASK-01: [记录](baselines/danmuku-mask-release.json) [记录](baselines/danmuku-mask-registry.json) [记录](baselines/danmuku-mask-contract.md) [记录](baselines/danmuku-mask-contract-validation.json) [记录](changes/2026-09-13-PKG-MASK-01-contract.md)
|
||||
- PKG-MASK-02: [记录](changes/2026-09-13-PKG-MASK-02-failures.md) [记录](baselines/danmuku-mask-failures-validation.json)
|
||||
- PKG-MASK-03: [记录](changes/2026-09-13-PKG-MASK-03-lifecycle.md) [记录](baselines/danmuku-mask-lifecycle-validation.json)
|
||||
- PKG-ASR-01: [记录](changes/2026-09-13-PKG-ASR-01-contracts.md) [记录](baselines/asr-contract.md) [记录](baselines/asr-release.json)
|
||||
- PKG-ASR-02: [记录](changes/2026-09-13-PKG-ASR-02-audio-baseline.md) [记录](baselines/asr-audio-validation.json)
|
||||
- PKG-ASR-03: [记录](changes/2026-09-13-PKG-ASR-03-audio-ownership.md) [记录](baselines/asr-ownership-validation.json)
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# 进度与证据
|
||||
|
||||
## PKG-MASK-03 生命周期拆分完成
|
||||
|
||||
五个职责模块和单运行归属控制器落地;停止/销毁、迟到回调、并发启动、释放等待和
|
||||
多实例互不干扰有36候选测试。联合历史共96通过,lint和三格式正常构建通过。
|
||||
新增包架构与[变更记录](changes/2026-09-13-PKG-MASK-03-lifecycle.md),候选用例接入test:unit。
|
||||
MASK-START关闭;真实GPU/WASM释放、模型/后端/DOM组合仍保留05门槛,04 TS迁移下一步。
|
||||
自动缩略图内部TS检查点已独立提交6c989decc并通过提交审计;03仍doing。
|
||||
|
||||
|
||||
## PKG-AUTO-THUMB-03 内部TS检查点(仍doing)
|
||||
|
||||
六个抽帧/会话/资源运行模块迁到严格TS,内部类型和实际核心宿主接入fixture齐备。
|
||||
|
||||
@@ -221,8 +221,8 @@
|
||||
| CAST-LIFE-01 | resolved / 已复现 | Cast listeners and continuations survive player destruction and update another player icon | PKG-CAST-03, PKG-CAST-05 |
|
||||
| CAST-STATE-01 | resolved / 已复现 | Cast terminal session states leave the normalized callback and icon connected | PKG-CAST-03, PKG-CAST-05 |
|
||||
| CAST-ERROR-01 | resolved / 已复现 | Cast media loading rejection escapes on a detached Promise while the click has already fulfilled | PKG-CAST-03, PKG-CAST-05 |
|
||||
| MASK-LIFETIME-01 | open / 已复现 | Mask asynchronous initialization and inference continue after stop or destroy | PKG-MASK-02, PKG-MASK-03 |
|
||||
| MASK-START-01 | open / 已复现 | Concurrent Mask start calls can initialize multiple models and create independent RAF chains | PKG-MASK-02, PKG-MASK-03 |
|
||||
| MASK-LIFETIME-01 | open / 已复现 | Mask asynchronous initialization and inference continue after stop or destroy | PKG-MASK-02, PKG-MASK-03, PKG-MASK-05 |
|
||||
| MASK-START-01 | resolved / 已复现 | Concurrent Mask start calls can initialize multiple models and create independent RAF chains | PKG-MASK-02, PKG-MASK-03 |
|
||||
| MASK-MODEL-01 | open / 源码/产物事实 | Published Mask options and installed MediaPipe adapter consume different model settings | PKG-MASK-02, PKG-MASK-04, PKG-MASK-05 |
|
||||
| MASK-BACKEND-01 | open / 已复现 | Mask TensorFlow backend fallback does not establish MediaPipe fallback and failed initialization keeps scheduling | PKG-MASK-02, PKG-MASK-03, PKG-MASK-05 |
|
||||
| MASK-DOM-01 | open / 已复现 | Mask registration and frame processing assume Danmuku DOM, readable frames and a 2D context | PKG-MASK-02, PKG-MASK-03, PKG-MASK-05 |
|
||||
|
||||
+27
-8
@@ -4910,7 +4910,8 @@
|
||||
"status": "open",
|
||||
"owners": [
|
||||
"PKG-MASK-02",
|
||||
"PKG-MASK-03"
|
||||
"PKG-MASK-03",
|
||||
"PKG-MASK-05"
|
||||
],
|
||||
"evidence": [
|
||||
"refactor/baselines/danmuku-mask-contract.md",
|
||||
@@ -4918,16 +4919,19 @@
|
||||
"refactor/baselines/danmuku-mask-contract-validation.json",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-02-failures.md",
|
||||
"refactor/baselines/danmuku-mask-failures-validation.json",
|
||||
"test/danmuku-mask-failures.test.js"
|
||||
"test/danmuku-mask-failures.test.js",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-03-lifecycle.md",
|
||||
"refactor/baselines/danmuku-mask-lifecycle-validation.json",
|
||||
"test/danmuku-mask-lifecycle.test.js"
|
||||
],
|
||||
"compatibleResolution": "Invalidate stale work while keeping restartable stop distinct from final destroy; release model and subscriptions.",
|
||||
"compatibleResolution": "Invalidate stale work while keeping restartable stop distinct from final destroy; release model and subscriptions. PKG-MASK-03 fixes controlled stale work, owned bitmaps and subscriptions; native SDK dispose completion is not exposed by body-segmentation 1.0.2 and remains a real-resource validation limit in PKG-MASK-05.",
|
||||
"closureCriteria": "Pending initialization/inference cannot write masks or schedule work after stop/destroy; errors settle and owned resources are released."
|
||||
},
|
||||
{
|
||||
"id": "MASK-START-01",
|
||||
"title": "Concurrent Mask start calls can initialize multiple models and create independent RAF chains",
|
||||
"confirmation": "reproduced",
|
||||
"status": "open",
|
||||
"status": "resolved",
|
||||
"owners": [
|
||||
"PKG-MASK-02",
|
||||
"PKG-MASK-03"
|
||||
@@ -4938,10 +4942,19 @@
|
||||
"refactor/baselines/danmuku-mask-contract-validation.json",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-02-failures.md",
|
||||
"refactor/baselines/danmuku-mask-failures-validation.json",
|
||||
"test/danmuku-mask-failures.test.js"
|
||||
"test/danmuku-mask-failures.test.js",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-03-lifecycle.md",
|
||||
"refactor/baselines/danmuku-mask-lifecycle-validation.json",
|
||||
"test/danmuku-mask-lifecycle.test.js"
|
||||
],
|
||||
"compatibleResolution": "Share pending initialization and own at most one inference loop per live registration.",
|
||||
"closureCriteria": "Repeated and concurrent starts, stop then start, failures and multiple instances have deterministic resource and result assertions."
|
||||
"closureCriteria": "Repeated and concurrent starts, stop then start, failures and multiple instances have deterministic resource and result assertions.",
|
||||
"resolutionEvidence": [
|
||||
"refactor/changes/2026-09-13-PKG-MASK-03-lifecycle.md",
|
||||
"refactor/baselines/danmuku-mask-lifecycle-validation.json",
|
||||
"test/danmuku-mask-lifecycle.test.js"
|
||||
],
|
||||
"resolutionRationale": "Controlled shared-SDK multiple-instance, concurrent/repeated start, cancellation/restart behind inference/disposal, failure recovery and synchronous reentry prove one owned chain per registration. Actual global SDK/device state is separately retained by PKG-MASK-05."
|
||||
},
|
||||
{
|
||||
"id": "MASK-MODEL-01",
|
||||
@@ -4977,7 +4990,10 @@
|
||||
"refactor/baselines/danmuku-mask-contract-validation.json",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-02-failures.md",
|
||||
"refactor/baselines/danmuku-mask-failures-validation.json",
|
||||
"test/danmuku-mask-failures.test.js"
|
||||
"test/danmuku-mask-failures.test.js",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-03-lifecycle.md",
|
||||
"refactor/baselines/danmuku-mask-lifecycle-validation.json",
|
||||
"test/danmuku-mask-lifecycle.test.js"
|
||||
],
|
||||
"compatibleResolution": "Model backend outcomes explicitly, settle initialization failures and document the actual MediaPipe capability boundary.",
|
||||
"closureCriteria": "Fulfilled false, rejection, CPU failure, createSegmenter failure and later retry are tested; real inference fallback is separately evidenced."
|
||||
@@ -4998,7 +5014,10 @@
|
||||
"refactor/baselines/danmuku-mask-contract-validation.json",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-02-failures.md",
|
||||
"refactor/baselines/danmuku-mask-failures-validation.json",
|
||||
"test/danmuku-mask-failures.test.js"
|
||||
"test/danmuku-mask-failures.test.js",
|
||||
"refactor/changes/2026-09-13-PKG-MASK-03-lifecycle.md",
|
||||
"refactor/baselines/danmuku-mask-lifecycle-validation.json",
|
||||
"test/danmuku-mask-lifecycle.test.js"
|
||||
],
|
||||
"compatibleResolution": "Handle missing dependencies and frame/context failures without stale writes or uncontrolled loops while preserving plugin ordering.",
|
||||
"closureCriteria": "Missing Danmuku/context, CORS failure, source changes and ready/destroy timing have controlled and real browser evidence."
|
||||
|
||||
+5
-2
@@ -2563,11 +2563,14 @@
|
||||
"CORE-18",
|
||||
"PKG-DANMUKU-07"
|
||||
],
|
||||
"status": "todo",
|
||||
"status": "done",
|
||||
"risk": "H",
|
||||
"deliverable": "模型加载/推理/画布输出分离,阻止重叠推理与过期写入",
|
||||
"acceptance": "结构变化和缺陷修复分开记录;原 API/事件/资源生命周期通过",
|
||||
"evidence": []
|
||||
"evidence": [
|
||||
"changes/2026-09-13-PKG-MASK-03-lifecycle.md",
|
||||
"baselines/danmuku-mask-lifecycle-validation.json"
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "PKG-MASK-04",
|
||||
|
||||
Reference in new issue
Block a user