Skip to content

Document actual update hook authorization and orphan cleanup - #14655

Open
VykosMolt wants to merge 3 commits into
omacom:quattrofrom
VykosMolt:docs/update-hook-authorization
Open

VykosMolt wants to merge 3 commits into
omacom:quattrofrom
VykosMolt:docs/update-hook-authorization

Conversation

@VykosMolt

Copy link
Copy Markdown

The hook documentation says cached sudo authorization is cleared before both update hooks. The implementation runs post-update while update authorization remains active; pre-refresh-pacman runs before that authorization starts.

Describe those boundaries consistently in the manual and agent hook guide. Also align the stale design decision with the automatic orphan cleanup deliberately introduced by #14428.

Validation: compared the documented order with the current update implementation and sudo policy; all 117 CLI checks pass. This changes documentation only.

Addresses the documentation finding in review #9454.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This documentation-only PR appears safe to merge.

Summary

This documentation-only PR brings hook and orphan-cleanup descriptions closer to the current code.

  • The hook guides explain when update hooks run and which sudo authorization they can use.
  • The update-process note distinguishes automatic orphan removal from standalone cleanup.

Reviews (2) · Last reviewed commit: "Describe update hooks as sharing ordinar..." · Reviewed by Greptile

@omarchybot omarchybot added documentation Improvements or additions to documentation verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 16, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I checked each statement in this change against quattro as it stands now. None of the three files is code, so nothing needed running. All three statements hold. post-update runs after system packages, migrations, orphan cleanup and the service restarts, and the update's sudo authorization is still active while it and mise run. That authorization ends before AUR updates and is revoked again on exit. pre-refresh-pacman runs with the authorization already cleared, behind the no-update wrapper, and the refresh revokes the timestamp again before its transaction. The orphan helper behaves as the new line in docs/update-process.md describes. docs/update-process.md already describes the shared authorization, which #13323 introduced on purpose, so the hook guide and the manual were the stale ones. The branch also merges cleanly onto the current quattro.

A second review by Codex at medium effort checked the same claims against the code and found nothing wrong. It also could read this session's working notes, so it may not have been fully independent.

One thing for the maintainer: #14914 changes the code the other way. It ends the update's authorization before post-update and mise, because mise can download and run installer code. Whichever of the two lands second would leave these hook docs wrong. If #14914 is chosen, the hook text here needs rewriting, but the orphan-cleanup correction still applies. This pull request now waits on the maintainer's decision.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 31, 2026
omarchybot and others added 2 commits November 1, 2026 18:25
quattro now uses ordinary sudo (omacom#17000) and runs AUR updates under the update's one authorization (omacom#16568), and its hooks.md already describes that. Keep quattro's paragraph there and this branch's corrected post-update tree comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since omacom#17000 neither omarchy update nor omarchy refresh pacman clears its sudo timestamp, and AUR updates share the update's one authorization (omacom#16568), so nothing is cleared before AUR and a hook's sudo can reuse what was already asked for. It can, not does: a standalone refresh has no keepalive, so a hook that waits past the ten-minute timestamp prompts again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had stopped merging after quattro moved to ordinary sudo in #17000. That change also made some of this branch's wording wrong. Omarchy no longer clears the sudo timestamp before either hook, and AUR updates now run under the update's single authorization (#16568). I merged quattro into the branch and pushed two commits:

  • default/agents/skills/omarchy/hooks.md: in the conflict I kept quattro's paragraph, which Use ordinary sudo: one password for ten minutes, plain update scripts #17000 had already rewritten correctly, and kept your corrected post-update.d tree comment.
  • manual/31-dotfiles.md: replaced both paragraphs with one sentence. Both update hooks run as your user, and a hook's sudo can reuse the authorization the update or refresh already asked for. It says "can" because a standalone omarchy refresh pacman has no keepalive, so a hook that waits more than the 10-minute timestamp will be asked for a password again.
  • docs/update-process.md: your orphan-cleanup line was still accurate and is unchanged.

Every statement was checked against quattro at bbfdfddb2: the step order in bin/omarchy-update and its keepalive, the sudo cp steps right before the hook in bin/omarchy-refresh-pacman, etc/sudoers.d/omarchy-sudo-timeout, bin/omarchy-hook, and the -y and noninteractive paths in bin/omarchy-update-orphan-pkgs. All three files are Markdown, so nothing was run.

Codex Medium and muse-wonder (via pi, thinking high) reviewed the port. Codex found that my first wording, "doesn't ask again", was too absolute for a standalone refresh, and that is what the "can" fixes. The second round, on the current head 371c70fc7, came back clean from both. They could read this session's notes, so their agreement is not guaranteed to be independent. It is now waiting on the maintainer.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants