Repository navigation
Conversation
…its target User setup checked each Chromium-family flags file with -f, which follows a symlink, then joined AcceleratedVideoDecoder to an existing --disable-features list with GNU sed -i. sed -i writes a new regular file over the link name, even when nothing changes, so a flags file that a dotfiles manager such as stow links in lost its link on the first run that found a --disable-features line, including the one setup had appended itself, and installing a second browser was enough. The dotfiles copy was no longer the file in use, and the next restow brought back whatever it held. sed now runs with --follow-symlinks and edits the link's target. The append branch already wrote through the link with >>. A dangling link still fails -f and is left alone, and a plain file is still edited in place. desktop-setup-test covers a relative link, as stow makes, plus the dangling link and the plain file. A new integration test installs Brave and then Chromium the runtime's way, with omarchy-install-browser's own flags copy and the real omarchy-lifecycle-dispatch post-install into the staged package, and checks that Brave's linked flags file is still a link. The README says a symlinked flags file stays a link, and the version moves to 0.2.7.
sed -i --follow-symlinks kept the link, but it makes its temporary file beside the link's target. A target in a directory the user cannot write stopped user setup with sed's exit 4, even when the list already had the feature, and the rest of setup (the other flags files, the microphone, Steam, the desktop entries) never ran. Base went on there, replacing the link. For a link, setup now writes the joined list through the link, as the append branch always has. The target keeps its inode, mode and hard links, and its directory need not be writable. A link whose target the user cannot write is left as it is, with a line saying so, in both branches; base replaced such a link with a plain copy in the join branch and stopped in the append branch. A plain file takes sed -i as before. desktop-setup-test covers a link into a read-only directory, run twice, and a link to a read-only file. The integration test makes the dotfiles directory read-only before the second browser install. The README says a target the user cannot write is left as it is.
Takes main's omarchy-mac/version and README version line, since main now lets only a release pull request change the version.
… unwritten User setup rewrote a linked flags file's target on every run, even when the joined list matched it, so each run truncated and rewrote the user's dotfile and moved its mtime. It now compares the joined list with the target first and writes only when they differ. The joined list's temporary file is removed when sed or the write fails too, and setup still exits with that command's status. desktop-setup-test checks that a run with nothing to change leaves the target's mtime alone, and covers a link whose target has no --disable-features line yet: the link stays a link and its target gains the line.
only21mil
force-pushed
the
browser-flags-keep-symlink
branch
from
November 21, 2026 02:01
da314bb to
f481971
Compare
Contributor
Author
|
I'm closing this to keep my open PRs focused on active maintainer priorities and higher-impact fixes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
User setup turns
AcceleratedVideoDecoderoff in each Chromium-family*-flags.conf, so Brave and other VA-API builds stop rendering green frames through the Apple Video Decoder. When the file already has a--disable-features=line, setup joins the feature to it withsed -i.GNU
sed -iwrites a new regular file and renames it over the path, so a symlinkedbrave-flags.conf, such as one stow links in, silently becomes a plain copy: dotfiles edits no longer reach the browser, and the nextstow --restowstops on the plain file. The first run appends through the link with>>, but later runs find the line setup wrote, so a second browser install detaches the first one's flags.Change
omarchy-mac-setup-userwrites the joined list through the link, as it already appends through it: the link stays and its target gets the edit, only when the list changes. A plain file still takessed -i, and a dangling link is still skipped.omarchy-mac/versiondoes not change: since Bump omarchy-mac's version only in a release's own pull request #30, only a release PR changes it.Scope
A bug fix in omarchy-mac's own user setup: it turns a symlinked browser flags file into a plain copy. No issue is linked; the tests below show the bug.
Verification
Setup. AI agent checks on an x86_64 Linux desktop (Ubuntu 26.04, GNU sed 4.9), each run in a fresh home with the runtime at its pin.
Steps. Run both changed tests → read the exit status.
Before, main
95b0dd9with only the new tests added, both fail, exit 1:After, this branch at
f481971, which merged main 091a106, both pass, exit 0. Merged locally with main 95b0dd9, cleanly, they print the same:Links. The regression test; #30, #72.
Not shown
brave-flags.conf; the tests stage a relative link the way stow makes one.chmod.Prior PRs
None make this change.
Unedited runs and detail
Main 95b0dd9 with only the new tests added fails both:
This branch at f481971 passes both, and so does its local merge with main 95b0dd9, with the same output:
Other checks, by the AI agent on f481971 and on its local merge with main 95b0dd9:
git merge-tree). Keep integration inputs current and isolate desktop setup tests #73 there changeddesktop-setup-test.shand moved the runtime pin to 2fca7fe; the merge runs at that pin.omarchy-mac/test/all: exit 0, 122 ok, no failures, on both.test/integration/allat each one's runtime pin: 60 ok, no failures, on both..github/scripts/check-version-bumpon the merge as a pull request: "omarchy-mac/version is unchanged.".github/scripts/check-scope,check-architecture-gatesandshellcheck -S warningon the three changed scripts: exit 0.versionand README line 3, where Restore the saved battery charge limit when installing its rule #72 already conflicts with main 95b0dd9.What the tests check.
omarchy-mac/test/desktop-setup-test.sh: a relative link, as stow makes, to a dotfiles copy that already has--disable-features=SomeOtherThingis still a link after setup, and the target gainsAcceleratedVideoDecoder. A second run with nothing to change leaves the target's mtime as it was. A link whose target has no--disable-features=line yet is still a link after setup, and the target gains the line. The joined case also holds with the dotfiles directory read-only, on a first run and on a second run with nothing to change. A link to a read-only file is left as it is, setup says so and exits 0. A dangling link is left dangling and setup exits 0. A plain flags file stays a plain file.test/integration/browser-flags-dotfiles-test.sh, withOMARCHY_TEST_RUNTIMEat thetest/integration/runtimepin:omarchy-install-browser's own flags copy, then the realomarchy-lifecycle-dispatch post-installinto omarchy-mac as its install script stages it. The dotfiles directory is read-only for the second install. After both installs Brave's flags file is still a link, its target turns hardware decode off once, and Chromium's plain file is edited in place.Mutations that fail the tests, run on f481971:
sed -ifor a link too, as on base;sed -i --follow-symlinksfor a link, as on this PR's first commit 415e848; a rename of the joined file over the link name; no check for a target that cannot be written; exiting with an error after leaving such a target; rewriting the target when nothing changes; appending by replacing the link with a plain file; and faking an x86 platform so dispatch does nothing.More detail.
sed -irenames even when nothing changes. The link may come from stow or another dotfiles manager; once it is replaced, the dotfiles copy is no longer the file in use.sed -i --follow-symlinks. That keeps the link, but sed makes its temporary file in the target's directory: with that directory read-only it exits 4 and user setup stops there, even when the list already has the feature. b04ade8 writes through the link, which needs only the file. In a fixture the target kept its inode, mode and second hard link.sedor the write fails too; setup still exits with that command's status. With asedorcatstub that exits 4, 0420ead leaves the temporary file behind and f481971 leaves none; both exit 4.--disable-features=line yet.[[ -f ]]check and is skipped, as a missing flags file is.version, as omarchy-mac: wait for J514C native graphics before SDDM #104 and omarchy-mac: stop the charge-limit unit failing after a charger plug or resume #109 did before Bump omarchy-mac's version only in a release's own pull request #30. Restore the saved battery charge limit when installing its rule #72 also edits the README; it already conflicts with main inversionand on README line 3, and this branch adds no conflict with it.Merge Danger. Door: two-way. Blast Radius: symlinked browser flags files. Plain flags files take the same
sed -ias before.Generated with Claude Opus 5.5 in T3 Code Nightly