Skip to content

Make shell tests pass from a symlinked checkout, an agent session, and a packaged install - #16570

Merged
dhh merged 1 commit into
quattrofrom
shell-tests-symlink-agent-packaged
Oct 25, 2026
Merged

dhh merged 1 commit into
quattrofrom
shell-tests-symlink-agent-packaged

Conversation

@omarchybot

Copy link
Copy Markdown
Collaborator

Four shell test files failed on a real Omarchy machine for reasons that had nothing to do with the code under test. Three came from the machine running the suite; one is a stale fixture that fails everywhere.

  • plymouth-set — omarchy-plymouth-set refuses a source root that is not already canonical, because it publishes into root-owned paths. base-test.sh built ROOT with pwd, which keeps symlinks, so a checkout reached through one (here ~/Work/omacom/omarchy → ~/omarchy) was refused. ROOT is now resolved with pwd -P. The command's check is unchanged.
  • agent-account-copy — run from inside an agent session, the suite inherited OMARCHY_AGENT_CLAUDE_HOME. The test's fake running claude then looked like it was using that other home, so the import didn't refuse to replace a login in use. base-test.sh now unsets the provider homes (CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME) and the OMARCHY_AGENT_*_HOME pins, next to the XDG unset that guards the same kind of leak.
  • omarchy-kernel — the command runs its root half from the packaged /usr/bin/omarchy-kernel where one is installed, and from the checkout only otherwise. The test expected the checkout path unconditionally, so it failed on any machine with Omarchy installed. It now expects the path the command's own rule picks.
  • platform-setup — the first-run fixture stubbed a hard-coded list of first-run scripts that predates git.sh (Ask for the git identity after first login, with GitHub sign-in #16288). That step failed, so first run never marked itself complete. The fixture now stubs every *.sh in install/user/first-run, so the next new step doesn't break it the same way.

config-test also fails when the local omarchy-pkgs checkout is behind master, because it reads PKGBUILDs from whatever branch that checkout is on. That's the checkout's state, not something to fix here.

🤖 Generated by Opus 5.5 in Claude Code.

…d a packaged install

- base-test resolves ROOT physically, so omarchy-plymouth-set, which refuses a non-canonical source root, accepts a checkout reached through a symlink.
- base-test unsets the agent account homes (CLAUDE_CONFIG_DIR, CODEX_HOME, GROK_HOME and the OMARCHY_AGENT_*_HOME pins), which leaked into agent-account-copy when the suite ran inside an agent session and made a fake running CLI look like it used another home.
- omarchy-kernel-test expects the root half the command actually picks: the packaged /usr/bin/omarchy-kernel where one is installed, else the checkout.
- platform-setup-test stubs every first-run script the repo ships, so first run completes now that git.sh is one of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greptile-apps

greptile-apps Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The changes appear safe to merge.

Summary

Updates shell tests to work from symlinked checkouts, agent sessions, and machines with Omarchy installed.

  • Shell tests use a physical checkout path and ignore agent-session homes.
  • The kernel test checks the root command path the machine selects.
  • First-run fixtures stub every shell script in the checkout.

No actionable issues found. Tests were not run.
Known issue noted by omarchybot: config-test can fail against an outdated local omarchy-pkgs checkout; the author explicitly leaves that checkout-state issue outside this change.

Reviews (1) · Last reviewed commit: "Make shell tests pass from a symlinked c..." · Reviewed by Greptile

@dhh
dhh merged commit 69f0317 into quattro Oct 25, 2026
2 checks passed
@dhh
dhh deleted the shell-tests-symlink-agent-packaged branch October 25, 2026 08:07
omarchybot added a commit to therahul-yo/omarchy that referenced this pull request Nov 1, 2026
quattro (omacom#16570) now exports OMARCHY_PATH=$ROOT itself, so the merge keeps its export and drops the duplicate; what remains of this change is putting the checkout's bin/ ahead of PATH, after quattro's new unset of the agent account homes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@emirb emirb added this to the 4.5 milestone Nov 5, 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.

3 participants