test(multiple-subtitles): checkpoint native seek diagnostics [PKG-MULTI-SUB-05]

This commit is contained in:
Harvey Zhao committed 2026-09-14 14:03:22 +08:00
1 parent 318de37e8a
commit a8d19ce5ef
10 files changed
+7266 -8

No files matched your search

File diff suppressed because it is too large. Load diff
@@ -0,0 +1,63 @@
# PKG-MULTI-SUB-05 checkpoint: source-seek diagnostics (not complete)
Task11 is committed as318de37e8 and its commit audit passed. This checkpoint
continues the reopened old-core source-seek issue without changing production
code, declarations, dependencies or built artifacts.
## Added evidence
The optional diagnostics capture native events, public seek/fullscreen events,
monotonic times, native position/duration/seeking, active cues and switch Promise
settlement. Full mode forwards the original native currentTime/playbackRate
accessors and records writes/stacks; events mode leaves those properties intact.
Both modes are opt-in. Diagnostic side observers handle rejection while the
original returned Promise still rejects for the test consumer.
Initial WebKit serial3 and repeated9 cases pass their caption assertions. The
repeated traces show all six old-core switches resolve while seeking=true;
restoration seeked is delivered30..50ms later. The three candidate switches wait
for restoration. No playback-rate assignment was observed in these source steps.
The successful later user writes occurred after the prior native seeked event.
The actual-main events-only matrix passes105 assertions, including explicitly
labelled historical overlap/offset defect observations. It again shows early
old-core settlement, including WebKit native seeked43/46ms later. This is not
proof the previously missed seeks were repaired: observation may affect timing,
and no failing native write trace was captured in those runs.
The subsequent actual-main matrix with diagnostics disabled has62 passes and one
failure on old5.3.0/WebKit. At failure, media time is0.0015139, the1..3-second cue
is intact, active cues are empty, and the player is still alive. The candidate
and other old-core cases pass in that run. This reproduces the same near-zero
position category previously seen on old5.4.0; it does not implicate ASS conversion
or prove the precise internal native overwrite sequence.
## Separate restoration-event control
`source-restoration.js` installs a native metadata listener before switchUrl.
After the core's metadata handler, it waits for native seeked if seeking is active,
and also waits for the original switch Promise. It cleans both listeners on
completion or failure. There are no fixed delays, seek retries or source rewrites.
It is enabled only with ARTPLAYER_SOURCE_RESTORE_EVENT=1; the default failing
property-based path and existing immediate-call ordering probe remain available.
With diagnostics disabled, the event control passes27 cases: three repetitions
of three core inputs across three desktop engines using actual main artifacts.
This supports independently verifying captions after native restoration. It is
not proof of a production fix, or sufficient evidence to close the original
immediate-seek failure. Do not make the normal path green by relabelling this
control as the original public API behavior.
Reports, input/artifact hashes, selected modes, timings and remaining failures are
in [the checkpoint evidence](../baselines/multiple-subtitles-seek-diagnostics.json).
The browser README documents flags. Explicit test/helper lint, CI50 and plan/risk
checks pass. No source or package build was needed for these test-only additions.
## Remaining work
MULTI-SUB-SWITCH-01 stays open and task05 stays doing. The next diagnostic step is
to capture the failed default path's restoration completion versus subsequent
native seek without assuming that property polling equals event completion.
Keep candidate public switch guarantees separate from immutable old-host defects;
do not patch the shared media clock from the subtitle plugin. Broader historical
profile/device acceptance and task06 distribution gates remain incomplete.
+1 -1
View File
@@ -558,7 +558,7 @@
- PKG-MULTI-SUB-04: [记录](baselines/multiple-subtitles-runtime-types.json) [记录](changes/2026-09-13-PKG-MULTI-SUB-04-runtime-types.md) [记录](baselines/multiple-subtitles-public-types.json) [记录](changes/2026-09-13-PKG-MULTI-SUB-04-public-types.md) [记录](type-compatibility-policy.md) [记录](baselines/multiple-subtitles-approved-types.json) [记录](changes/2026-09-13-PKG-MULTI-SUB-04-approved-types.md)
- PKG-MULTI-SUB-07: [记录](baselines/multiple-subtitles-timestamps.json) [记录](changes/2026-09-13-PKG-MULTI-SUB-07-timestamps.md)
- PKG-MULTI-SUB-08: [记录](changes/2026-09-14-PKG-MULTI-SUB-08-entities.md) [记录](baselines/multiple-subtitles-entities-validation.json)
- PKG-MULTI-SUB-05: [记录](changes/2026-09-14-PKG-MULTI-SUB-05-combinations.md) [记录](baselines/multiple-subtitles-combinations-validation.json) [记录](baselines/multiple-subtitles-cores.json)
- PKG-MULTI-SUB-05: [记录](changes/2026-09-14-PKG-MULTI-SUB-05-combinations.md) [记录](baselines/multiple-subtitles-combinations-validation.json) [记录](baselines/multiple-subtitles-cores.json) [记录](changes/2026-09-14-PKG-MULTI-SUB-05-seek-diagnostics.md) [记录](baselines/multiple-subtitles-seek-diagnostics.json)
- 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) [记录](baselines/jassub-provenance.json) [记录](baselines/jassub-provenance-validation.json) [记录](changes/2026-09-14-PKG-JASSUB-01-provenance.md)
- PKG-JASSUB-02: [记录](changes/2026-09-14-PKG-JASSUB-02-failure-baseline.md) [记录](baselines/jassub-failures-validation.json)
- PKG-JASSUB-03: [记录](changes/2026-09-14-PKG-JASSUB-03-registration.md) [记录](baselines/jassub-registration-validation.json)
+13
View File
@@ -1,5 +1,18 @@
# 进度与证据
## PKG-MULTI-SUB-05 切源时序诊断检查点(仍未完成)
新增可选原生属性/事件跟踪和独立恢复事件等待对照。WebKit串行3项、重复9项及
三引擎被动事件矩阵105项通过断言,但旧核心仍提前结算,WebKit恢复seeked晚30至50ms;
候选核心会等待恢复。关闭诊断后63项中62通过,旧5.3.0/WebKit再次停在0.0015139秒,
字幕cue仍完整;没有获得失败瞬间的原生写入轨迹,不能据带诊断的通过结果关闭风险。
显式等待metadata后的原生恢复seeked对照27项通过,仅说明完成恢复后的字幕路径有效,
不修改默认测试路径或旧公共API。即时调用探针、此前失败和MULTI-SUB-SWITCH-01保持open。
见[检查点](changes/2026-09-14-PKG-MULTI-SUB-05-seek-diagnostics.md)和
[证据](baselines/multiple-subtitles-seek-diagnostics.json)。本轮仅测试和文档修改,产物未变,
脚本lint/CI50/计划风险检查通过;仍为179 done、17 doing、55 todo。task05/06未完成。
保留原生失败时序定位入口;下一轮转回Auto Thumbnail剩余源码整理,再继续包级组合门槛。
## PKG-MULTI-SUB-11 旧发布核心 ASS 转换适配完成
实际5.1.2 tarball证明只有main转换器丢失模板换行,同版legacy与源码正确;新增
+7 -3
View File
@@ -2,7 +2,7 @@
"schemaVersion": 1,
"task": "BASE-07",
"sourceCommit": "e01f39ff",
"updatedAt": "2026-09-14T05:41:02.580Z",
"updatedAt": "2026-09-14T06:00:35.506Z",
"note": "Open means closure evidence is outstanding; source-observed and unverified are not reproduced runtime bugs. A source issue already mitigated in the workspace still requires candidate regression evidence. No accepted-with-scope item is implied by baseline task completion.",
"items": [
{
@@ -6034,7 +6034,7 @@
"id": "MULTI-SUB-SWITCH-01",
"title": "Intermittent WebKit core5.3.0 caption loss after selected-track source switch",
"confirmation": "reproduced",
"workspaceState": "Reopened during task10: both source and actual-main matrices fail old5.4.0/WebKit caption after switch despite waiting seeking=false. Source failure native time0.001494, intact1..3 cue, active=[]; task09 attribution remains supported but the later-seek workaround is insufficient. Candidate core and old5.1 display regressions pass. Task05 must diagnose remaining old-host ordering, without hiding these failures.",
"workspaceState": "Still open after task11: property traces3+9 and passive105 cases pass while confirming early old-core settlement; default untraced63 has another near-zero seek miss on5.3.0/WebKit (time0.0015139, intact1..3 cue, no active cue). No failing native-write trace yet. Opt-in metadata/restoration-seeked control passes27 cases but is not a production/API fix; default and immediate-call probes remain unchanged. Candidate source guarantees pass. Task05 still owns remaining diagnosis and acceptance.",
"compatibleResolution": "Classify the old-host source/native-seek race separately from caption rendering; preserve immediate-call probes, require candidate first seeks, and wait for real native source completion before independent caption-seek assertions.",
"closureCriteria": "Root cause classified with targeted evidence, any required fix validated, and changed candidate/old-core combination rerun without hiding the original failure.",
"status": "open",
@@ -6052,7 +6052,11 @@
"refactor/baselines/multiple-subtitles-switch-validation.json",
"test/browser/multiple-subtitles-switch.spec.js",
"refactor/changes/2026-09-14-PKG-MULTI-SUB-10-legacy-captions.md",
"refactor/baselines/multiple-subtitles-legacy-validation.json"
"refactor/baselines/multiple-subtitles-legacy-validation.json",
"refactor/changes/2026-09-14-PKG-MULTI-SUB-05-seek-diagnostics.md",
"refactor/baselines/multiple-subtitles-seek-diagnostics.json",
"test/browser/source-seek-diagnostics.js",
"test/browser/source-restoration.js"
],
"resolutionEvidence": [
"refactor/changes/2026-09-14-PKG-MULTI-SUB-09-switch-order.md",
+3 -1
View File
@@ -2417,7 +2417,9 @@
"evidence": [
"changes/2026-09-14-PKG-MULTI-SUB-05-combinations.md",
"baselines/multiple-subtitles-combinations-validation.json",
"baselines/multiple-subtitles-cores.json"
"baselines/multiple-subtitles-cores.json",
"changes/2026-09-14-PKG-MULTI-SUB-05-seek-diagnostics.md",
"baselines/multiple-subtitles-seek-diagnostics.json"
]
},
{