Files
SubMiner/backlog/tasks/task-102 - Restore-Jellyfin-session-migration-contract-and-build-green.md
2026-02-22 02:15:12 -08:00

2.4 KiB

id, title, status, assignee, created_date, updated_date, labels, dependencies, priority, ordinal
id title status assignee created_date updated_date labels dependencies priority ordinal
TASK-102 Restore Jellyfin session migration contract and build green Done
2026-02-22 07:12 2026-02-22 07:51
bug
jellyfin
maintainability
TASK-93
high 99000

Description

bun run build is currently failing after refactor/rebase drift in Jellyfin auth/session wiring.

Observed drift:

  • src/config/definitions/defaults-integrations.ts still includes jellyfin.accessToken and jellyfin.userId.
  • src/config/resolve/integrations.ts still parses those removed config keys.
  • src/main.ts still calls removed token-store methods (loadToken/saveToken/clearToken) instead of session-store methods.
  • setup/config patch flows still attempt to write removed Jellyfin auth fields to config.

This task restores the TASK-93 contract end-to-end: auth in env/stored session, no token/userId in editable config.

Action Steps

  1. Remove stale jellyfin.accessToken/jellyfin.userId keys from defaults and config resolve parsing.
  2. Update src/main.ts Jellyfin deps wiring to use loadStoredSession/saveStoredSession/clearStoredSession with createJellyfinTokenStore.
  3. Update Jellyfin setup/auth flows so config patch writes only supported Jellyfin config keys.
  4. Update launcher-side Jellyfin config loader to stop reading removed auth keys from config file.
  5. Add/adjust regression tests around Jellyfin resolver precedence and setup/auth save+clear paths.
  6. Verify with bun run build, bun run test:config:src, and targeted Jellyfin runtime tests.

Acceptance Criteria

  • #1 bun run build passes on main after Jellyfin session contract fix.
  • #2 No production config defaults/resolvers parse jellyfin.accessToken or jellyfin.userId.
  • #3 Main/runtime Jellyfin auth wiring compiles against session-store API only.
  • #4 Jellyfin setup/login/logout paths are covered by source tests and pass.

Definition of Done

  • #1 Compile + config test lanes pass without local patches.
  • #2 Runtime Jellyfin tests include session-store save/load/clear expectations.
  • #3 Docs/examples reflect session-store contract and no longer mention removed config auth keys.