Skip to content

Retry first-run when user finalization fails - #11125

Open
vovarbv wants to merge 1 commit into
omacom:quattrofrom
vovarbv:fix/first-run-finalize-failure
Open

Retry first-run when user finalization fails#11125
vovarbv wants to merge 1 commit into
omacom:quattrofrom
vovarbv:fix/first-run-finalize-failure

Conversation

@vovarbv

@vovarbv vovarbv commented Sep 10, 2026

Copy link
Copy Markdown

omarchy-provision-first-run runs omarchy-provision-user with || true, so a failed finalization is neither recorded nor able to affect the outcome: the remaining steps succeed, first-run-user gets marked, and the lifecycle gate at the top then refuses to run again. The user is left permanently half-finalized, with nothing in first-run.log to say so.

Running it through run_first_run_step like every other step logs the failure and leaves the marker unwritten, so the next login retries. That is what docs/file-layout.md already promises for first-run as a whole ("On failure the marker is not written and the sequence retries next login"), and what omarchy-provision-owner already does around the same call, warning the user to retry after login.

omarchy-provision-user exits 0 when finalize-user is already marked, so the guard was only ever reached by a real failure in the catch-up case the call exists to cover. Retrying is safe: omarchy-hook-install copies, the unit and settings steps are idempotent.

docs/file-layout.md described the || true explicitly, so it is updated alongside.

test/shell.d/first-run-test.sh gains coverage for both outcomes — it fails on quattro and passes with the change. ./test/cli and ./test/shell show no other difference from the branch point.

omarchy-provision-first-run ran omarchy-provision-user with `|| true`, so a
failed finalization was neither recorded nor allowed to affect the outcome:
the remaining steps succeeded, first-run-user got marked, and the lifecycle
gate then refused to run again. The user was left permanently half-finalized
with nothing in first-run.log to say so.

Run it through run_first_run_step like every other step. Failure is logged
and leaves the marker unwritten, so the next login retries, which is what
docs/file-layout.md already promised for first-run as a whole, and what
omarchy-provision-owner already does with the same call.

Finalization exits 0 when it has already run, so the guard was only ever
reached by a real failure in the catch-up case it exists to cover.
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