Skip to content

Keep the runtime smoke test's shell off the machine's platform root - #15385

Open
scottjones wants to merge 2 commits into
omacom:quattrofrom
scottjones:test/runtime-smoke-platform-root
Open

scottjones wants to merge 2 commits into
omacom:quattrofrom
scottjones:test/runtime-smoke-platform-root

Conversation

@scottjones

@scottjones scottjones commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

runtime-smoke's copy of the shell reads /usr/share/omarchy-platform from the machine running the test: display-cutouts.json (shell/plugins/bar/Bar.qml) and audio.json (shell/Commons/AudioNodes.qml). On a MacBook with a notch, the test's bar lays itself out around the cutout, so the test checks a different layout there than everywhere else.

The test now rewrites that path in its shell copy to an empty fixture root, the same way platform_root_copy keeps commands off the host's files. If the shell ever stops naming the platform root, the rewrite does nothing instead of stopping the test.

When I opened this, the notched layout failed "runtime geometry keeps update before indicators". Since #15517 reworked the bar sections, that check passes on a notched Mac either way, so this is about the test checking the same layout on every machine, not a red result.

@maralcbr spotted that this still applied to quattro, pointed it here from omacom#695, and suggested the || true on the grep. He also suggested a shared shell-copy helper. I've left that for a follow-up, since four tests copy the shell.

Evidence

@omarchybot verified it on a worker with a 40-row cutout file: on quattro the bar dropped to y 7 and the clock moved beside the cutout (x 978 instead of 581). With this change the geometry matched a machine with no cutout file. Since the change is only these lines, reverting it brings the leak back.

On an M2 Max (notched panel, real display-cutouts.json), runtime-smoke passes 22/22 on quattro (5fcdaca) and with this change merged onto it.

Merge Danger

Door: two-way

Blast Radius: test-only

🤖 Generated with Claude Code

The shell reads /usr/share/omarchy-platform at fixed paths, and the bar
lays itself out around a camera cutout the platform describes there. Run
on a MacBook with omarchy-mac installed, the test's shell found the
panel's notch, laid the bar out beside it, and failed "runtime geometry
keeps update before indicators". The test's copy of the shell now reads an
empty fixture root instead, as platform_root_copy does for commands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Oct 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed and verified on a worker VM, with this branch merged onto current quattro (cce8b1c), since #15297 and #15298 have both landed.

The leak is real. I installed a /usr/share/omarchy-platform/display-cutouts.json describing a 40-row cutout on the worker's panel. On quattro, the test's copy of the shell picked it up: the bar dropped to y 7 and the clock moved beside the cutout (x 978 instead of 581). With this change the geometry was identical to a machine with no cutout file. Reverting it brings the leak back, since the change is only these lines.

The failure it names no longer happens on quattro. Since #15517 reworked the bar sections, the assertion (now "runtime geometry hangs indicators and update off the clock's box") passes with the cutout installed, both with and without this change. So what this fixes today is the test checking a different layout on a notched machine than everywhere else, not a red result. The change is 9 test-only lines, which is about right for that. It also covers shell/Commons/AudioNodes.qml, which reads audio.json from the same root.

Tests: ./test/cli passes. bar-notch-test.sh passes, 99 of 99. runtime-smoke-test.sh stops before the geometry check on the worker, at "keepLoaded fixture service IPC responds", on quattro and on this branch alike, so that failure has nothing to do with this change. To reach the geometry check, I ran a copy of the test with only the keepLoaded block removed.

Second opinion: none. The configured reviewer, Codex Medium, answers, but omabot's review budget for the day was used up before this pull request, so only Claude Opus 5.5 has reviewed it. Codex Medium did agree on the classification, which is run separately. This now waits on the maintainer and a second review. Nothing is needed from you.

@scottjones

Copy link
Copy Markdown
Contributor Author

