refactor(deploy): extract install pipeline into InstallController [ADFA-4434]#51
Merged
Merged
Conversation
…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
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).
install/presentation/InstallController(non-Fragment) +InstallHostseam. ~589 LOC moved off the Fragment.selectedTier, module checkboxes, kiwix overrides,isDownloadingRootfs,isBatchInstalling,installationQueue,lastKnownState) stays on the Fragment via the host; managers (aria2Manager,prootEngine) via host accessors;mainActpassed in.updateUiState(ADB/Share connection UI) intentionally NOT moved.DeployFragmentdelegatesbind()/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.