Skip to content

Flag a reboot when the docker group changes - #8080

Merged
dhh merged 1 commit into
quattrofrom
sudoless-docker-reboot
Aug 24, 2026
Merged

dhh merged 1 commit into
quattrofrom
sudoless-docker-reboot

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

Follow-up to #8056.

Group membership is fixed at login, so removing (or adding) the docker group does not take effect in the running session — after the opt-in migration a user still has docker access until they log out. So the group-change paths now flag a reboot.

omarchy-setup-security-sudoless-docker and omarchy-remove-security-sudoless-docker call omarchy-state set reboot-required after changing the group. Since omarchy update runs omarchy-migrate before omarchy-update-restart, the existing-user migration (which reuses the removal command) trips the same flag and the user gets the "Updates require reboot" prompt that actually applies the change; the bar shows it pending too. A plain log out and back in still works, and the notices say so.

The migration test now exercises the real removal command and omarchy-state instead of a stub, asserting the reboot flag is set on removal and left alone when the user is already out of the group.

🤖 Generated by Opus 4.8 in Claude Code.

Group membership is fixed at login, so removing (or adding) the docker group
does not take effect in the running session. The existing-user migration and the
Setup > Security toggles now call `omarchy-state set reboot-required`, so
omarchy-update-restart prompts for the reboot that actually applies the change
(and the bar shows it pending). A plain log out and back in still works.

The migration test now exercises the real removal command and omarchy-state
rather than a stub, asserting the reboot flag is set on removal and left alone
when the user is already out of the group.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gb7x6poap4hGCndPx5qt5T
Copilot AI balanced review requested due to automatic review settings August 24, 2026 17:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Flags Docker group membership changes as reboot-required and verifies migration behavior.

Changes:

  • Marks sudoless Docker setup/removal as requiring reboot.
  • Tests migration removal, reboot state, and idempotency.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
bin/omarchy-setup-security-sudoless-docker Flags group addition for reboot.
bin/omarchy-remove-security-sudoless-docker Flags group removal for reboot.
test/shell.d/docker-group-migration-test.sh Exercises real removal and reboot state behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@dhh
dhh merged commit 1565919 into quattro Aug 24, 2026
4 checks passed
@dhh
dhh deleted the sudoless-docker-reboot branch August 24, 2026 17:32
omarchybot added a commit that referenced this pull request Aug 24, 2026
Backport of the reboot flag (PR #8080, merged to quattro as 1565919) onto the
v4-0-1 release branch, on top of the #8056 backport it follows.

Group membership is fixed at login, so removing (or adding) the docker group
does not take effect in the running session. The existing-user migration and the
Setup > Security toggles now call omarchy-state set reboot-required, so
omarchy-update-restart prompts for the reboot that actually applies the change
and the bar shows it pending. A plain log out and back in still works.

The migration test now exercises the real removal command and omarchy-state
rather than a stub, asserting the reboot flag is set on removal and left alone
when the user is already out of the group.

Clean cherry-pick on top of the #8056 backport: all three files are
byte-identical to quattro, so merging v4-0-1 into quattro resolves without a
conflict. omarchy-state and omarchy-update-restart are unchanged on this branch
and read the same ~/.local/state/omarchy/reboot-required marker. test/shell
passes: 186 files.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018DEMYa9UWtroz93DhMTtcV
omarchybot added a commit that referenced this pull request Aug 25, 2026
… menu entry (backport of #8098)

Backport of the sudoless Docker follow-up (PR #8098, merged to quattro as
06a3dbc) onto the v4-0-1 release branch, on top of the #8056 and #8080
backports it follows.

Group membership only takes effect on a fresh session, and in practice a logout
or newgrp is not enough -- only a reboot reliably applies it. The setup and
remove commands now flag the reboot and offer to do it right away with a gum
confirm, the same shape as the GPU toggle, and their notices say "after a
reboot" instead of pointing at logout or newgrp. The existing-user migration
reuses the removal command inside omarchy update, so it passes
OMARCHY_DEFER_REBOOT to skip the prompt there and lets omarchy-update-restart
handle the reboot once the whole update has finished.

Setup > Security showed Sudoless Docker under both Setup and Remove, and the
guards tested the running session's groups, which do not change until the
reboot: after enabling sudoless Docker the menu still offered Setup, the one
action that could no longer do anything, while Remove stayed hidden. Add
omarchy-sudo-docker as the single answer to both questions that differ in that
window -- by default whether this session can reach the socket, which is what
decides if a command must elevate, and with --configured whether the account is
set up for it, which is what the menu and the toggles need. It succeeds when
sudo is needed, so the Setup entry appears while sudoless Docker is off and
Remove once it is on. lazydocker and the Windows VM keep prompting until the
reboot lands.

Clean cherry-pick on top of the earlier backports: every file is byte-identical
to quattro except default/omarchy/omarchy-menu.jsonc, which merged into this
branch's menu and whose two Sudoless Docker lines match quattro exactly.
test/shell passes: 188 files, including the two this adds. test/cli passes, so
the new command's metadata is well-formed. Exercised the helper here: with no
socket it reports sudo is needed, and --configured answers from the account's
groups.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_018DEMYa9UWtroz93DhMTtcV
nick1udwig pushed a commit to nick1udwig/omarchy that referenced this pull request Sep 9, 2026
Group membership is fixed at login, so removing (or adding) the docker group
does not take effect in the running session. The existing-user migration and the
Setup > Security toggles now call `omarchy-state set reboot-required`, so
omarchy-update-restart prompts for the reboot that actually applies the change
(and the bar shows it pending). A plain log out and back in still works.

The migration test now exercises the real removal command and omarchy-state
rather than a stub, asserting the reboot flag is set on removal and left alone
when the user is already out of the group.


Claude-Session: https://claude.ai/code/session_01Gb7x6poap4hGCndPx5qt5T

Co-authored-by: David Heinemeier Hansson <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
@emirb emirb added this to the 4.5 milestone Oct 17, 2026
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.

4 participants