Thanks for checking it on a worker. Agreed on the reclassification: since #15517 the named check passes either way, so I've updated the description to say this keeps the test on the same layout on a notched machine, and to mention audio.json. No code change. On an M2 Max it's 22/22 on quattro and with this branch; the keepLoaded stop you saw on the worker doesn't happen here.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 31, 2026
quattro moved the smoke test's shell copy into setup_scratch_shell (omacom#16339), so the platform-root rewrite now runs on $SCRATCH_ROOT/shell right after it, with the fixture under $SCRATCH_DIR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had stopped merging into quattro: #16339 moved the smoke test's shell copy into setup_scratch_shell in test/shell.d/base-test.sh, so the block this pull request edits is gone. I merged quattro into the branch and pushed it as 78e425d. The same rewrite now runs on $SCRATCH_ROOT/shell straight after setup_scratch_shell, with the empty fixture at $SCRATCH_DIR/platform. Your change is otherwise as it was, and it still applies only to the smoke test. Moving it into setup_scratch_shell would change what the four budget tests measure, so that stays with the follow-up you planned.

Checked again on a worker VM, at the merged head. With a display-cutouts.json for a 40-row cutout installed, quattro's test shell put the bar at y 7 and the clock at x 993 or 1035. The merged head gave y 0 and clock x 588, the same as with no cutout file. Reverting the change leaves the file exactly as it is on quattro, so the leak comes back. ./test/cli passes.

Two things on quattro itself, neither caused by this change:

  • On the worker, runtime-smoke-test.sh still stops at "keepLoaded fixture service IPC responds", on quattro and on this branch alike. To reach the geometry check I ran a copy of the test with only the keepLoaded assertions disabled.
  • "default bar layout renders each widget in its configured section" fails intermittently. The wait loop above it (runtime-smoke-test.sh:517) stops as soon as every widget has a geometry row, not once they have been laid out, so it can catch a snapshot where every widget is hidden with width 0. quattro failed this way in 3 of 9 runs with no cutout file. Because this change gives every machine that no-cutout layout, a notched Mac will now hit the race as often as everyone else does. It needs its own fix: wait until the layout check passes.

Second opinion: Codex Medium and muse-wonder (via pi, thinking high) reviewed the merge. Both agreed the rewrite runs before the scratch shell starts, catches every reference to the platform root in the copy, and touches nothing outside the scratch directory. Both also agreed the geometry race was already on quattro before this change. Their independence from my review is not guaranteed. Codex also pointed out that a TMPDIR containing |, & or spaces would break the sed. I left that alone, because mktemp -d paths never contain those characters and platform_root_copy in base-test.sh makes the same assumption.

This is verified. It is not marked ready because the runtime smoke suite isn't green on a worker, for the quattro reasons above. It now waits on the maintainer. Nothing is needed from you.

@greptile-apps

greptile-apps Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Low impact] The change affects only the runtime smoke test's shell copy.

The PR appears safe to merge, with a non-blocking fix needed for temporary paths containing spaces.

Findings

  1. P2 Spaces stop the smoke test ▶

Summary

The smoke test now rewrites platform paths in its copied shell to an empty fixture directory.

  • The runtime smoke test uses an empty platform root for its shell copy.

scottjones explicitly deferred a shared shell-copy helper to a follow-up because four tests copy the shell. scottjones also explicitly made no grep matches acceptable so removing the fixed platform path does not stop the test.

Reviews (1) · Last reviewed commit: "Merge quattro into test/runtime-smoke-pl..." · Reviewed by Greptile

Comment on lines +22 to +23
{ grep -rlF /usr/share/omarchy-platform "$SCRATCH_ROOT/shell" || true; } |
xargs -r sed -i "s|/usr/share/omarchy-platform|$platform_root|g"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Spaces stop the smoke test

If TMPDIR contains a space, such as /tmp/test runs, every matching filename contains that space too. xargs splits these filenames, so sed fails and the test stops before starting the shell. Use grep -rlZF with xargs -0r to preserve complete filenames.

Suggested change
{ grep -rlF /usr/share/omarchy-platform "$SCRATCH_ROOT/shell" || true; } |
xargs -r sed -i "s|/usr/share/omarchy-platform|$platform_root|g"
{ grep -rlZF /usr/share/omarchy-platform "$SCRATCH_ROOT/shell" || true; } |
xargs -0r sed -i "s|/usr/share/omarchy-platform|$platform_root|g"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants