Skip to content

ADFA-5343 fix(server-lifecycle): §3.3 follow-up - route an interrupted install off the module index to recovery - #509

Merged
luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5343-phase5-followups
Aug 31, 2026
Merged

ADFA-5343 fix(server-lifecycle): §3.3 follow-up - route an interrupted install off the module index to recovery#509
luisguzman-adfa merged 2 commits into
mainfrom
fix/ADFA-5343-phase5-followups

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

A killed module install can have its SetupProgressActivity task restored on top by the OS. That index resumed and polled for a server that never comes up on a broken base, and the DAMAGED loop-cut (LibraryActivity.evaluateRecovery -> userWantsOn=false) never ran, so the reconciler retried pdsm start uncut until the user manually reached Home. Root: the give-up decision is owned by a UI Activity, so any path that bypasses LibraryActivity.onCreate bypasses the cut.

  • SetupProgressActivity.onCreate: if InstallGuard.isInterrupted (a dead-process marker = a killed install; a live run reads isLive and clears on a clean finish), route to LibraryActivity via FLAG_ACTIVITY_CLEAR_TOP WITHOUT SINGLE_TOP so the standard- launchMode Home is re-created and its onCreate re-runs the recovery evaluation (onNewIntent is a monitor and would not). The single recovery owner then boots a healthy base and clears the marker, or declares DAMAGED and cuts.

No new state, no duplicated verdict - the cut stays owned in one place; this only funnels the stray path into it. The reconciler-owned end-state (a retry budget that removes the cut-hack entirely) is recorded in ADR-5343b as a future redesign.

Gates: :app:testDebugUnitTest + :app:lintDebug green. Runtime is device-only.

…d install off the module index to recovery

A killed module install can have its SetupProgressActivity task restored on top by
the OS. That index resumed and polled for a server that never comes up on a broken
base, and the DAMAGED loop-cut (LibraryActivity.evaluateRecovery -> userWantsOn=false)
never ran, so the reconciler retried pdsm start uncut until the user manually reached
Home. Root: the give-up decision is owned by a UI Activity, so any path that bypasses
LibraryActivity.onCreate bypasses the cut.

- SetupProgressActivity.onCreate: if InstallGuard.isInterrupted (a dead-process marker
  = a killed install; a live run reads isLive and clears on a clean finish), route to
  LibraryActivity via FLAG_ACTIVITY_CLEAR_TOP WITHOUT SINGLE_TOP so the standard-
  launchMode Home is re-created and its onCreate re-runs the recovery evaluation
  (onNewIntent is a monitor and would not). The single recovery owner then boots a
  healthy base and clears the marker, or declares DAMAGED and cuts.

No new state, no duplicated verdict - the cut stays owned in one place; this only
funnels the stray path into it. The reconciler-owned end-state (a retry budget that
removes the cut-hack entirely) is recorded in ADR-5343b as a future redesign.

Gates: :app:testDebugUnitTest + :app:lintDebug green. Runtime is device-only.
…ed-install reroute against live sessions

Code-review hardening of fa7c5bc: SetupProgressActivity.onCreate is entered from
~14 sites, so the isInterrupted reroute must not hijack a screen that has live work.
Route to recovery only when the marker is interrupted AND nothing live owns the
screen: !rebuildInSession() (a dashboard rebuild does not plant InstallGuard) &&
!EnvironmentLock.isBusyNow() (a live content download). After a real kill the
queue/downloads are idle (device-observed: holder=NONE), so the guard never blocks
the case it exists for.

Gates: :app:testDebugUnitTest + :app:lintDebug green. Runtime is device-only.
@luisguzman-adfa
luisguzman-adfa merged commit 0a8b4ee into main Aug 31, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-5343-phase5-followups branch August 31, 2026 22:55
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