Skip to content

Refuse promotions that move an unqualified Mac package set - #1745

Merged
maralcbr merged 6 commits into
masterfrom
mac-package-set-enforce
Oct 29, 2026
Merged

maralcbr merged 6 commits into
masterfrom
mac-package-set-enforce

Conversation

@maralcbr

@maralcbr maralcbr commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Ready for the owner's merge decision. omarchy-pkgs#1744 is merged. This PR is rebased on master and now targets it. The two holds are settled:

  • Inventory: release/mac-inventory.txt is set to the Omarchy 4.5 Mac candidate the owner froze on edge on 2026-10-29. That is image omarchy-mac-edge-2026.10.29-20c83855d86d-e0d77393d485, which passed VM acceptance, and an M2 Max fresh install updated to the same set (commit "Qualify the Omarchy 4.5 Mac candidate").
  • x86: omarchy-pkgs#1801 made aurora-audio and alsa-ucm-conf-aurora aarch64-only, so every Mac pkgbase is now arch=('aarch64'). A Mac check no longer acts on x86_64. One x86-visible behaviour remains: a fast-ring publish into rc or stable refuses if R2 can't be listed. Owner merges; not merged.

Summary

Turns the Mac package-set check from reporting into refusing, at all three promotion points.

 bin/promote-channel
   plan
   check-mac-set on the full plan
-    refused -> warning, publish anyway
+    refused -> "Refusing to promote …: nothing published", exit 1 (dry run too)
   publish batches

 .github/workflows/promote.yml (inside the publish lock)
+  for arch in x86_64 aarch64: promote-channel --dry-run   # any refusal stops here, both arches untouched
   for arch in x86_64 aarch64: promote-channel

 .github/workflows/publish.yml (merge publish)
-  per rc/stable slot: check-mac-set fails -> ::warning, publish
+  check-mac-set --slots <every rc/stable slot>   # before the first slot, edge included
+    fails -> ::error, those slots recorded "refused", nothing published
   for slot in edge, rc, stable × x86_64, aarch64: publish-artifact

 .github/workflows/publish.yml (fast-ring catch-up)
+  for slot: promote-channel --fast-ring --dry-run   # any refusal stops here; slot + reasons recorded
   for slot: promote-channel --fast-ring

 bin/check-mac-set
-  Mac package = new pkgbase is listed
+  Mac package = pkgbase before or after the write is listed
+  --slots FILE: check a whole publish, every slot, pass only if all do

Evidence

  • Before (omarchy-pkgs#1744): a promotion the check would refuse is reported and still published.
    After: tests/mac-package-set.sh:

    promote edge -> rc mac-kernel (unqualified)   -> exit 1, rc unchanged, no slot recorded
    promote --dry-run shared-lib (closure break)  -> exit 1
    promote --fast-ring (closure break)           -> exit 1, rc unchanged
    matching set / no Mac change                  -> pass / untouched, published as today
    

    tests/promote-channel.sh and tests/publish-artifact.sh still pass unchanged.

Testing evidence

x86_64 and aarch64 unaffected: before/after regression

tests/promotion-regression.sh (new, in CI) runs the same fixture channels through the promotion tooling of be8ab9bd (master before the check) and through this branch's tooling (this PR together with omarchy-pkgs#1744). It then requires every step to match exactly: exit code, plan (each package's action and hold reason), publishes, and the resulting channel database. The fixtures are an x86-only set and a non-Mac aarch64 set; the last aarch64 step names a non-Mac package while a Mac stack is ahead on edge.

step before (be8ab9bd) after (this branch)
x86_64 whole channel edge → rc exit 0; promoted alpha, docs, shared-lib, x86-split(+extra); held fast, pinned identical
x86_64 named alpha edge → rc exit 0; nothing to do identical
x86_64 rc → stable exit 0 identical
x86_64 --fast-ring edge → stable exit 0 identical
aarch64 dry run edge → rc exit 0; nothing published identical
aarch64 whole channel edge → rc exit 0; promoted arm-tool, docs, shared-lib; held arm-ahead (rc ahead), fast identical
aarch64 rc → stable exit 0 identical
aarch64 --fast-ring edge → rc exit 0 identical
aarch64 named arm-tool, Mac stack ahead on edge exit 0; promoted arm-tool only identical
== x86_64 whole channel edge -> rc: exit 0
{"arch":"x86_64","name":"fast","from_version":"1.0-2","to_version":"1.0-1","action":"hold","reason":"fast ring: published to rc at merge"}
{"mirror":"rc","arch":"x86_64","status":"published","packages":["alpha-1.0-2-x86_64","docs-1.0-2-any","shared-lib-1.0-2-x86_64","x86-split-1.0-1-x86_64","x86-split-extra-1.0-1-x86_64"]}
rc/x86_64: alpha-1.0-2 docs-1.0-2 fast-1.0-1 pinned-1.0-1 shared-lib-1.0-2 x86-split-1.0-1 x86-split-extra-1.0-1
== aarch64 named non-Mac edge -> rc, Mac stack ahead on edge: exit 0
{"mirror":"rc","arch":"aarch64","status":"published","packages":["arm-tool-1.0-2-aarch64"]}
rc/aarch64: arm-tool-1.0-2 linux-aurora-1.0-1 omarchy-mac-1.0-1 shared-lib-1.0-1
PASS: x86_64 and aarch64 non-Mac promotions: same exit codes, plans, publishes and databases with and without the check (9 steps)
PASS: the check reads every one of those promotions as untouched

The only difference is additive. With the change, the record carries one {"type":"mac-set","result":"untouched"} line per run (asserted, then set aside before comparing), and stdout gets one info line.

Fixture channel cases (tests/mac-package-set.sh)

The fixture channels hold Mac pkgbases mac-kernel, mac-boot and mac-audio (arch=any), plus mac-new (inventory none). They also hold the shared shared-lib (provides libshared.so) and the fast-ring fast-tool (provides tool-api). Each case runs through promote-channel or check-mac-set --remote --add the way the workflows call them:

case result
whole-channel edge → rc carrying the qualified set (aarch64), and the arch=any package on x86_64 pass, published
named non-Mac alpha while edge's Mac stack is ahead untouched, published as before
whole-channel and named OPR → RC with mac-kernel 1.0-2 (inventory 1.0-1) refused, names mac-kernel
x86_64 with unqualified arch=any mac-audio 1.0-2 refused, names mac-audio (same rule)
mac-new (inventory none) refused, names it
rc → stable carrying only mac-kernel refused, names mac-audio, mac-boot (missing)
rc → stable with the whole set pass
shared-lib 2 drops libshared.so=1 (no Mac package moves) refused, mac-boot needs libshared.so=1; rc would offer only libshared.so=2 (from shared-lib)
--fast-ring with fast-tool 2 dropping tool-api=1 refused
merge publish (--add): breaking / non-Mac / compatible fast-ring file refused / untouched / pass
malformed inventory; unreadable channel usage error (exit 2), fails closed
inventory pkgbase no recipe builds refused, names it
mac-audio rebuilt under unlisted pkgbase audio-renamed refused, mac-audio would move from Mac pkgbase mac-audio to audio-renamed
merge publish --slots: rc/x86_64 untouched + rc/aarch64 breaking refused; neither slot published
merge publish --slots: all slots pass cleared
refused promotion, dry run, fast ring exit 1, nothing published
after-view cannot be built; check cannot run refused (fails closed), nothing published

Whole suite

command before (be8ab9bd) after (this branch)
GitHub CI self-tests (every test in test.yml, native x86_64) green on master run: 223 PASS lines, 0 FAIL
GitHub CI build-isolation green on master run: pass
local, Arch container: each test.yml self-test plus every pkgbuilds/*/test.sh 41 ok, 0 fail 41 ok, 0 fail, plus mac-package-set.sh (25 PASS) and promotion-regression.sh (2 PASS)
tests/promote-channel.sh 17 PASS 17 PASS
tests/publish-artifact.sh 12 PASS 12 PASS
tests/fast-ring-check.sh 27 PASS 27 PASS
node --test tests/{pr-workflow-approval,sync-upstream-summary,builder-image}.cjs (local macOS) 73 pass, 7 fail 73 pass, 7 fail (same failures: the macOS host lacks a git checkout and Linux tools; green in CI)

Commands:

docker run --rm -v "$PWD:/workspace:ro" -w /workspace ghcr.io/archlinux/archlinux:base-devel bash -lc '
  pacman -Syu --noconfirm git jq libarchive rclone >/dev/null
  ./tests/mac-package-set.sh
  BASELINE_REF=be8ab9bda3e53b163153944395f1912ac6d7f44f ./tests/promotion-regression.sh
  ./tests/promote-channel.sh && ./tests/publish-artifact.sh'

x86-visible behaviour

Yes, this PR changes x86-visible behaviour, and it's isolated here so Ryan can agree the policy. When everything is reachable, promotions with no Mac change behave exactly as before; tests/promotion-regression.sh above proves it on x86_64 and aarch64. What changes:

  • an x86_64 run carrying an unqualified arch=any Mac package (aurora-audio, alsa-ucm-conf-aurora);
  • a whole-channel run whose aarch64 leg would move an unqualified Mac package (both arches are left untouched);
  • a shared package (omarchy, limine-mkinitcpio-hook, …) that would break a Mac dependency;
  • a merge publish whose rc/stable slots include one that would be refused: nothing publishes, edge and x86_64 included;
  • failures now fail closed, even with no Mac change: if R2 can't be listed for a fast-ring slot, or the check can't build its view or run, the promotion or publish is refused instead of going ahead.

Each of these is refused. The full list is under Merge Danger. omarchy-pkgs#1744 changes no x86-visible behaviour (it only reports).

Intended behaviour change

Only promotions that move a Mac package, or something the Mac set depends on, change. They are refused when the result wouldn't be the qualified set or the closure wouldn't resolve, and nothing is published on either arch. The x86-visible consequences are listed under Merge Danger.

promote edge -> rc mac-kernel (unqualified):
✗ Refusing: rc/aarch64 would not hold the qualified Mac set (mac-inventory.txt) with a resolving dependency closure
  → mac-kernel would be 1.0-2 in rc; the qualified Mac set has mac-kernel 1.0-1
✗ Refusing to promote edge/aarch64 into rc/aarch64: nothing published
PASS: a promotion the check refuses publishes nothing
PASS: a dry run of a refused plan fails, so the workflow can check every architecture first
PASS: a refused fast-ring promotion publishes nothing

Merge Danger

Door: two-way

A revert restores report-only.

Blast Radius: promotions

What x86 users and maintainers will see:

  • An edge → rc or rc → stable run (named or whole-channel) that would move a Mac package away from release/mac-inventory.txt now fails, and moves nothing on either arch. With the inventory as seeded (rc's set on 2026-10-28) and edge's Mac stack ahead, today's whole-channel edge → rc would be refused until the owner sets the candidate's versions or the run names only non-Mac pkgbases.
  • aurora-audio and alsa-ucm-conf-aurora are arch=any, so they're in the x86_64 channels and fall under the same rule. That's the agreed no-per-arch-exception rule, but it means an x86_64 run can fail on them.
  • A shared package (omarchy, limine-mkinitcpio-hook, anything the Mac set depends on) is refused if its new version stops satisfying a Mac dependency. That's the joint-blocker rule from the train policy.
  • A merge whose fast-ring build would break the Mac closure publishes to edge but not rc/stable, and the publish job goes red.
  • omarchy-release ship reaches stable through promote.yml, so it's enforced there too. ship itself is unchanged.
  • Each non-dry promote now plans twice per arch (the preflight), which adds about a minute.

@maralcbr
maralcbr force-pushed the mac-package-set-enforce branch from bb202fd to fefa54d Compare October 28, 2026 10:37
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] No new code defect blocks merging; the owner's inventory choice and policy agreement remain explicit prerequisites.

Summary

This PR makes the Mac-set check block promotions instead of only reporting problems.

  • Channel promotions stop when the qualified Mac package set would not hold.
  • Merge publishing checks every destination slot before packages move.
  • The Mac inventory now qualifies newer package versions.

maralcbr explicitly leaves the inventory seed and policy agreement for the owner before merge. The description acknowledges that whole-channel promotions can be refused until the owner selects the qualified set.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Build promotion plans] --> B[Check all target slots]
  B --> C{Every check passes?}
  C -->|No| D[Save refusal record]
  D --> E[Exit without publishing]
  C -->|Yes| F[Publish target slots]
Loading

Reviews (7) · Last reviewed commit: "Qualify the Omarchy 4.5 Mac candidate" · Reviewed by Greptile

Comment thread .github/workflows/promote.yml Resolved
@maralcbr
maralcbr force-pushed the mac-package-set-enforce branch 2 times, most recently from e843ea5 to c4187c8 Compare October 28, 2026 11:14
@maralcbr
maralcbr force-pushed the mac-package-set-check branch from 5e98482 to 64794cd Compare October 28, 2026 11:14
@maralcbr
maralcbr force-pushed the mac-package-set-enforce branch 2 times, most recently from c773913 to b47a065 Compare October 28, 2026 12:16
Comment thread .github/workflows/publish.yml Resolved
promote-channel now refuses a plan check-mac-set refuses, dry run included,
and promote.yml checks every architecture before either publishes. The
fast-ring publish at merge refuses the rc or stable slot the same way.
A Mac package rebuilt under a pkgbase the inventory does not list stays in
the Mac set and is refused, named.
check-mac-set --slots checks a whole merge publish at once, and publish.yml
runs it before its first slot. The fast-ring catch-up plans every slot with
--dry-run first. A refusal on one architecture now publishes nothing.
Set the qualified Mac package set to the 4.5 candidate frozen on edge on
2026-10-29: image omarchy-mac-edge-2026.10.29-20c83855d86d-e0d77393d485
(VM acceptance, and an M2 Max fresh install updated to the same set).
@maralcbr
maralcbr force-pushed the mac-package-set-enforce branch from e37a166 to 74eb2c5 Compare October 29, 2026 08:11
@maralcbr
maralcbr changed the base branch from mac-package-set-check to master October 29, 2026 08:11
@maralcbr
maralcbr merged commit 37c404a into master Oct 29, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant