Skip to content

Fix the shell tests that fail on a desktop run - #17388

Merged
dhh merged 3 commits into
quattrofrom
fix/shell-test-failures
Nov 2, 2026
Merged

dhh merged 3 commits into
quattrofrom
fix/shell-test-failures

Conversation

@omarchybot

@omarchybot omarchybot commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the shell test failures that show up on a current desktop run of ./test/shell, plus two test problems codex found that let tests pass without checking what they claim.

Fixes

  • agent-account-exec-test.sh failed every run. It pointed mise at all of etc/mise, so claude, codex and grok were declared lazy tools. Current mise (2026.10.24) installs a declared lazy tool before it runs the tool's wrapper, so offline the test died fetching claude@latest before it ever reached the fake CLI. It now gets only the wrapper declarations. mise also refuses a wrapper whose tool has no binary, so the three first-run install cases call omarchy-agent-account-exec the way mise hands off to it, with the wrapper directory off PATH.
  • manifest-entrypoints-test.sh failed intermittently under the full suite with rm: cannot remove '…/home/.cache': Directory not empty. QML fixture cleanup killed Quickshell but not the processes it started: the agent usage scanner was still writing home/.cache/omarchy/agent-usage/*, and the plugin directory's inotifywait outlived every run, watching a deleted directory (I found three left over on this machine). Since rm was the trap's last command, set -e failed a test whose checks had all passed. Cleanup now stops the fixture's whole process tree and retries the removal briefly.
  • agent-usage-kimchi-test.sh failed intermittently under the full suite with today's minimax-m3 tokens doubled (1850 instead of 925). The pi scanner counts a reply once per id and timestamp, as a real repeated entry has both. The test built its "repeated" a-1 reply with two reply() calls, each stamping fixture_now() to the millisecond, so when the clock ticked between them they were two replies. It now builds the entry once and writes it twice. Forcing the two stamps apart reproduces the exact failure.
  • dropdown-test.sh didn't test its border cases. It set an unqualified Color.shellValues, which Qt 6.12 resolves to QtQuick's Color type, so the 2px and asymmetric cases ran on the default 1px border. A probe confirmed it: before, all three cases saw {1,1,1,1}; after, they see {1,1,1,1}, {2,2,2,2} and {3,2,5,4}. All 56 cases pass with the real borders. It also clears QT_QPA_PLATFORMTHEME, as lock-poster-test.sh does, so the GTK theme plugin can't try to open a display under the offscreen platform.

Not changed

  • config-test.sh reads the PKGBUILDs from the local omarchy-pkgs checkout. It failed here only because that checkout was on an old branch: current master and rc both install timesyncd.conf.d/10-omarchy.conf, and the test passes against them.
  • passwordless-sudo-indicator-test.sh failed once ("permanent enable must refresh the indicator") in three full-suite runs. It passed 48 times in a row run in parallel under CPU load, so I haven't found the cause and haven't changed it.

Testing

  • ./test/shell with OMARCHY_PKGS_PATH at current omarchy-pkgs master: 416 of 417 files pass. The one failure is the sudo indicator flake above. No inotifywait orphans are left behind afterwards.
  • The 10 tests that use QML fixtures pass. manifest-entrypoints-test.sh passed 32 runs, 8 at a time.
  • codex review --base origin/quattro found no issues in the agent-account, dropdown or fixture-cleanup changes. The Kimchi fixture fix came after that review.

A backport to v4-5-0 follows.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1

dhh and others added 2 commits November 2, 2026 21:37
agent-account-exec-test pointed mise at all of etc/mise, so the agents
were declared lazy tools. Current mise installs a declared lazy tool
before running its wrapper, so offline the test failed fetching
claude@latest before it reached the fake CLI. Give it only the wrapper
declarations. mise also refuses a wrapper whose tool has no binary, so
the first-run install cases now call omarchy-agent-account-exec the way
mise hands off to it, with the wrapper directory off PATH.

The dropdown test set an unqualified Color.shellValues, which Qt 6.12
resolves to QtQuick's Color type, so the 2px and asymmetric border cases
ran on the default border. Use Commons.Color as shell-dev.md says. Clear
QT_QPA_PLATFORMTHEME too, so the GTK theme plugin doesn't try to open a
display under the offscreen platform.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1
The fixture cleanup killed Quickshell and removed its scratch HOME, but
the processes Quickshell had started (the agent usage scanner, the
plugin directory's inotifywait) outlived it. The scanner could still be
writing into home/.cache while rm -rf ran, so cleanup failed with
"Directory not empty", and since that rm was the trap's last command,
set -e failed a test whose checks had all passed. The watchers were
left running against deleted directories after every run.

Stop the whole process tree, and retry the removal briefly for a child
caught mid-write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1
@greptile-apps

greptile-apps Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge, with no new actionable issues found.

Summary

Fixes shell tests that fail on a desktop run.

  • Agent-account tests reach their fake tools without trying to install real ones.
  • QML fixture cleanup stops child processes before removing temporary files.
  • Dropdown tests apply the intended borders in an offscreen run.
  • The Kimchi test gives repeated replies the same ID and timestamp.

No new actionable issues were found in the changes since the previous review. The full PR check found no mounted-rule violations.

Reviews (2) · Last reviewed commit: "Stamp the Kimchi test's repeated reply o..." · Reviewed by Greptile

The pi scanner counts a reply once per id and timestamp, as a real
repeated entry carries both. The test built its repeated a-1 reply with
two reply() calls, each stamping fixture_now() to the millisecond, so
when the clock ticked between them they were two replies and today's
minimax-m3 tokens came out doubled (1850 for 925). Under the full suite
that happened often enough to fail. Build the entry once and write it
twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1
@dhh
dhh merged commit 48956c8 into quattro Nov 2, 2026
2 checks passed
@dhh
dhh deleted the fix/shell-test-failures branch November 2, 2026 21:08
omarchybot added a commit to sanjyay/omarchy that referenced this pull request Nov 3, 2026
quattro's omacom#17388 already makes the Kimchi test stamp its repeated reply once, so take its version of agent-usage-kimchi-test.sh and drop this branch's timestamp change, which conflicted with it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@emirb emirb added this to the 4.6.0 milestone Nov 5, 2026
cursor Bot pushed a commit to mark-groves/omarchy that referenced this pull request Nov 5, 2026
* Keep the agent account and dropdown tests testing what they claim

agent-account-exec-test pointed mise at all of etc/mise, so the agents
were declared lazy tools. Current mise installs a declared lazy tool
before running its wrapper, so offline the test failed fetching
claude@latest before it reached the fake CLI. Give it only the wrapper
declarations. mise also refuses a wrapper whose tool has no binary, so
the first-run install cases now call omarchy-agent-account-exec the way
mise hands off to it, with the wrapper directory off PATH.

The dropdown test set an unqualified Color.shellValues, which Qt 6.12
resolves to QtQuick's Color type, so the 2px and asymmetric border cases
ran on the default border. Use Commons.Color as shell-dev.md says. Clear
QT_QPA_PLATFORMTHEME too, so the GTK theme plugin doesn't try to open a
display under the offscreen platform.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1

* Stop a QML fixture's child processes along with its Quickshell

The fixture cleanup killed Quickshell and removed its scratch HOME, but
the processes Quickshell had started (the agent usage scanner, the
plugin directory's inotifywait) outlived it. The scanner could still be
writing into home/.cache while rm -rf ran, so cleanup failed with
"Directory not empty", and since that rm was the trap's last command,
set -e failed a test whose checks had all passed. The watchers were
left running against deleted directories after every run.

Stop the whole process tree, and retry the removal briefly for a child
caught mid-write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1

* Stamp the Kimchi test's repeated reply once

The pi scanner counts a reply once per id and timestamp, as a real
repeated entry carries both. The test built its repeated a-1 reply with
two reply() calls, each stamping fixture_now() to the millisecond, so
when the clock ticked between them they were two replies and today's
minimax-m3 tokens came out doubled (1850 for 925). Under the full suite
that happened often enough to fail. Build the entry once and write it
twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1

---------

Co-authored-by: David Heinemeier Hansson <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
bamr87 pushed a commit to bamr87/amrchy that referenced this pull request Nov 15, 2026
…m#17388)

Upstream test-only fix, taken ahead of the next upstream sync because the
CI image moved past the synced snapshot (mise installs declared lazy tools
before their wrapper, so agent-account-exec-test failed offline).
Original subject: Fix the shell tests that fail on a desktop run (omacom#17388)

* Keep the agent account and dropdown tests testing what they claim

agent-account-exec-test pointed mise at all of etc/mise, so the agents
were declared lazy tools. Current mise installs a declared lazy tool
before running its wrapper, so offline the test failed fetching
claude@latest before it reached the fake CLI. Give it only the wrapper
declarations. mise also refuses a wrapper whose tool has no binary, so
the first-run install cases now call omarchy-agent-account-exec the way
mise hands off to it, with the wrapper directory off PATH.

The dropdown test set an unqualified Color.shellValues, which Qt 6.12
resolves to QtQuick's Color type, so the 2px and asymmetric border cases
ran on the default border. Use Commons.Color as shell-dev.md says. Clear
QT_QPA_PLATFORMTHEME too, so the GTK theme plugin doesn't try to open a
display under the offscreen platform.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1

* Stop a QML fixture's child processes along with its Quickshell

The fixture cleanup killed Quickshell and removed its scratch HOME, but
the processes Quickshell had started (the agent usage scanner, the
plugin directory's inotifywait) outlived it. The scanner could still be
writing into home/.cache while rm -rf ran, so cleanup failed with
"Directory not empty", and since that rm was the trap's last command,
set -e failed a test whose checks had all passed. The watchers were
left running against deleted directories after every run.

Stop the whole process tree, and retry the removal briefly for a child
caught mid-write.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1

* Stamp the Kimchi test's repeated reply once

The pi scanner counts a reply once per id and timestamp, as a real
repeated entry carries both. The test built its repeated a-1 reply with
two reply() calls, each stamping fixture_now() to the millisecond, so
when the clock ticked between them they were two replies and today's
minimax-m3 tokens came out doubled (1850 for 925). Under the full suite
that happened often enough to fail. Build the entry once and write it
twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01CY6YBoMt9VUxZ6fJqSXaj1

---------

Co-authored-by: David Heinemeier Hansson <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 48956c8)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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