Skip to content

Keep the runtime's detector out of the snapshot check's no-detector test - #570

Merged
maralcbr merged 1 commit into
quattro-upstreamfrom
mac/36-snapshot-test-flake
Sep 26, 2026
Merged

maralcbr merged 1 commit into
quattro-upstreamfrom
mac/36-snapshot-test-flake

Conversation

@maralcbr

Copy link
Copy Markdown
Member

Fixes the snapshot-check-test.sh failure reported as flaky after #560. It isn't timing: the test depends on PATH, and it fails every time the runtime's bin/ comes first on PATH.

Cause

The case "a restore from the running system of a root without the platform detector" (added in #560) only removed the fake omarchy-hw-platform from PATH. When the suite runs with $OMARCHY_PATH/bin first on PATH, as CI's runtime step and the #563 run did, the hook still finds the real detector. The real detector answers for the host (generic or generic-aarch64). The hook takes that as "not a Mac" and lets the restore through (status 0).

The failing #563 run exported PATH=$OMARCHY_PATH/bin:$PATH; the runs that passed didn't. CI's boot-suite step runs without it, which is why CI stayed green.

Fix

In that case, the test drops every PATH entry that provides omarchy-hw-platform. The hook is unchanged: it behaves correctly on a real root without the detector.

Testing

Run in a CI replica on the x86 test host: the archlinux:base-devel image pinned in tests.yml, CI's packages, and a non-root tester user.

  • quattro-upstream with bin/ on PATH: the boot suite fails 2 of 2 runs on exactly the reported assertion.
  • This branch: the full boot suite passes 12 of 12 runs with bin/ on PATH and 12 of 12 without (195 ok each).
  • arm64 suite image, before the fix, without bin/ on PATH: 20 of 20 full boot-suite runs pass under parallel load. No timing dependence showed up.
  • Reproduced locally: the test alone fails with the repo's bin/ on PATH before the fix and passes after.
  • Shellcheck reports nothing on the changed lines.

The case for a root without omarchy-hw-platform only left the fake detector
off PATH. With the runtime's bin/ on PATH, as when the suites run with
OMARCHY_PATH/bin first, the real detector answered for the host, the hook
took it for another platform and let the restore through. The case now drops
every PATH entry that provides a detector.
@maralcbr
maralcbr merged commit c322946 into quattro-upstream Sep 26, 2026
5 checks passed
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.

1 participant