Skip to content

refactor(deploy): extract install pipeline into InstallController [ADFA-4434]#51

Merged
luisguzman-adfa merged 1 commit into
mainfrom
refactor/ADFA-4434-deployfragment-install
Jun 25, 2026
Merged

refactor(deploy): extract install pipeline into InstallController [ADFA-4434]#51
luisguzman-adfa merged 1 commit into
mainfrom
refactor/ADFA-4434-deployfragment-install

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

ADFA-4434 (PR 2 of 2) · Epic ADFA-1028. Completes the ticket (PR 1 Planner = #48, merged). Strangler-fig, no behaviour change (verified on-device).

What

The install pipeline is one cohesive, cyclic call-graph (install button → queue → per-role provisioning: download + Ansible runrole + maps + local-vars + install-state verification), so it moves as a single controller (splitting it would cut the cycle into cross-controller calls).

  • New install/presentation/InstallController (non-Fragment) + InstallHost seam. ~589 LOC moved off the Fragment.
  • Shared state (selectedTier, module checkboxes, kiwix overrides, isDownloadingRootfs, isBatchInstalling, installationQueue, lastKnownState) stays on the Fragment via the host; managers (aria2Manager, prootEngine) via host accessors; mainAct passed in. updateUiState (ADB/Share connection UI) intentionally NOT moved.
  • DeployFragment delegates bind() / verifyInstallationState() / fetchLocalVarsFromPRoot(). 2051 → 1481 LOC (3032 at the start of the carve series, after backup + planner + install).

Verification

Built locally + on-device smoke test (open Install tab, tier/module selection + projection, Launch → queue, install-state verification) — behaviour identical, no crashes.

Scope

Lint detectors stay disabled (Reset/Delete + ADB/Share still in the Fragment; later tickets). Unrelated known bug (module install /dev/shm / silent false-success) is tracked separately — behaviour is preserved here, not changed.

…FA-4434]

PR 2 of ADFA-4434 (decompose DeployFragment; epic ADFA-1028). Strangler-fig, no behaviour change.

The install pipeline is one cohesive, cyclic call-graph (install button -> queue -> per-role
provisioning: download + Ansible runrole + maps + local-vars + state verification), so it moves
as a single controller (splitting would cut the cycle into cross-controller calls).

- New install/presentation/InstallController + InstallHost seam. ~589 LOC moved.
- Shared state (selectedTier, module checkboxes, kiwix overrides, isDownloadingRootfs,
  isBatchInstalling, installationQueue, lastKnownState) stays on the Fragment via the host;
  managers (aria2Manager, prootEngine) via host accessors; mainAct passed in. updateUiState
  (ADB/Share UI) intentionally NOT moved.
- DeployFragment delegates bind()/verifyInstallationState()/fetchLocalVarsFromPRoot().
  2051 -> 1481 LOC. Lint detectors stay disabled (Reset/Delete + ADB/Share still in Fragment).

Verified statically (brace balance, no dangling refs, no unprefixed Fragment calls, bareword +
import scans clean). NOT yet built locally.
@luisguzman-adfa luisguzman-adfa merged commit 7cfb6ea into main Jun 25, 2026
1 check passed
@luisguzman-adfa luisguzman-adfa deleted the refactor/ADFA-4434-deployfragment-install branch June 25, 2026 02:17
luisguzman-adfa added a commit that referenced this pull request Jun 25, 2026
Re-targeted onto InstallController (the install/runrole flow moved there in
ADFA-4434 #51). Detect non-zero exit OR Ansible [ERROR]/multiprocessing crash,
roll back the speculative local_vars edit (revertModuleInLocalVars), mark the
module FAILED and report it on queue drain. Failure message lives in strings.xml
(install_msg_failed, 6 locales) instead of hardcoded.
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