Skip to content

fix(install): gate installs on console readiness + auto-retry transient busy#140

Merged
phantomptr merged 1 commit into
mainfrom
fix/install-readiness-gate
Jun 17, 2026
Merged

fix(install): gate installs on console readiness + auto-retry transient busy#140
phantomptr merged 1 commit into
mainfrom
fix/install-readiness-gate

Conversation

@phantomptr

Copy link
Copy Markdown
Owner

Bug (from HW logs + report)

Installing an update/DLC right after another install failed with a transient rejection — dpi-install rejected rc=0x80020002 (and appinst 0x80b21106). The user's logs show the same Killzone update rejected twice, then dpi-install ok minutes later once they waited and retried by hand. Throughout the failing window: apps/installed: app_list_registered failed: read frame header: failed to fill whole buffer / os error 10054 — the console stops answering while it recovers from the prior install (the SceShellUI screen-black blip).

Fix — a readiness gate keyed on that exact signal

Engine (GET /api/ps5/readiness, read-only): round-trips the AppListRegistered frame and returns { ready } — a clean response means the console is settled; a frame/connection error means it's still busy. This is precisely the request that fails during the blip.

Client:

  • waitForConsoleReady() polls the probe (1.5s cadence, 30s cap, fail-open so an older payload that can't report readiness never hard-blocks).
  • runPkgInstall() now waits for readiness before installing, and retries the DPI transient-busy rc (0x80020002) up to 4×, each gated on readiness — instead of failing on the first reject. Shows "Waiting for the PS5 to be ready…".
  • The post-install settle (was a blind 3s FW12-only sleep) is now an active readiness wait on all firmwares, so the next queued item doesn't start into the blip.

This automates exactly what the user did manually (wait → retry).

Tests / checks

  • +6 client tests (waitForConsoleReady immediate / poll-until-ready / timeout). 739 client tests green.
  • Engine + Tauri clippy clean (-D warnings); both crates compile.

Note: logic is derived from the user's own hardware logs and is CI-verified; real-HW confirmation of the end-to-end gate is the ideal final check.

Release 3.3.20.

Installs were failing with transient rejections (DPI rc=0x80020002,
appinst 0x80b21106) when fired into the post-install SceShellUI recovery
window — the 'screen-black blip' during which the console stops answering
the AppListRegistered frame. The user had to wait and retry by hand; the
HW logs show the same install rejected twice, then ok once the console
settled.

Add a console-readiness gate keyed on that exact signal:
- Engine: GET /api/ps5/readiness round-trips AppListRegistered, returns
  { ready } (clean response = settled, error = still busy). Read-only.
- Client: waitForConsoleReady() polls it (30s cap, fail-open). runPkgInstall
  now (1) waits for readiness BEFORE installing, and (2) retries the DPI
  transient-busy rc (0x80020002) up to 4x, each gated on readiness, instead
  of failing on the first reject. Surfaces 'Waiting for the PS5 to be
  ready…' via busyNotice.
- The post-install settle (was a blind 3s FW12-only sleep) is now an active
  readiness wait on all firmwares, so the next queued item doesn't start
  into the blip.

Tests: +6 (waitForConsoleReady immediate/poll/timeout). Engine + Tauri
clippy clean; 739 client tests green.

Release 3.3.20.
@phantomptr phantomptr merged commit f747841 into main Jun 17, 2026
23 checks passed
@phantomptr phantomptr deleted the fix/install-readiness-gate branch June 17, 2026 05:56
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