Repository navigation
Correct the sudo authorization timing described for update hooks - #14135
Ashwinhegde19 wants to merge 6 commits into
Conversation
[Low impact] The documentation changes appear safe to merge. SummaryUpdates hook documentation to match the current update flow.
Reviews (6) · Last reviewed commit: "Merge quattro: describe hook sudo under ..." · Reviewed by Greptile |
chessing234
left a comment
There was a problem hiding this comment.
everything seems fine, ready to merge.
quattro now runs omarchy-update-boot after AUR, cold behind the no-update wrapper, so AUR is no longer the only stage outside the update's authorization, and post-update runs before mise rather than after every sudo-capable stage. A post-update hook that runs omarchy refresh pacman (or another command that revokes) loses the shared authorization, so "does not prompt" needs that exception. Packaged installs do not ship docs/, so the skill points at the Omarchy repo as theming.md does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
Thanks for this. I checked both paragraphs against the code on I pushed one commit to your branch, 02477d9, because
Codex Medium reviewed it as a second opinion. Its first round found the mise ordering and the refresh-pacman exception above, and its second round found nothing left. Independence isn't guaranteed, since it can read this session's notes. Greptile passes on the new head. This now waits on the maintainer. |
… refresh guarantee to the refresh The hook tree said post-update runs "after privileged work", but mise, the AUR builds and the boot check all follow it. And the promise that a detached child left by pre-refresh-pacman has nothing to wait for holds only during the refresh: a channel switch goes on to run omarchy update, which opens a reusable authorization. Co-Authored-By: Omarchybot <317366263+omarchybot@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I pushed 7494e90 to this branch. It folds in two corrections to
Nothing runs in this change, so no worker was used. Every statement in both files was checked against #14655 corrects the same two files for the same problem and also carries |
omacom#17000 replaced the update's revoke-and-wrap sudo boundary with ordinary sudo and a ten-minute timestamp that no Omarchy command clears, and omacom#16568 moved AUR and the boot check inside the update's authorization. The cold-boundary wording this branch added is now wrong, so hooks.md takes quattro's paragraph, which already says hooks run inside the update's authorization. Two stale lines remain on quattro and are fixed here: the hook tree's "after privileged work" for post-update, which mise, AUR and the boot check all follow, and the manual's claim that update hooks run after Omarchy clears its sudo authorization and may prompt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
I pushed 737ddab to this branch. It merges current So the merge resolves the conflict in
The pull request description still describes the old boundary ( This is Markdown only, so nothing was run; I checked both lines by reading them against #14655 and #15805 fix the same issue and now conflict with |
Closes #14134.
What
Two lines about update hooks still describe a sudo boundary that no longer exists:
default/agents/skills/omarchy/hooks.md: the hook tree saidpost-update.d/runs "after privileged work". Mise, AUR packages and the boot check all follow it, and all can use sudo. It now says the hook runs near the end ofomarchy update, before those three.manual/31-dotfiles.md: said both update hooks run after Omarchy clears its sudo authorization and may ask for a password. It now says they run right after Omarchy has usedsudoitself, so asudoin a hook reuses that authorization and doesn't ask again.Why
On
quattro,bin/omarchy-updateauthorizes once after confirmation and keeps the timestamp fresh through the boot check (#16568 brought AUR and the boot check inside; #17000 replaced the revoke-and-wrap boundary with ordinary sudo and a 10-minute timestamp that no Omarchy command clears).bin/omarchy-refresh-pacmanruns itssudo cpcalls immediately before thepre-refresh-pacmanhook. Neither hook runs cold.docs/update-process.mdalready says this; these two lines didn't.The old wording is wrong in the direction that matters: someone who reads it and hardens a hook on the assumption that
sudowill prompt gets a hook that runs privileged commands without one.Scope
Markdown only, no code or behaviour change. Checked by reading against
bin/omarchy-update,bin/omarchy-refresh-pacman,etc/sudoers.d/omarchy-sudo-timeoutanddocs/update-process.mdonquattroat 5fa15f2.Out of scope, noted for a separate change: line 35 of the manual says every executable file in a hook directory runs, but
bin/omarchy-hookruns every regular file except.samplethrough Bash regardless of the executable bit.History
Opened against the earlier boundary (
pre-refresh-pacmancold behind the no-update wrapper, AUR outside the authorization). The branch has since been merged withquattrotwice and reduced to the two lines above. #14655 and #15805 address the same issue and currently conflict withquattro.