diff --git a/backlog/tasks/task-287 - Restore-Lua-parser-compatibility-for-mpv-plugin-modules.md b/backlog/tasks/task-287 - Restore-Lua-parser-compatibility-for-mpv-plugin-modules.md new file mode 100644 index 00000000..e2458c5b --- /dev/null +++ b/backlog/tasks/task-287 - Restore-Lua-parser-compatibility-for-mpv-plugin-modules.md @@ -0,0 +1,44 @@ +--- +id: TASK-287 +title: Restore Lua parser compatibility for mpv plugin modules +status: Done +assignee: [] +created_date: '2026-04-11 21:25' +updated_date: '2026-04-11 21:29' +labels: + - bug + - mpv-plugin + - lua +dependencies: [] +--- + +## Description + + +Users with Lua runtimes that do not accept the current `goto continue` pattern in the mpv plugin should be able to load the plugin without syntax errors. Remove the parser-incompatible control-flow usage from the affected plugin modules without changing plugin behavior. + + +## Acceptance Criteria + +- [x] #1 The mpv plugin source no longer relies on parser-incompatible `goto continue` labels in the affected Lua modules. +- [x] #2 Automated coverage fails on the old parser-incompatible source and passes once the compatibility fix is in place. +- [x] #3 Existing plugin start/gate verification still passes after the compatibility fix. + + +## Implementation Notes + + +Reused existing local cleanups in `plugin/subminer/hover.lua` and `plugin/subminer/environment.lua` to remove `goto continue` / `::continue::` control flow without behavior changes. + +Added `scripts/test-plugin-lua-compat.lua` and wired it into `test:plugin:src`; the regression checks reject the legacy pattern structurally and verify parse success with `luajit` when available. + +Verification run on 2026-04-11: `lua scripts/test-plugin-lua-compat.lua` ✅, `bun run test:plugin:src` ✅, `bun run changelog:lint` ✅, `bun run typecheck` ✅, `bun run test:env` ✅, `bun run build` ✅, `bun run test:smoke:dist` ✅. + +`bun run test:fast` remains red for unrelated existing immersion-tracker assertions in `src/core/services/immersion-tracker/__tests__/query-split-modules.test.ts` and `src/core/services/immersion-tracker/__tests__/query.test.ts` (`tsMs`/`lastWatchedMs` observed as `-2147483648`). + + +## Final Summary + + +Removed parser-incompatible `goto continue` usage from the affected mpv Lua plugin modules, added a dedicated Lua compatibility regression script to the plugin test lane, and added a changelog fragment for the user-visible fix. Requested plugin verification is green; unrelated existing `test:fast` immersion-tracker failures remain outside this task. + diff --git a/backlog/tasks/task-288 - Stabilize-immersion-tracker-CI-timestamp-handling-under-libsql-Bun.md b/backlog/tasks/task-288 - Stabilize-immersion-tracker-CI-timestamp-handling-under-libsql-Bun.md new file mode 100644 index 00000000..a689b3a1 --- /dev/null +++ b/backlog/tasks/task-288 - Stabilize-immersion-tracker-CI-timestamp-handling-under-libsql-Bun.md @@ -0,0 +1,42 @@ +--- +id: TASK-288 +title: Stabilize immersion-tracker CI timestamp handling under libsql/Bun +status: Done +assignee: [] +created_date: '2026-04-11 21:34' +updated_date: '2026-04-11 21:43' +labels: + - bug + - ci + - immersion-tracker +dependencies: [] +--- + +## Description + + +`bun run test:fast` is currently failing because large millisecond timestamps are not handled safely through the libsql/Bun path. Fix timestamp parsing/storage so lifetime/library and session-event queries return correct wall-clock values in CI and runtime. + + +## Acceptance Criteria + +- [x] #1 Large wall-clock timestamps round-trip correctly through immersion-tracker lifetime/library queries under the repo's Bun/libsql runtime. +- [x] #2 Session-event timestamps round-trip correctly for real wall-clock values used by runtime event inserts. +- [x] #3 Targeted immersion-tracker regression coverage passes, and the previously failing `test:fast` lane no longer fails on these timestamp assertions. + + +## Implementation Notes + + +Root cause split in two places: Bun/libsql corrupts large millisecond timestamp strings when coerced through `Number(...)`, and `imm_session_events.ts_ms` being `INTEGER` let runtime event inserts/readbacks return `-2147483648` on CI/runtime. + +Fix shipped by parsing timestamp strings without the broken `Number(largeString)` path, migrating `imm_session_events.ts_ms` to `TEXT`, ordering/retention queries via `CAST(ts_ms AS REAL)`, and avoiding `Number(currentMs)` when reusing already-normalized timestamp strings. + +Added regression coverage for both real runtime event inserts and schema migration/repair of previously truncated session-event rows. + + +## Final Summary + + +Fixed immersion-tracker timestamp handling under Bun/libsql so large wall-clock millisecond values survive runtime writes, query reads, and schema migration. `bun run test:fast`, `bun run typecheck`, `bun run test:env`, `bun run build`, `bun run test:smoke:dist`, and `bun run changelog:lint` all pass after the patch. + diff --git a/vendor/subminer-yomitan b/vendor/subminer-yomitan index 69620abc..ed31b7a3 160000 --- a/vendor/subminer-yomitan +++ b/vendor/subminer-yomitan @@ -1 +1 @@ -Subproject commit 69620abcbc126edd2dcbe637f0fac582e9b555c5 +Subproject commit ed31b7a3eee1746d332f6cadc53447a2391d3327