Repository navigation
Conversation
[Medium impact] The changes reach the Omarchy update workflow and the tools it updates. The test changes must meet the repository’s explicit requirements before merging. Findings
SummaryThe PR defaults
Reviews (3) · Last reviewed commit: "Default OMARCHY_PATH in omarchy-update b..." · Reviewed by Greptile |
chessing234
left a comment
There was a problem hiding this comment.
everything seems fine, ready to merge.
|
Thanks @chessing234 — glad the default |
|
Reproduced on a stock packaged install today (2026-10-10), Omarchy 4.0.4-1. The interactive shell already had
That is the #8239 crash. The helper default in this PR is the right fix for The new default in Please treat the entry-point default as incomplete until a root-started update either drops back to the invoking user for the home-directory steps (mise, and migrations that write to |
|
Thanks @georgeanderson — the 4.0.4 reproduction matches the #8239 crash this PR started from, and the #13329 point is right. The I don't have merge rights on Happy to follow a maintainer's choice — drop back to the invoking user before mise/migrations that write |
|
Reviewed at 57621d6 against The reported crash can't happen through
Nothing was pushed to this branch, because both fixes are design choices rather than contained defects. Codex reached the same two findings and the same reading of the source-root guard; its independence from this review is not guaranteed. It also pointed out the |
|
Thanks @omarchybot — both findings match what we already flagged, and I agree this should not merge as written. Entry-point default. The worker check is right: on
Nothing further from me until a maintainer decides how a root-started update should behave. After that I can rework the mise change to match, without defaulting |
pkexec and other scrubbed environments leave OMARCHY_PATH unset, so omarchy-update-dev aborts under set -u before any packages are touched. Use the same packaged-install default as omarchy-migrate. omarchy update -y still hung on mise's config-trust prompt. Honor OMARCHY_UPDATE_UNATTENDED with mise up --yes so the promise not to ask holds after pacman and migrations. Fixes omacom#14325
pkexec strips the login environment, and omarchy_security_require_source_root runs in omarchy-update before omarchy-update-dev. Defaulting the path only in the helper left `pkexec omarchy-update -y` exiting with "OMARCHY_PATH does not match this Omarchy command." Set the packaged default at the entry point; the existing check still rejects any other value.
57621d6 to
3e64f75
Compare
| default_line=$(grep -n 'export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"' "$ROOT/bin/omarchy-update" | head -1 | cut -d: -f1) | ||
| check_line=$(grep -n 'omarchy_security_require_source_root' "$ROOT/bin/omarchy-update" | head -1 | cut -d: -f1) | ||
| [[ -n $default_line && -n $check_line && $default_line -lt $check_line ]] || | ||
| fail "update entry point defaults OMARCHY_PATH before the source-root check" |
There was a problem hiding this comment.
The new assertion greps for the exact assignment instead of running omarchy-update with OMARCHY_PATH unset. It can pass even if the entry point still fails. AGENTS.md explicitly forbids tests that restate source edits. Before merging, replace this check with a test that exercises the entry point and checks its behavior.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
|
||
| set -euo pipefail | ||
|
|
||
| source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" |
There was a problem hiding this comment.
Update tests are unnecessarily split
This adds a separate test file even though update-sequence-test.sh already covers omarchy-update-mise. AGENTS.md requires extending the area's existing tests rather than adding another *-test.sh. Before merging, move these argument checks into the existing update tests.
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| # has to be established here or the check exits before the helper runs. | ||
| default_line=$(grep -n 'export OMARCHY_PATH="${OMARCHY_PATH:-/usr/share/omarchy}"' "$ROOT/bin/omarchy-update" | head -1 | cut -d: -f1) | ||
| check_line=$(grep -n 'omarchy_security_require_source_root' "$ROOT/bin/omarchy-update" | head -1 | cut -d: -f1) | ||
| [[ -n $default_line && -n $check_line && $default_line -lt $check_line ]] || |
There was a problem hiding this comment.
Numeric comparison breaks required style
The new condition uses -lt inside [[ ]]. AGENTS.md requires numeric comparisons to use (( )). If this assertion is retained, move the comparison of default_line and check_line into an arithmetic condition before merging.
| [[ -n $default_line && -n $check_line && $default_line -lt $check_line ]] || | |
| [[ -n $default_line && -n $check_line ]] && (( default_line < check_line )) || |
File Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
|
Looked at this again at 3e64f75 against What changed on
#8590 makes the same Nothing was run for this pass. The code is unchanged since the worker run at 57621d6, and these findings come from reading the code against |
Summary
pkexec omarchy-update -ycurrently dies immediately becauseomarchy-update-devreads$OMARCHY_PATHunderset -uafter polkit strips the login environment. After that,-ystill hangs on mise's config-trust prompt even though-yis documented as a promise not to ask.Changes
omarchy-update-devdefaultsOMARCHY_PATHto/usr/share/omarchy, matchingomarchy-migrate. Packaged installs still skip the git pull.omarchy-update-miserunsmise up --yeswhenOMARCHY_UPDATE_UNATTENDED=1.Fixes #14325
Tests
test/shell.d/update-dev-test.shtest/shell.d/update-mise-unattended-test.sh