mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-02-28 06:22:45 -08:00
3.4 KiB
3.4 KiB
id, title, status, assignee, created_date, labels, dependencies, references, priority
| id | title | status | assignee | created_date | labels | dependencies | references | priority | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| TASK-73 | MPV plugin: split into modules and optimize startup/command runtime | In Progress | 2026-02-28 20:50 |
|
medium |
Description
Scope: Replace monolithic plugin/subminer.lua with modular plugin runtime; optimize command execution paths; align install/docs/tests; fix launcher smoke instability.
Delivered behavior:
- Full plugin cutover to
plugin/subminer/main.lua+ module directory (no runtime compatibility shim with old monolith file). - Process/control command path moved toward async subprocess usage for non-start actions (
stop,toggle,settings, restart stop leg), reducing synchronous blocking in mpv script runtime. - Startup/runtime loading updated with lazy module initialization via bootstrap proxies.
- Plugin install flow updated to copy
plugin/subminer/directory and remove legacy~/.config/mpv/scripts/subminer.luafile. - Added plugin gate script wiring to package scripts (
test:plugin:src) and launcher test flow. - Smoke tests stabilized across sandbox environments where UNIX socket bind can return
EPERMwhile preserving normal-path assertions. - Playback command cleanup race fixed when mpv exits before exit-listener registration.
Risk/impact context:
- mpv plugin loading path changed from single-file to module directory; packaging/install paths must stay consistent with release assets.
- Async control path changes reduce blocking but can surface timing differences; regression checks added for cold start and launcher smoke behavior.
Final Summary
Startup fixed-sleep removal delivered in launcher + plugin start paths:
launcher/mpv.ts:startOverlayno longer blocks on hard2000ms; now uses bounded readiness/event checks:- bounded wait for mpv IPC socket readiness
- bounded wait for spawned overlay command settle (
exit/error)
plugin/subminer/process.luaremoved fixed0.35stexthooker delay and fixed0.6sstartup visibility delay.- Overlay start now uses short bounded retries on non-ready start failures, then applies startup overlay visibility once start succeeds.
Regression coverage added:
launcher/mpv.test.tsadds guard thatstartOverlayresolves quickly when readiness arrives.scripts/test-plugin-process-start-retries.luaasserts retry behavior and guards against reintroducing fixed0.35/0.6timers.
Validation run:
bun test launcher/mpv.test.tspass.lua scripts/test-plugin-process-start-retries.luapass.- Existing broader plugin gate suite still has unrelated failure in current tree (
scripts/test-plugin-start-gate.luaAniSkip async curl assertion).