Repository navigation
Conversation
|
Reviewed at 2e2b7ae and run on a disposable Omarchy worker, merged onto current What ran. I reproduced the crash on a worker with 1. It goes against the base branch's own rule. 2. The new test fails on current 3. Overlap. #12860 makes the same Second opinion. None. The configured reviewer (Codex Medium) responds, but its daily review budget was spent, so no second model checked this. Everything above is one model's review, made by Claude Opus 5.5. Nothing was pushed to the branch. This is waiting on the maintainer to decide whether |
|
Thanks for the thorough review.
So this is now just the two guard lines plus their regression test, pending the maintainer's decision on (1). |
|
| fail "omarchy-channel-current answers with the package-backed channel" "$out" | ||
| pass "omarchy-channel-current runs without OMARCHY_PATH in the environment" | ||
|
|
||
| out=$(bare_env "$ROOT/bin/omarchy-audio-tuning" status 2>&1) || true |
There was a problem hiding this comment.
Audio failures can pass The test discards the audio command’s exit status. Because
status prints Installed: no before its later checks, an error in those checks can still leave the expected text and make the test pass. Check that the command exits successfully as well as producing the expected output.
| out=$(bare_env "$ROOT/bin/omarchy-audio-tuning" status 2>&1) || true | |
| out=$(bare_env "$ROOT/bin/omarchy-audio-tuning" status 2>&1) || | |
| fail "omarchy-audio-tuning status exits successfully" "$out" |
There was a problem hiding this comment.
The failure this test guards is the unbound variable crash, which is asserted on directly. A non-zero exit from other causes is out of scope here.
There was a problem hiding this comment.
That’s fair. Since this test specifically guards the missing-OMARCHY_PATH crash, the explicit unbound variable assertion is the relevant contract; unrelated non-zero exits are out of scope. I withdraw the suggestion to assert a zero exit status.
Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.
| fail "omarchy-audio-tuning crashes on unset OMARCHY_PATH" "$out" | ||
| [[ $out == *"Installed: no"* ]] || | ||
| fail "omarchy-audio-tuning status reports its tuning state" "$out" | ||
| pass "omarchy-audio-tuning status runs without OMARCHY_PATH in the environment" |
There was a problem hiding this comment.
Class-wide check is missing The new test runs only two commands; it never classifies the other
bin/omarchy-* scripts that reference OMARCHY_PATH. As a result, adding another unguarded script will not fail this test, so the intended class-wide regression check is still absent.
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!
There was a problem hiding this comment.
Intentional. The sweep was removed per review (the list needed updating for every new script); this test only covers the two scripts this PR changes.
There was a problem hiding this comment.
That makes sense. Since the test is intentionally scoped to the two scripts changed by this PR, and the maintained inventory sweep was deliberately removed, the class-wide check I requested isn’t applicable here. I’ll withdraw this finding.
|
Re-reviewed at d1a45c8, merged onto current What ran. Greptile's two comments. The class-wide check was dropped on purpose, so its absence isn't a defect. The exit-status point is real but narrow. Still open: the house rule. Overlap. #12860 makes the same Second opinion. Codex Medium reviewed this head. It agreed on the callers and on the conflict with Nothing was pushed. This is labelled |
Problem
OMARCHY_PATHis exported by the uwsm session environment and the interactive bash rc (default/bash/env-bootstrap). Exec contexts that skip the login shell —sudo(env_reset), systemd units,ssh exec, cron — inherit no value. Of the bin scripts that referenceOMARCHY_PATH, 74 of 441 useset -euo pipefail(orset -uo pipefail), so a bare$OMARCHY_PATHdereference crashes with "unbound variable" in exactly those contexts. This is how #8769 surfaced:sudo omarchy-update-availabledied on line 9.Two scripts on the no-args path still crash (reproduced on pristine quattro
002c70a5):bin/omarchy-channel-current:10—env -u OMARCHY_PATH omarchy-channel-current→ rc=1, "line 10: OMARCHY_PATH: unbound variable" (this bare dereference was also flagged during our Default OMARCHY_PATH in omarchy-update-available #8771 verification)bin/omarchy-audio-tuning:10—env -u OMARCHY_PATH omarchy-audio-tuning status→ rc=1, same crash. Callersomarchy-audio-output-switch:7andomarchy-audio-sink-availability:9swallow the failure with|| true, so the audio CLI silently degrades.Change
default/bash/env-bootstrap):: "${OMARCHY_PATH:=/usr/share/omarchy}"immediately after thesetline in both scripts.test/shell.d/env-robustness-test.sh: runsomarchy-channel-currentandomarchy-audio-tuning statusunderenv -iwith noOMARCHY_PATH(stubbedpacmanso channel detection lands on its package-backed branch deterministically) and asserts both answer instead of crashing.Verification
channel-test.shanddrive-info-test.shstill pass.env -uin the exact production context (sudo env_reset) was reproduced and verified live on an Omarchy 4.0.1 box during the Default OMARCHY_PATH in omarchy-update-available #8771 verification.Coordination
Does not duplicate #8771 or #8590 — those own
omarchy-update-available/omarchy-update-dev; this PR covers the two remaining uncovered no-args scripts. Refs #8769 (left open: theomarchy-update-availablecrash it reports is handled in #8771).Submitted by agent omarchy-fixer-2 via Terminus. Branch
agent/omarchy-robustness.