Skip to content

fix: stop the install script re-running on the installed disk - #39

Merged
NovusEdge merged 1 commit into
mainfrom
lifecycle-race-fixes
Aug 10, 2026
Merged

fix: stop the install script re-running on the installed disk#39
NovusEdge merged 1 commit into
mainfrom
lifecycle-race-fixes

Conversation

@NovusEdge

Copy link
Copy Markdown
Owner

Three fixes surfaced by an end-to-end run of the automated lifecycle.

The install-script race (the exit-99 and the no-input desktop). setup-disk -m sys copies the live system onto the disk, including /etc/local.d/stoat-install.start. On the disk boot, that script's /mnt/work/.installed guard fails — the 9p work share is not mounted yet — so it re-runs setup-alpine. The re-run's apk races the apply's xfce recipe for the database lock, the recipe fails exit 99, and setup-devd udev never runs, so Xorg gets no input. A disk-root guard now makes the script exit immediately on the installed disk (ext4 root); only the installer's tmpfs/overlay root proceeds.

Reboot-once gated to disk mode. Apply's reboot finalize fired for any mode. A live VM's root is a tmpfs the reboot wipes, and a live VM re-applies every boot, so a reboot there would loop. Now disk-only; a live desktop recipe restarts its session in place (kill -HUP 1).

Vertical centering. The frame anchored to the top; the user prefers it centered on both axes. Content taller than the terminal still falls back to a top anchor so nothing clips.

Tests: TestApplyDoesNotRebootALiveVM pins the mode gate; the reboot-positive test moves to a disk VM. just check and just test pass.

setup-disk -m sys copies the live system, including
/etc/local.d/stoat-install.start, onto the installed disk. On the disk boot
the script's /mnt/work/.installed guard failed, because the 9p work share is
not mounted yet, so it re-ran setup-alpine. That apk activity raced the
recipe apply for the database lock, so the apply failed exit 99 and the udev
switch never landed. A disk-root guard now makes the script exit at once on
the installed disk; only the installer's tmpfs root proceeds.

Also gate the reboot-once finalize to disk mode: a live VM's root is a tmpfs
the reboot wipes, and a live VM re-applies every boot, so a reboot there
would loop.

Also center the TUI frame on both axes, the user's preference over the
top-anchored frame.
@NovusEdge NovusEdge added the bug Something isn't working label Aug 10, 2026
@NovusEdge NovusEdge self-assigned this Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@NovusEdge, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3ec34b93-52e2-48f0-bb67-56732b930d8e

📥 Commits

Reviewing files that changed from the base of the PR and between 893b742 and c065c18.

📒 Files selected for processing (4)
  • internal/apkovl/apkovl.go
  • internal/core/apply.go
  • internal/core/apply_reboot_test.go
  • internal/tui/app.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NovusEdge
NovusEdge merged commit ca2e2df into main Aug 10, 2026
8 checks passed
@NovusEdge
NovusEdge deleted the lifecycle-race-fixes branch August 10, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant