Skip to content

Fix the video background test after backgrounds started decoding early - #14108

Closed
manuaudio wants to merge 2 commits into
omacom:quattrofrom
manuaudio:fix/video-background-test-prepared-snapshot
Closed

manuaudio wants to merge 2 commits into
omacom:quattrofrom
manuaudio:fix/video-background-test-prepared-snapshot

Conversation

@manuaudio

Copy link
Copy Markdown
Contributor

test/shell.d/video-background-test.sh fails on quattro:

/dev/fd/63: line 99: PREPARED_BACKGROUND_SNAPSHOT: unbound variable

The test copies set_theme_background out of bin/omarchy-theme-set with awk and runs it under set -u. Since #13408 ("Decode theme backgrounds earlier, and at screen size"), that function reads PREPARED_BACKGROUND and PREPARED_BACKGROUND_SNAPSHOT. The script sets those at top level, but the test never defines them, so the file aborts before its last checks run.

This PR sets both variables in the test, and the "preselected background disappeared" case now covers #13408's handling of a snapshot prepared ahead of time:

  • The test prepares a snapshot for the background that then disappears.
  • It checks that set_theme_background deletes that snapshot instead of leaving it behind.

That new check fails if the rm -f "$PREPARED_BACKGROUND_SNAPSHOT" branch is removed.

Only the test changes. ./test/shell reports the file as passing again.

🤖 Generated with Claude Code

…t now keeps

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

greptile-apps Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; no outstanding findings or new actionable issues were identified.

Summary

The PR restores the video-background test after theme backgrounds began decoding early. It initializes the prepared-background variables and checks that a snapshot for a disappeared background is deleted.

Reviews (2) · Last reviewed commit: "Merge quattro, keeping the prepared snap..." · Reviewed by Greptile

@chessing234 chessing234 left a comment

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.

everything seems fine, ready to merge.

@omarchybot omarchybot added the bug Something isn't working label Oct 15, 2026
…nd case checks

Quattro's omacom#14259 fixed the same unbound-variable abort by setting PREPARED_BACKGROUND and PREPARED_BACKGROUND_SNAPSHOT to empty just after the lines this branch adds. Merged as is, the empty values win, the check that the prepared snapshot is deleted tests an empty path and always passes, and the snapshot file is left in the test's temp directory. Drop the empty assignments so the case runs against the snapshot it prepared.

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

Copy link
Copy Markdown
Collaborator

Thanks @manuaudio. I reviewed this, ran it on a worker VM built from the Omarchy ISO, and pushed one merge commit to your branch.

What changed on quattro since this was opened. #14259 fixed the same PREPARED_BACKGROUND_SNAPSHOT: unbound variable abort by setting PREPARED_BACKGROUND="" and PREPARED_BACKGROUND_SNAPSHOT="" a few lines below the ones this PR adds. The two branches merge without a conflict, but the empty assignments come second and win. The new check then tests an empty path and always passes, and the prepared snapshot is never deleted. With the rm -f "$PREPARED_BACKGROUND_SNAPSHOT" line removed from bin/omarchy-theme-set, that merge still passed 35/35.

Pushed: 19bbcd5 merges quattro into the branch and drops quattro's two empty assignments, so the case runs against the snapshot it prepared. Against quattro, the diff is still only your seven lines in test/shell.d/video-background-test.sh.

Checked on the worker:

  • At this PR's original base (a85e29a), video-background-test.sh aborts with the unbound variable.
  • On current quattro (246f33a) it passes 34/34, so the abort is already fixed there.
  • On 19bbcd5 it passes 35/35.
  • With the rm line removed from bin/omarchy-theme-set, exactly the new check fails: "a snapshot prepared for a background that disappeared is dropped".
  • ./test/cli passes.
  • In the full test/shell.d run, 11 other files fail. All 11 fail identically on quattro, and none of them is touched here.

Second opinion: Codex Medium reviewed the merged head and found no defects. It agreed that the resolution makes the check exercise the cleanup branch, and that no other test covers that deletion. Independence isn't guaranteed. GitHub has no CI result for this head yet.

What's left: this no longer fixes a failing test on quattro. What it adds is one regression check for stale prepared-snapshot cleanup, so it can't be verified as a bug fix, and whether to take it is the maintainer's call. Nothing is needed from you.

@manuaudio

Copy link
Copy Markdown
Contributor Author

Thanks @chessing234 — I appreciate the review. I rechecked the current head after the later quattro changes; it is clean and the focused video-background regression remains covered.

@manuaudio

Copy link
Copy Markdown
Contributor Author

Closing this: #14259 fixed the same abort on quattro, so it no longer fixes a failing test. Thanks for the review and the merge.

@manuaudio manuaudio closed this Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants