Skip to content

Preserve XCompose customizations on setup rerun - #7473

Closed
nsumbadze wants to merge 2 commits into
omacom:quattrofrom
nsumbadze:fix/preserve-xcompose
Closed

nsumbadze wants to merge 2 commits into
omacom:quattrofrom
nsumbadze:fix/preserve-xcompose

Conversation

@nsumbadze

Copy link
Copy Markdown

omarchy-finalize-user --force can run install/user/xcompose.sh more than once, but the script
currently recreates ~/.XCompose on every pass. That removes user-defined Compose sequences and,
when the identity variables are absent, replaces the name and email macros with empty strings.

Only seed the default file when ~/.XCompose does not already exist. This matches the non-
destructive guard already used by the Quattro upgrade path.

The regression test covers initial identity creation, adds a custom sequence, reruns without the
identity variables, and verifies the file is unchanged byte-for-byte.

Testing

  • ./test/all - all 182 test files passed

Closes #7104

Copilot AI balanced review requested due to automatic review settings August 19, 2026 10:33

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@nsumbadze
nsumbadze requested a balanced review from Copilot August 20, 2026 07:44

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
run_logged sources install scripts under bash -eE, not -u. Under -u the unguarded script aborts on the unset identity variables before tee runs, so the test failed on the old code for that reason rather than for the overwrite it is meant to catch. Rerun without the identity variables under bash -eE, so reverting the guard fails at the preservation assertion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@omarchybot omarchybot added verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Sep 28, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed, and the fix holds. I reproduced #7104 on a disposable Omarchy worker the way omarchy-provision-user --force runs this script (bash -eE, sourced): on quattro a rerun without the identity variables wipes an added sequence and leaves both <Multi_key> <space> <n>/<e> macros as empty strings; on this branch the file comes through byte-for-byte unchanged. The first-install path still writes the name and email, since nothing seeds ~/.XCompose before it. ./test/cli and ./test/shell pass on the worker.

I pushed one commit, 3ddac94, to the test only. Its rerun used bash -euo pipefail, and under -u the old script dies on the unset variables before tee runs, so the test failed on quattro for that reason rather than for the overwrite. It now reruns under bash -eE with the variables unset, and with the guard reverted it fails at the preservation assertion.

Second opinion from Codex Medium: it raised the -u point above (which I had also found; its independence from my review is not guaranteed), found no defect in the fix itself, and was clean on the pushed commit.

Worth knowing: #9282 rewrites the same heredoc in install/user/xcompose.sh for a different bug (the include path in sandboxed apps), so whichever lands second needs to keep this guard.

Nothing is needed from you; this is waiting on the maintainer.

@omarchybot

Copy link
Copy Markdown
Collaborator

Closing at DHH’s request. QA reproduced the XCompose overwrite when user setup is rerun, but no ordinary user incident has been demonstrated that establishes a practical need for this recovery workflow. The maintainer has declined the additional preservation guard and requested removal of the notices advertising a setup rerun.

#14194 removes that guidance from first-boot provisioning and both user-setup entry points. It is open and awaiting a maintainer merge. This closure declines the hardening; it does not claim the underlying overwrite has been fixed.

The earlier Codex Medium technical review found the preservation fix correct. The notice removal and this closure rationale were reviewed here by GPT-6 in Codex, with Codex Medium as a second opinion. Its agreement is not guaranteed to be independent.

Omabot on behalf of DHH

@omarchybot omarchybot closed this Oct 4, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

#14194 has now merged into quattro, removing the notices advertising user-setup reruns. This item remains closed as declined. The XCompose preservation guard was not merged, and forced reruns can still overwrite the file; the merge changes the guidance rather than hardening that workflow.

Closure scope checked by GPT-6 in Codex and Codex Medium against the reports and landed source. The second opinion agreed; independence is not guaranteed. No runtime tests were rerun for this reconciliation.

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

Labels

bug Something isn't working ready Good to merge 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.

install/user/xcompose.sh overwrites ~/.XCompose and blanks the identity macros on rerun

3 participants