Repository navigation
Conversation
omarchy-install-browser wrote Zen's Firefox policy to /opt/zen-browser/distribution, but zen-browser-bin installs to /opt/zen-browser-bin. Nothing failed: install -d created the missing directory, so the policy landed in a path no package owns and Zen never reads, and the install reported success. The effect is that every preference Omarchy sets for Firefox-based browsers was silently dropped for Zen -- VA-API and hardware video decoding, Wayland fractional scaling, overscroll and the swipe tracker -- while leaving an orphan /opt/zen-browser behind on every machine that ran the installer. BROWSER_POLICY_FIREFOX_DIRS carried the same path, so the migration that hardens those directories was guarding the wrong one too.
zen-browser-bin ships distribution/policies.json carrying DisableAppUpdate and DefaultSerialGuardSetting. Now that the path is right, install -T lands on that file, so Omarchy's policy would replace the vendor's and let a browser pacman manages start updating itself behind the package manager. browser_policy_setup_firefox_distribution already takes the policies file as its second argument, so give Zen its own: the same preferences Firefox gets, plus the two keys the package sets. Nothing else changes, and Firefox keeps using the stock file -- its package ships distribution.ini but no policies.json, so there is nothing there to preserve.
Jamesking56
left a comment
There was a problem hiding this comment.
Just realised you don't have a migration script to fix users who currently have Zen enabled.
|
Thanks for the careful write-up. The path fix works, and I've marked this What I checked, on a worker built from the Omarchy ISO with
This fixes #7411, so I've added it to the description. It competes with #7444, which fixes the same bug by merging Omarchy's preferences into the package's file with What is still open:
The second opinion was Codex Medium. It found the migration edge case, which I checked against the source. On the rest it agreed with me, but it had read my results first, so its agreement isn't independent. Nothing was pushed to your branch. |
|
Verified path fix looks right ( Maintainer call between this and #7444 — I'm fine with either once one lands and the other closes. |
quattro dropped the migration assertions from browser-policy-dir-test.sh (omacom#16302) and renamed the Zen path check's pass line; keep quattro's version with this branch's /opt/zen-browser-bin path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quattro added DontCheckDefaultBrowser to default/firefox/policies.json so Firefox-based browsers stop asking to be the default behind Omarchy's link routing (omacom#14441). zen-policies.json was copied from the stock file before that, so Zen would still ask. Add the key, and test that Zen's file carries every policy the stock one does so the two cannot drift again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Medium impact] The PR appears safe to merge, with no outstanding findings. SummaryPoints Zen’s policy setup at
No new actionable issues found in the changes since the previous review. Reviews (4) · Last reviewed commit: "Drop the tests that restate the implemen..." · Reviewed by Greptile |
The drift test deleted Zen's two package keys before comparing, so it passed with them missing, and compared jq output in file order, so reordering keys failed it. Assert the two keys explicitly and sort keys on both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
This had stopped merging cleanly into What I pushed:
What I checked, on a worker built from the Omarchy ISO with
Still open, unchanged from my last comment:
The second opinion was Codex Medium and muse-wonder via pi at high thinking. Both found the merge resolution correct. Both raised the migration repair edge case above again. Both pointed out that my first drift test passed even with the package's keys missing and broke if keys were reordered, which f0903be fixes. They were reviewing my commits, so their agreement on the rest isn't independent. |
The browser-policy hardening migration repairs every directory in BROWSER_POLICY_FIREFOX_DIRS by calling browser_policy_install_firefox_policies with no file, which installed Firefox's stock policies. Now that the list names Zen's real directory, a repair there would drop the package's DisableAppUpdate and DefaultSerialGuardSetting. The helper now picks the file by directory, so the shipped migration, the installer and any later caller get zen-policies.json for Zen without naming it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: muse-wonder High <noreply@meta.com>
|
I pushed one more commit to your branch (f31077e). It fixes the case Greptile raised as P1 above, which my last comment listed as still open. The PR is What was wrong. The fix. What I checked, on a worker built from the Omarchy ISO with
Second opinion. Codex at medium effort and muse-wonder at high effort reviewed the commit and the whole diff. Neither found a functional problem. Both checked every caller and confirmed that Firefox and any caller passing an explicit file behave as before. Both pointed out an unquoted string literal, and I fixed it before pushing. They reviewed my own change, so their agreement is not independent. Still open, for the maintainer:
|
One grepped the helper for Zen's path and one re-read zen-policies.json for the two package keys it was written with; AGENTS.md rules out both. The mapping test and default-apps-test.sh's installer assertions still check where Zen's policies go, and the parity check still catches the two policy files drifting apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> Co-Authored-By: muse-wonder High <noreply@meta.com>
|
I pushed one commit to your branch (05b50ab). It takes Greptile's P2 above: What I checked, on a worker built from the Omarchy ISO with
Second opinion. Codex at medium effort and muse-wonder at high effort reviewed the whole diff against current The PR is |
omarchy install browser zenwrites Zen's Firefox policy to/opt/zen-browser/distribution, butzen-browser-bininstalls to/opt/zen-browser-**bin**.Nothing fails.
install -dhappily creates the missing directory, so the policy lands somewhere no package owns and Zen never reads, and the installer reports success. The result is that every preference Omarchy sets for Firefox-based browsers is silently dropped for Zen:and an orphan
/opt/zen-browser/is left behind on every machine that ran the installer.BROWSER_POLICY_FIREFOX_DIRScarried the same path, so the migration that hardens those directories (migrations/1787515927.sh) has been guarding the wrong directory too.Observed on a machine where Zen was installed through
omarchy install browser zen:Firefox is unaffected: its path is correct.
Why the second commit
Once the path is right,
install -Tlands on a filezen-browser-binships, and Omarchy's policy would replace the vendor's — droppingDisableAppUpdateand letting a browser pacman manages start updating itself behind the package manager, on a file pacman owns.browser_policy_setup_firefox_distributionalready accepts the policies file as its second argument, so Zen gets its own: the same preferences Firefox receives plus the two keys the package sets. Firefox keeps using the stock file — its package shipsdistribution.inibut nopolicies.json, so there is nothing there to preserve.I tried merging with
jqfirst and backed it out.[[ -f $target ]]is true for a symlink to a regular file, so merging read through a planted link and folded its contents into machine policy —browser-policy-dir-test.shanddefault-apps-test.shboth caught it. Passing a separate file avoids that surface entirely, and leaves Firefox's install path byte-identical.If you would rather not carry a second policies file, the first commit stands alone and fixes the path; Zen then loses
DisableAppUpdateuntil the package reinstalls it.Testing
./test/all, with the four assertions that pinned the old path updated. Six suites fail on my machine both with and without this branch (config,locate,omarchy-kernel-migration,runtime-smoke,snapper,unowned-system-paths) and look environment-dependent; everything touching browsers, policies and defaults passes.Not included: a migration to remove the orphan
/opt/zen-browser/from machines that already ran the old installer. Happy to add one if you want it.Fixes #7411