<feed xmlns='http://www.w3.org/2005/Atom'>
<title>archsetup/tests/hypr-live-update-guard, branch main</title>
<subtitle>Builds a full dev workstation from a bare Arch Linux install.
</subtitle>
<id>https://git.cjennings.net/archsetup/atom?h=main</id>
<link rel='self' href='https://git.cjennings.net/archsetup/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/archsetup/'/>
<updated>2026-07-08T21:18:08+00:00</updated>
<entry>
<title>fix(guard): consume the override sentinel as it's honored</title>
<updated>2026-07-08T21:18:08+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-08T21:18:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/archsetup/commit/?id=35139e9fc7590ef5fd474df967d9ae6ee7f8b749'/>
<id>urn:sha1:35139e9fc7590ef5fd474df967d9ae6ee7f8b749</id>
<content type='text'>
One touch buys exactly one transaction. The maintenance console's forced live update sets the sentinel and clears it afterward, but a caller that dies mid-update would leave the file behind and keep the guard disarmed until reboot. The hook now deletes the sentinel at the moment it honors it, so a missed cleanup costs nothing. The env override is unchanged, and the caller's clear step stays as the belt-and-suspenders for transactions the hook never fires on.
</content>
</entry>
<entry>
<title>fix(guard): allow same-version reinstalls through the live-update hook</title>
<updated>2026-07-08T17:55:55+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-07-08T17:55:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/archsetup/commit/?id=ce8d38771ef56fab0262fd08408a74673d75a53a'/>
<id>urn:sha1:ce8d38771ef56fab0262fd08408a74673d75a53a</id>
<content type='text'>
The hypr-live-update-guard hook blocked on target names alone, so a same-version reinstall of hyprland (the maintenance console's integrity REINSTALL, right after a full update) aborted identically to a real upgrade. A pure reinstall writes identical bytes over identical bytes and can't crash the live compositor: the SIGABRT hazard needs the on-disk version to actually change.

The guard now compares each target's installed version (pacman -Q) against the sync-db candidate (expac -S %v). Both are read-only queries and safe under the transaction lock, pinned live with db.lck present. Targets that match pass as reinstalls, and the block message lists only the version-changing packages. Unresolvable versions (AUR targets, -U transactions, expac missing) still block conservatively.

Verified live on ratio: the previously blocked six-package reinstall ran clean with Hyprland up. The block path is pinned by the test suite (13 tests, four new). I deployed the script to /usr/local/bin on both hosts by hand since the installer only copies it on fresh systems.
</content>
</entry>
<entry>
<title>feat(hyprland): guard against live GPU/compositor library upgrades</title>
<updated>2026-06-28T05:43:24+00:00</updated>
<author>
<name>Craig Jennings</name>
<email>c@cjennings.net</email>
</author>
<published>2026-06-28T05:43:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cjennings.net/archsetup/commit/?id=a0063206efa30fc11212873e2910a43e453ecaba'/>
<id>urn:sha1:a0063206efa30fc11212873e2910a43e453ecaba</id>
<content type='text'>
A pacman -Syu that swaps mesa/hyprland/wayland runtime libs out from under
a running Hyprland session crashes the compositor: the next GPU-lib call
hits a now-"(deleted)" library and SIGABRTs, taking the Wayland clients
with it (hit ratio 2026-06-07, mesa + hyprland upgraded live). It's a
likely driver of ratio's high unsafe-shutdown ratio.

I added a pacman PreTransaction hook (hypr-live-update-guard) on the
GPU/compositor runtime set. When such an upgrade is pending and Hyprland is
running, it aborts before any package is swapped and tells the user to
re-run from a TTY with the session stopped. Aborting at PreTransaction is
safe: nothing is replaced yet, so the live session is untouched. With no
Hyprland running (the from-a-TTY path) the guard stays quiet and the
upgrade proceeds. Override with HYPR_ALLOW_LIVE_UPDATE=1 or by touching the
sentinel file named in the abort message.

archsetup installs the guard and hook in the hyprland path. The decision
logic is covered by tests/hypr-live-update-guard (running/not, override,
multi-package, empty-target). The hook firing against a real pacman
transaction needs a live Hyprland session, filed as a manual test.
</content>
</entry>
</feed>
