Retry first-run when user finalization fails - #11125
Open
vovarbv wants to merge 1 commit into
Open
Conversation
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.
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.
omarchy-provision-first-runrunsomarchy-provision-userwith|| true, so a failed finalization is neither recorded nor able to affect the outcome: the remaining steps succeed,first-run-usergets marked, and the lifecycle gate at the top then refuses to run again. The user is left permanently half-finalized, with nothing infirst-run.logto say so.Running it through
run_first_run_steplike every other step logs the failure and leaves the marker unwritten, so the next login retries. That is whatdocs/file-layout.mdalready promises for first-run as a whole ("On failure the marker is not written and the sequence retries next login"), and whatomarchy-provision-owneralready does around the same call, warning the user to retry after login.omarchy-provision-userexits 0 whenfinalize-useris 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-installcopies, the unit and settings steps are idempotent.docs/file-layout.mddescribed the|| trueexplicitly, so it is updated alongside.test/shell.d/first-run-test.shgains coverage for both outcomes — it fails onquattroand passes with the change../test/cliand./test/shellshow no other difference from the branch point.