Skip to content

fix(library): track installed packages per-console (no cross-console leak)#139

Merged
phantomptr merged 1 commit into
mainfrom
fix/installed-badge-per-console
Jun 17, 2026
Merged

fix(library): track installed packages per-console (no cross-console leak)#139
phantomptr merged 1 commit into
mainfrom
fix/installed-badge-per-console

Conversation

@phantomptr

Copy link
Copy Markdown
Owner

Bug

Staging the same .pkg on multiple PS5s and installing it on one wrongly showed it as installed (Reinstall) on all of them.

Cause

The per-package "installed" flag (added in 3.3.15 for the update/DLC Reinstall badge) lived in the path-keyed metadata cache. Staged packages land at identical paths on every console (shared staging dir), so a path-only flag can't tell consoles apart — installing at /data/.../foo.pkg on console A lit it up for every console with the same path.

Fix

Move the installed record into a per-host cache (ps5upload.pkg_library.installed.v1: bare host → set of installed paths). New recordPkgInstalled(host, path) / isPkgInstalledHere(host, path) replace the path-only flag; both install paths (library tab + upload-queue finisher) and refresh() now pass the console's host (normalized via hostOf, so addr:port forms work). The file-intrinsic path-meta cache (name/appVer/category) is unchanged — those should be shared across consoles.

Old (buggy, global) flags in the path-meta cache are simply ignored; the badge self-heals on the next install.

Tests

  • +3 isolation tests: install on A doesn't mark B; host:port normalized to bare host; distinct paths tracked independently.
  • Full gate green: typecheck, lint, 736 tests.

Release 3.3.19.

…leak)

The Install Package library wrongly showed a .pkg as installed on EVERY
console once it was installed on any one of them. The per-package "installed"
flag lived in the path-keyed metadata cache, but staged packages land at
identical paths on every console — so a path-only flag couldn't tell consoles
apart.

Move the installed record into a per-host cache (bare host → set of installed
paths). recordPkgInstalled(host, path) / isPkgInstalledHere(host, path) replace
the path-only flag; the install paths and refresh now pass the console's host.
The file-intrinsic path-meta cache (name/appVer/category) is unchanged — those
are correctly shared across consoles.

Adds 3 isolation tests (install on A doesn't mark B; host:port normalized).

Release 3.3.19.
@phantomptr phantomptr merged commit 1de2947 into main Jun 17, 2026
23 checks passed
@phantomptr phantomptr deleted the fix/installed-badge-per-console branch June 17, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant