Skip to content

Restart a stale shell before running migrations - #17524

Merged
dhh merged 4 commits into
quattrofrom
restart-shell-before-migrations
Nov 4, 2026
Merged

dhh merged 4 commits into
quattrofrom
restart-shell-before-migrations

Conversation

@dhh

@dhh dhh commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

The shell hot-reloads while an update is still replacing its files, and can settle on a mix of old and new code. A migration that calls an IPC function added since the shell last loaded cleanly gets Function not found. and stops every migration queued behind it, on every retry, until the shell is restarted by hand.

omarchy-update now restarts the shell right before omarchy-migrate whenever migrations are pending, so they talk to current code. An update with nothing to migrate leaves the shell alone until its usual restart at the end.

  • bin/omarchy-update: restart the shell when omarchy-migrate --pending says there is work.
  • docs/update-process.md: the new step in the update sequence.
  • Update tests stub omarchy-restart-shell, and update-sequence-test.sh checks that it runs between the pending check and the migrations and is skipped when the package upgrade fails.

🤖 Generated with Claude Code

The shell hot-reloads while an update is still replacing its files and
can settle on a mix of old and new code. A migration that calls an IPC
function added since then gets "Function not found." and stops every
migration queued behind it, on every retry, until the shell is restarted
by hand. Restart it first whenever migrations are pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no outstanding findings remain.

Summary

Restarts the shell before migrations when work is pending, after system packages finish upgrading.

  • Updates restart the shell before running pending migrations.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Upgrade system packages] --> B{Migrations pending?}
  B -- Yes --> C[Restart shell]
  B -- No --> D[Run migration command]
  C --> D
  D --> E[Continue update]
Loading

Reviews (3) · Last reviewed commit: "Leave the restart-shell stub to the shar..." · Reviewed by Greptile

Comment thread test/shell.d/update-sequence-test.sh Resolved
@dhh
dhh merged commit 9d5e062 into quattro Nov 4, 2026
3 checks passed
@dhh
dhh deleted the restart-shell-before-migrations branch November 4, 2026 13:45
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 4, 2026
* Restart a stale shell before running migrations

The shell hot-reloads while an update is still replacing its files and
can settle on a mix of old and new code. A migration that calls an IPC
function added since then gets "Function not found." and stops every
migration queued behind it, on every retry, until the shell is restarted
by hand. Restart it first whenever migrations are pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Slim down the shell restart comment

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Check the pending migration check runs before the shell restart

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Leave the restart-shell stub to the shared sudo boundary fixture

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Mark Groves <[email protected]>
@emirb emirb added this to the 4.5.1 milestone Nov 5, 2026
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 5, 2026
* Restart a stale shell before running migrations

The shell hot-reloads while an update is still replacing its files and
can settle on a mix of old and new code. A migration that calls an IPC
function added since then gets "Function not found." and stops every
migration queued behind it, on every retry, until the shell is restarted
by hand. Restart it first whenever migrations are pending.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Slim down the shell restart comment

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Check the pending migration check runs before the shell restart

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Leave the restart-shell stub to the shared sudo boundary fixture

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Mark Groves <[email protected]>
omarchybot added a commit to Elshayib/omarchy that referenced this pull request Nov 16, 2026
quattro moved the omarchy-restart-shell stub into the shared sudo boundary fixture (omacom#17524), which conflicted with the systemctl stub this branch adds to update-restart-phases-test.sh. Keep quattro's list and add systemctl to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants