Skip to content

Restore pacman config after failed refresh - #8781

Open
UrbanLeopard wants to merge 3 commits into
omacom:quattrofrom
UrbanLeopard:fix/restore-pacman-config-on-refresh-failure
Open

UrbanLeopard wants to merge 3 commits into
omacom:quattrofrom
UrbanLeopard:fix/restore-pacman-config-on-refresh-failure

Conversation

@UrbanLeopard

@UrbanLeopard UrbanLeopard commented Aug 28, 2026 •

Copy link
Copy Markdown

When a channel refresh fails or is interrupted after replacing pacman's configuration, omarchy-refresh-pacman leaves the machine pointing at the unsuccessful channel. Restore both /etc/pacman.conf and /etc/pacman.d/mirrorlist from the existing .bak files on failure, preserving the original exit status.

The refresh acquires a nonblocking, system-wide flock on the existing root-owned /etc/pacman.d directory before making either backup. The lock stays held through the transaction, rollback, and final sudo revocation. A second refresh exits before copying anything, even from a different runtime directory. Hook and transaction children do not inherit the lock descriptor, so background hook processes cannot retain it after the refresh exits.

Rollback is armed only after both backups succeed and disarmed only after the transaction succeeds. EXIT cleanup attempts to restore both files for ordinary failures and HUP/INT/TERM, then calls omarchy_security_exit_with_revoked_sudo to retain upstream's credential cleanup. Bash waits for the foreground child before handling a signal, preventing restoration from racing that child. Cleanup ignores further HUP/INT/TERM while attempting both restorations. As with any shell cleanup, SIGKILL and power loss cannot be handled.

Restoring configuration does not restore downloaded sync databases. After both restore copies succeed, the command warns that the databases may still belong to the failed channel and tells the user to run sudo pacman -Syy before installing packages. If package changes began before the failure, database refresh alone cannot complete or undo them. The message also tells the user to resolve the error and retry the command that started the refresh before installing more packages. This retains the caller's remaining steps, including channel package selection, linking, migrations, or package reinstalls. Cleanup does not start another network/package operation.

Restoration requires sudo authorization after the timestamp is revoked. If HUP means the terminal has closed and sudo cannot prompt, the copies can fail. The script reports that failure and preserves the original status; the signal tests with authorized sudo establish the cleanup path, not guaranteed recovery after terminal loss. A separate HUP regression denies both restore authorizations and checks this limitation explicitly.

Rebased onto quattro at f45461a3. The privileged Bash entry checks, cold hook boundary, omarchy-update-pacman transaction, and four-copy success path remain intact. The real hook runner continues to report and swallow user-hook failures; tests distinguish that behavior from failure of the runner itself.

Validation in an isolated checkout in the disposable ARM64 Omarchy VM:

  • Rollback regression: 34/34. Covers invalid input, both backup failures, either partial channel copy, hook-runner and transaction failures, either restore failing, and success. Adds HUP/INT/TERM at both channel copies, the hook, and the transaction; overlapping success/failure at the hook and transaction; further signals during rollback; background-hook lock release; retained sync databases and recovery guidance; denied restore authorization after HUP; and retry advice after simulated package changes. The last case checks the warning and initiating-command wording, not successful recovery of real packages.
  • Channel tests: 32/32. Update/hook security tests: 23/23, including the four-copy invariant and final sudo -k. Channel sudo-boundary tests: 19/19 with default HUP/INT dispositions restored by the VM runner. The earlier HUP failure was caused by inherited signal handling in the background test launcher.
  • Reverting the retry advice to name omarchy-refresh-pacman makes the initiating-command wording regression fail. Earlier independent mutation checks fail as expected: removing the partial-upgrade advice or database warning fails the corresponding guidance assertion; disabling the lock allows the second refresh through; bypassing rollback for TERM leaves pacman.conf changed. The earlier unmodified-upstream mutation also fails the partial-copy regression.
  • Local Bash syntax and git diff --check pass. Runtime suites require Linux (/proc and fixed /usr/bin paths), so they run in the VM.
  • ./test/all: 8 of 292 shell test files failed and 16 files reported skipped checks; the CLI suite also failed. All eight failing files and the CLI suite were rerun on untouched f45461a3 and failed there too: config, kernel-headers-migration, launch-browser, omarchy-kernel-migration, passwordless-grant-lifecycle, snapper, unowned-system-paths, and video-background. The CLI failure remains vscode generated theme references current theme file. These include the missing companion omarchy-pkgs checkout and VM/environment limitations; the aggregate suite is not claimed green. channel-sudo-boundary passes on both patched and untouched checkouts with normal signal dispositions.

@UrbanLeopard
UrbanLeopard marked this pull request as ready for review August 28, 2026 16:36
Copilot AI balanced review requested due to automatic review settings August 28, 2026 16:36

Copilot AI 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.

Pull request overview

Adds transactional rollback for pacman configuration changes when channel refreshes fail.

Changes:

  • Creates secure temporary backups of pacman configuration files.
  • Restores configuration after channel, hook, or package-refresh failures.
  • Adds shell regression tests for hook/package failures and success.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
bin/omarchy-refresh-pacman Implements transactional backup and rollback.
test/shell.d/refresh-pacman-rollback-test.sh Tests rollback and success behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@UrbanLeopard
UrbanLeopard force-pushed the fix/restore-pacman-config-on-refresh-failure branch from 03f9c38 to 097f8c2 Compare August 28, 2026 18:40
@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

The bug is real, and this fixes it. The branch now conflicts with quattro, though, so it needs a rebase before it can land.

What was checked. I ran this on a disposable Omarchy VM using real sudo and pacman. A pre-refresh-pacman hook added an unreachable repository, so pacman -Syyuu failed to sync, the same way the aarch64 edge 404 fails.

  • On current quattro (c05d901), omarchy-refresh-pacman edge exits 1 and leaves both /etc/pacman.conf and /etc/pacman.d/mirrorlist on edge.
  • At this head (097f8c2), the same run exits 1 and restores both files.
  • With the change to bin/omarchy-refresh-pacman reverted, both files are left switched, and your new test fails.
  • On that VM, refresh-pacman-rollback-test.sh passes 7/7 and channel-test.sh passes 32/32. I did not run the full suite.

One small thing: omarchy-hook catches a failing hook (|| echo "Hook failed"), so a broken user hook never fails the refresh. The case that matters in practice is the transaction failing.

Why it conflicts. Since this branch was cut, quattro has rewritten this script for the sudo boundary: the bash -p entry checks, omarchy_security_install_sudo_cleanup_traps, the hook running cold between two timestamp revocations, and the transaction moving to omarchy-update-pacman. Carrying the change over as it is would break two things:

  • trap 'sudo rm -rf "$rollback_dir"' EXIT replaces the EXIT trap the cleanup helper installs. The cached sudo credential would then no longer be revoked on exit. test/shell.d/update-hook-security-test.sh checks that the last sudo call is sudo -k.
  • quattro already copies both files to /etc/pacman.conf.bak and /etc/pacman.d/mirrorlist.bak before switching. The proportionate change there is to restore from those copies when the hook or the transaction fails. You no longer need a second set of copies in a temporary directory, or a trap to clean them up. The same test expects exactly four sudo -N cp before the hook, and a restore that runs only on failure keeps that true.

Four other open pull requests touch this script, so whichever lands first will move it again: #7998 timestamps those backups, #13397 adds replacement flags to the transaction, #13479 shares one authorization across a channel switch, and #13690 adds region profiles.

Second opinion. None for this item. The configured reviewer was reachable, but it had already used today's review budget, so everything above is one model's work (Claude Opus 5.5).

Next. This waits on you to rebase onto quattro. Once that is pushed, it will be reviewed again and tested on a worker against the new head.

@UrbanLeopard
UrbanLeopard force-pushed the fix/restore-pacman-config-on-refresh-failure branch from 097f8c2 to 46cb70c Compare October 2, 2026 01:28
@greptile-apps

greptile-apps Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues remain.

Summary

Adds rollback for failed pacman configuration refreshes.

  • Failed pacman refreshes restore the previous channel configuration.

All four earlier threads were unnumbered. Their reported issues are addressed by the current lock, cleanup traps, and recovery advice. No new actionable issues were found. Bash syntax and diff whitespace checks passed; runtime suites were not rerun during this review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Validate channel] --> B[Acquire refresh lock]
  B --> C[Back up both files]
  C --> D[Arm rollback]
  D --> E[Copy channel configuration]
  E --> F[Run hook and transaction]
  F -->|Success| G[Disarm rollback]
  E -->|Failure or signal| H[Restore both files]
  F -->|Failure or signal| H
  H --> I[Print recovery advice]
  G --> J[Revoke sudo and exit]
  I --> J
  J --> K[Release lock]
Loading

Reviews (7) · Last reviewed commit: "Merge quattro to carry the rollback over..." · Reviewed by Greptile

Comment thread bin/omarchy-refresh-pacman Resolved
Comment thread bin/omarchy-refresh-pacman Resolved
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for the rebase. The rollback now works on top of the sudo boundary, and the reproduction passes at this head. One gap is left: the sync databases are not restored along with the configuration.

What was checked. I'm Claude Opus 5.5, reviewing for omabot. On a disposable Omarchy VM (x86_64) I ran omarchy-refresh-pacman edge with real sudo and pacman, starting from stable. A pre-refresh-pacman hook added an unreachable repository, so pacman -Syyuu failed to sync.

  • On quattro (821ae58), it exits 1 and leaves /etc/pacman.conf and /etc/pacman.d/mirrorlist on edge.
  • At this head (46cb70c), it exits 1, prints the rollback message, and both files are back on stable.
  • With bin/omarchy-refresh-pacman reverted to quattro, both files stay on edge, and refresh-pacman-rollback-test.sh fails ("pacman.conf was not restored").
  • At this head, refresh-pacman-rollback-test.sh passes 11/11, channel-test.sh 32/32 and update-hook-security-test.sh 23/23. I did not run the full suite.

Cleanup is still handled by the EXIT trap, the credential is revoked before the restore copies, and the original exit status is kept. omarchy-channel-set and omarchy-reinstall-pkgs both stop when the refresh fails, so neither goes on to run against the restored files.

The gap. -Syy refreshes every sync database from the edge mirrors before the failing repository stops it. The rollback then puts pacman.conf and mirrorlist back on stable, but /var/lib/pacman/sync still holds edge's databases. Every channel uses the same repository names, so pacman cannot tell them apart. On the VM, right after the rollback, 4,103 entries in core, extra and omarchy differed from stable's databases. A pacman -S without -y in that state resolves edge versions against the stable servers. omarchy-pkg-add does exactly that: it fails on packages the stable mirror does not have, or makes a partial upgrade with the ones it does. A plain pacman -Syy against the restored files fixed it. Before this change the files and databases at least agreed with each other, both on edge.

The proportionate fix is to refresh the databases after both files are restored, for example omarchy-update-pacman -Syy --noconfirm. If that fails, say so, rather than reporting the old configuration as fully back. The test's pacman stub would need to tell this refresh apart from the transaction, because step:pacman currently means "the transaction ran".

Second opinion. Codex Medium reviewed this head. It found the database gap above, which I had not looked at, and the VM run confirms it. It also asked whether a transaction that fails during commit, after some packages are already installed, is made worse by restoring the old channel. I don't think it needs a change. Pacman's conflict and disk-space checks run before any package is touched, so commit-time failures are rare. Rerunning omarchy-channel-set, which the error message already suggests, redoes the -Syyuu either way. Otherwise it agreed with my reading of the sudo boundary and the set -e handling; its independence from my review is not guaranteed.

Related. #7998 renames these backups to timestamped names. Whichever lands second has to make restore_pacman_config read the new name.

Next. This waits on you for the database refresh. Once that is pushed, it will be tested again on a worker.

@UrbanLeopard
UrbanLeopard force-pushed the fix/restore-pacman-config-on-refresh-failure branch from 46cb70c to 433db5e Compare October 2, 2026 01:45
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review labels Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 433db5e. The lock and the signal handling work, and the rollback still fixes the bug. The sync-database gap from my last comment is still open. This push landed a minute after that comment, so it could not have covered it.

What was checked. I'm Claude Opus 5.5, reviewing for omabot. I used a disposable Omarchy VM (x86_64) with real sudo and pacman, starting from stable. A pre-refresh-pacman hook added an unreachable repository, so omarchy-refresh-pacman edge failed to sync.

  • On quattro (821ae58), it exits 1 and leaves pacman.conf and mirrorlist on edge.
  • At this head, it exits 1 and both files are back on stable.
  • With bin/omarchy-refresh-pacman reverted to quattro, both files stay on edge, and refresh-pacman-rollback-test.sh fails.
  • A second refresh started while the first sat in a slow hook exited 1 with "A pacman configuration refresh is already running."
  • TERM sent during that hook made the first refresh exit 143 with both files restored.
  • At this head, refresh-pacman-rollback-test.sh passes 31/31, channel-test.sh 32/32, update-hook-security-test.sh 23/23 and channel-sudo-boundary-test.sh 19/19. channel-sudo-boundary-test.sh also passes on untouched quattro on that VM, so it is not one of the environment failures. I did not run the full suite.

I read the new EXIT trap against omarchy-security-functions. The status is captured before anything overwrites it, a failed restore copy does not skip the other one, and omarchy_security_exit_with_revoked_sudo still makes sudo -k the last call. The lock is in proportion to the fix. Without it, a second refresh would back up the first one's switched files into the .bak copies, and the first refresh would then roll back to the wrong channel.

Still open: the sync databases. After the failed sync above, the configuration was back on stable but core.db, extra.db and omarchy.db were still edge's. Every channel uses the same repository names, so a later pacman -S without -y (omarchy-pkg-add is one) resolves edge versions against the stable servers. Either of these would close it: run a database-only refresh after the restore (omarchy-update-pacman -Syy --noconfirm, no -u) and say so if it fails, or at least end the rollback message by telling the user to run sudo pacman -Syy before installing anything. The test's pacman stub never touches the databases, so the suite passes either way.

A limit worth stating in the description. The rollback revokes the sudo timestamp and then asks for authorization again. If the refresh was ended by HUP because its terminal closed, there is nothing to answer that prompt. The restore copies then fail and the script prints "Failed to restore the previous pacman configuration." That is no worse than quattro, which never restores at all. But "restores both files for … HUP" overstates it, and the HUP tests pass only because the fixture's sudo -N never asks.

Second opinion. Codex Medium reviewed this head. It also found the database gap and the HUP limit. On the databases, it preferred the message to running a refresh from inside cleanup. It found no defect in the set -e handling, the directory lock or the {fd}<&- redirections, and it judged the lock warranted for the reason above. It agreed with conclusions already in my previous comment, and its independence from my review is not guaranteed.

Related. #7998 renames these backups, and #9878 adds a step after the channel copies in the same script. Whichever lands second has to be adjusted.

Next. This waits on you to handle the sync databases. Once that is pushed, it will be tested again on a worker.

@UrbanLeopard
UrbanLeopard force-pushed the fix/restore-pacman-config-on-refresh-failure branch from 433db5e to 8bea833 Compare October 2, 2026 02:30
Comment thread bin/omarchy-refresh-pacman Resolved
@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@UrbanLeopard
UrbanLeopard force-pushed the fix/restore-pacman-config-on-refresh-failure branch from 8bea833 to b46a017 Compare October 2, 2026 02:53
Comment thread bin/omarchy-refresh-pacman Resolved
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at b46a017. The rollback still fixes the bug, and the database warning closes the gap from my last comment. One line of the newest guidance points users at the wrong command, though.

What was checked. I'm Claude Opus 5.5, reviewing for omabot. I used a disposable Omarchy VM (x86_64) with real sudo and pacman, starting from stable. A pre-refresh-pacman hook added an unreachable repository, so omarchy-refresh-pacman edge failed to sync.

  • On quattro (821ae58), it exits 1 and leaves pacman.conf and mirrorlist on edge.
  • At this head, it exits 1, both files are back on stable, and the new guidance is printed. Running sudo pacman -Syy afterwards, as the message says, brought core.db, extra.db and omarchy.db back to stable's.
  • With bin/omarchy-refresh-pacman reverted to quattro, both files stay on edge, and refresh-pacman-rollback-test.sh fails.
  • The overlap lock and TERM rollback behave as before.
  • At this head, refresh-pacman-rollback-test.sh passes 34/34, channel-test.sh 32/32, update-hook-security-test.sh 23/23 and channel-sudo-boundary-test.sh 19/19.
  • The full suite is not green, and not because of this change. ./test/cli fails vscode generated theme references current theme file on untouched quattro too. ./test/shell hung in omarchy-kernel-migration-test.sh, which this branch does not touch, so I stopped it.

The retry line. bin/omarchy-refresh-pacman:59 tells the user to "rerun 'omarchy-refresh-pacman $channel' to complete the update". Neither caller is finished by that:

  • omarchy-channel-set edge through the same failure printed that line, followed straight away by its own "The channel switch did not complete. … rerun: omarchy-channel-set edge". That gives two different commands one line apart. For dev, the first one says omarchy-refresh-pacman edge, because omarchy-channel-set maps dev to the edge repositories. Following it moves pacman to edge but skips everything after the refresh: the omarchy-dev packages (line 137), the dev link or unlink (140–148), and omarchy-update (150). The switch stays half-done, and the existing message is there to prevent exactly that.
  • omarchy-reinstall-pkgs stops when the refresh fails. Rerunning only omarchy-refresh-pacman skips its downgrade and its reinstall of the base packages (lines 14–18).

A fix that keeps the point of the warning: keep line 58, and make line 59 say to resolve the error and retry the command that started the refresh, before installing more packages, without naming one. A test for the advice is also weak. The stub writes the "updated package" marker whatever the transaction is, so the new case checks the wording and not that following it recovers anything. That is fine for wording. It just should not be read as more.

Second opinion. Codex Medium reviewed this head. It raised the same retry-line problem, and added the omarchy-reinstall-pkgs case, which I had not looked at. It also pointed out the limit of the new test. It found nothing else in the rollback, the lock or the earlier database warning. Its independence from my review is not guaranteed.

Next. This waits on you to fix the retry line. Once that is pushed, it will be tested again on a worker.

@UrbanLeopard
UrbanLeopard force-pushed the fix/restore-pacman-config-on-refresh-failure branch from b46a017 to 4fdd3f9 Compare October 2, 2026 03:41
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review and removed verified Omarchy Triage has verified that this issue is ready for final review labels Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Re-reviewed at 4fdd3f9. The retry line is fixed, and the rollback still works. Nothing else is open on this pull request.

What was checked. I'm Claude Opus 5.5, reviewing for omabot. I used a disposable Omarchy VM (x86_64) with real sudo and pacman, starting from stable. A pre-refresh-pacman hook added an unreachable repository, so omarchy-refresh-pacman edge failed to sync.

  • On quattro (821ae58), it exits 1 and leaves pacman.conf and mirrorlist on edge.
  • At this head, it exits 1, both files are back on stable, and the guidance is printed.
  • With bin/omarchy-refresh-pacman reverted to quattro, both files stay on edge, and refresh-pacman-rollback-test.sh fails.
  • omarchy-channel-set edge through the same failure restores both files. Its own "rerun: omarchy-channel-set edge" now follows a line telling the user to retry the command that started the refresh, so the two agree.
  • A second refresh started during the first is refused by the lock. TERM during the hook exits 143 with both files restored.
  • At this head, refresh-pacman-rollback-test.sh passes 34/34, channel-test.sh 32/32, update-hook-security-test.sh 23/23 and channel-sudo-boundary-test.sh 19/19.
  • ./test/cli fails one test, vscode generated theme references current theme file, and fails it on untouched quattro too. Because the suite is not green, this is labelled verified but not ready.

Second opinion. Codex Medium reviewed this head. It checked the new wording against omarchy-channel-set, omarchy-reinstall-pkgs and the user-hook path in docs/update-process.md, found it correct for each, and found nothing else in the diff. It agreed with my reading, and its independence from my review is not guaranteed.

Next. Nothing is waiting on you. This waits on the maintainer, and on the unrelated ./test/cli failure on quattro.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 10, 2026
quattro now resolves the platform's pacman templates and default channel before touching /etc (omacom#14431). That validation exits before anything changes, so it runs first, and the lock, backups and rollback trap follow it unchanged; the channel copies read from $templates.

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 Oct 11, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had started to conflict with quattro, so I merged quattro into your branch and pushed it as 66008ae. The rollback still works on top of it. Nothing is waiting on you.

The conflict. #14431 made omarchy-refresh-pacman look up the machine's platform, its pacman templates and its default channel before it touches /etc, in the same place your lock and rollback trap went. That check exits before anything changes, so it now runs first, and your lock, backups and trap follow it unchanged. The two channel copies read from $templates, as quattro does. Against quattro, the diff is the same change you wrote. It is a merge commit, not a rebase, so your commit is untouched.

What was checked. I'm Claude Opus 5.5, reviewing for omabot. I used a disposable Omarchy VM (x86_64) with real sudo and pacman, starting from stable. A pre-refresh-pacman hook added an unreachable repository, so omarchy-refresh-pacman edge failed to sync.

  • On quattro (0b9dace), it exits 1 and leaves pacman.conf and mirrorlist on edge.
  • At 66008ae, it exits 1, both files are back on stable, and the guidance is printed.
  • With bin/omarchy-refresh-pacman reverted to quattro, both files stay on edge, and refresh-pacman-rollback-test.sh fails.
  • A second refresh during the first is refused by the lock. TERM during the hook exits 143 with both files restored.
  • refresh-pacman-rollback-test.sh passes 34/34, channel-test.sh 32/32, update-hook-security-test.sh 23/23 and channel-sudo-boundary-test.sh 24/24.
  • ./test/cli passes. The vscode theme failure from last time is fixed on quattro.
  • ./test/shell fails in 11 of 376 files. Ten of them fail on untouched quattro on the same VM too (ascii, branding-about-animation, config, default-agent, hyprland-startup-cursor-cold, launch-browser, passwordless-grant-lifecycle, runtime-smoke, screenshot-sanity, unowned-system-paths). The eleventh, remote-session-service, passed twice on its own, on this branch and on quattro, so that one failure was flaky. None of them touch pacman. Because the suite is not green, this stays verified and not ready.

Second opinion. Codex Medium reviewed the merge. It found nothing wrong. It checked that the platform check still exits before any change. It checked that the rollback restores fixed paths in /etc, so the aarch64 template directories don't affect it. It checked that omarchy-reinstall-pkgs, which now calls the refresh with no channel to get the platform default, still stops when the refresh fails. It noted that the rollback test only exercises x86 and an explicit channel, while pacman-templates-test.sh covers the other platforms and the default channel. That is a coverage gap, not a defect. Its independence from my review is not guaranteed.

Next. This waits on the maintainer, and on the shell suite failures that are also on quattro.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 20, 2026
omacom#15903 added an --ignore for omarchy-dev and omarchy-settings-dev to the stable and rc transaction, on the same line the rollback closes the refresh lock on. Both stay: the ignore list is passed first and the lock fd is closed after it. The rollback test's success case refreshes to stable, so it now expects the ignore.

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 Oct 21, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had started to conflict with quattro again, so I merged quattro into your branch and pushed it as 19b5341. The rollback still works on top of it. Nothing is waiting on you.

The conflict. #15903 made the final transaction pass --ignore omarchy-dev,omarchy-settings-dev when refreshing to stable or rc, on the same line where your change closes the refresh lock for the transaction. Both stay: the line is now omarchy-update-pacman -Syyuu --noconfirm "${ignore[@]}" {refresh_lock_fd}<&-, followed by rollback_needed=0 as before. Your rollback test's success case refreshes to stable, so its check of the transaction arguments (test/shell.d/refresh-pacman-rollback-test.sh:191) now expects the ignore pair. Against quattro, the diff is otherwise the change you wrote. It is a merge commit, not a rebase, so your commits are untouched.

What was checked. I'm Claude Opus 5.5, reviewing for omabot. I used a disposable Omarchy VM (x86_64) with real sudo and pacman. A pre-refresh-pacman hook added an unreachable repository, so the refresh failed to sync.

  • Starting from stable, omarchy-refresh-pacman edge on quattro (087f73d) exits 1 and leaves pacman.conf and mirrorlist on edge.
  • At 19b5341, it exits 1, both files are back on stable, and the guidance is printed.
  • With bin/omarchy-refresh-pacman reverted to quattro, both files stay on edge, and refresh-pacman-rollback-test.sh fails.
  • Starting from edge, omarchy-refresh-pacman stable fails the same way and restores both edge files, which runs the merged line with the ignore pair.
  • refresh-pacman-rollback-test.sh passes 34/34, channel-test.sh 32/32, update-hook-security-test.sh 23/23, channel-sudo-boundary-test.sh 24/24, channel-stale-dev-build-test.sh 4/4 and pacman-templates-test.sh 11/11.
  • ./test/cli passes.
  • ./test/shell is not green, and not because of this change. Nine files fail on untouched quattro on the same VM too (ascii, background-instant-reload, background-intro-clone, branding-about-animation, hyprland-startup-cursor-cold, i18n, lock-appear-budget, runtime-smoke, screenshot-sanity). Over two full runs at this head, windows-vm-compose failed twice and channel-sudo-boundary once, each on a different assertion. Both pass every time run on their own, at this head, and in quattro's full run. The channel-sudo-boundary failure was an Apple Silicon refusal that happens before your lock is reached. Because the suite is not green, this is labelled verified and not ready.

Second opinion. Codex Medium reviewed the merge and found nothing wrong. It checked that the rollback still covers everything from the backups to the end of the transaction. It checked that the ignore pair reaches stable and rc and not edge, and that closing the lock fd works alongside an empty array under bash -p and set -e. It also checked that omarchy-channel-set still stops before its -dev package swap when the refresh fails. Taking quattro's additions back out of the merged script gives your earlier script exactly. It agreed with my reading, and its independence from my review is not guaranteed.

Next. This waits on the maintainer, and on the shell suite failures that are also on quattro.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 21, 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