Skip to content

ADFA-5280 fix(server): post-batch ensure decides on fresh liveness, not the stale cache - #477

Merged
luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-5280-post-batch-fresh-liveness
Aug 26, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
fix/ADFA-5280-post-batch-fresh-liveness

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

ServerController.startEnvironment() fed EnvironmentEnsure.decide() the cached
ServerStateRepository.alive, which still reads TRUE right after a module batch's
pdsm stop (the 3s poll hasn't caught up). So the post-batch ensure decided
NOOP_HEALTHY and never relaunched — every UI proot-module install left the box
down (Home "Couldn't start") until a manual Retry.

Now it reads liveness from a live probe (RestReadiness.apiReady()): a just-stopped
server reads down immediately → KILL_AND_RELAUNCH; a genuinely healthy env still
reads up → NOOP_HEALTHY, so no double-boot. The decision already runs off the main
thread.

Scope: one line in startEnvironment(). Safe for all its callers — each brings up a
just-stopped server (module batch, rebuild, backup/restore return, clone release,
manual start toggle); none expects NOOP on a live server.

Verification: install a proot module (Books) from the UI → lands on a live Home with
no Retry; log shows startEnvironment → EnvironmentEnsure decision → pdsm start after
PLAY RECAP.

…ot the stale cache

ServerController.startEnvironment() fed EnvironmentEnsure.decide() the cached
ServerStateRepository.alive, which still reads TRUE right after a module batch's
pdsm stop (the 3s poll hasn't caught up), so decide() returned NOOP_HEALTHY and
the box was never relaunched — Home "Couldn't start" until a manual Retry. Read
liveness from a live probe (RestReadiness.apiReady()) instead: a just-stopped
server reads down at once -> KILL_AND_RELAUNCH; a healthy env still reads up ->
NOOP_HEALTHY, so no double-boot. The decision already runs off the main thread.
@luisguzman-adfa
luisguzman-adfa merged commit 1ddf546 into main Aug 26, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-5280-post-batch-fresh-liveness branch August 26, 2026 07:27
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