Skip to content

Offer M4 Macs on edge, with a qualification rung per Mac - #250

Open
maralcbr wants to merge 12 commits into
mainfrom
feat/catalog-channel-binding
Open

maralcbr wants to merge 12 commits into
mainfrom
feat/catalog-channel-binding

Conversation

@maralcbr

Copy link
Copy Markdown
Member

Summary

Each Mac gets one qualification rung, each signed catalog names its channel, and nothing is signed, published or promoted to a channel that may not serve it. Edge opens to the 12 M4, M4 Pro and M4 Max Macs the engine knows. rc and stable keep their 35.

 scripts/supported-models.json
-  supported / refused / developer / untested lists
+  "apple,j274":  {"qualified": "stable"}
+  "apple,j616s": {"qualified": "edge", "note": "...", "app_minimum": "2.3.17"}
+  "apple,j815":  {"qualified": "developer", "note": "..."}
developer < edge < rc < stable      a channel offers every Mac at or above its rung

sign        channel in the catalog == file name, exactly that channel's Macs, then the key signs
publish     signed channel == destination, every Mac offered there, floor and notes right
os-promote  same, but may offer fewer Macs and may name no channel (rollback)
promote     drops the Macs the target has not reached, strips edge's notes, pins unchanged
app         refuses a catalog that names another channel
  • M4 on rc before stable: the rc rung. With one untested list, an M4 that leaves it joins rc and stable together.
  • Warning: edge must carry a note for each Mac it alone offers; rc and stable refuse one. The note rules come from scottjones's Offer M4 Macs on edge, and keep untested Macs off rc and stable #239.
  • App floor: it follows the Mac on every channel, so it survives qualification.
  • Malformed catalogs: a repeated Mac, a malformed row or a repeated JSON key is refused, in the catalog and its envelope. Python keeps the last repeated key and Foundation the first.

This covers the same ground as #239 and resolves its open review points on the publish destination and the app floor. The two conflict, so only one should merge.

Before merge:

Not here: the app still accepts a catalog that names no channel, since the live ones don't name one.

Evidence

  • Before: publish and os-promote checked the signature and the sequence only, so an edge catalog could be published as stable.
    After:

    publish --channel stable <edge envelope>      refused: signed for 'edge', not the stable
    publish --channel stable <relabelled edge>    refused: stable does not offer apple,j604
    os-promote --to rc <edge catalog>             refused: signed for edge, not rc
    os-promote --to stable <unnamed, with M4s>    refused: stable does not offer apple,j616s
    os-promote --to edge <M5 Air>                 refused: edge does not offer apple,j815
    
  • bash test/all and bash image-builder/test/all pass.

  • swift test: 848 run, one failed, because it assumed every board is apple,j… and this Mac is apple,k116c. Fixed, and its class passes.

  • Hardware: Boot M4 and later Macs through aura's Mach-O Stage 1, and edge images on aura #238 installed the M4 Pro 16-inch. This branch has not been installed on a Mac, and the other 11 M4s have no install.

Merge Danger

Door: two-way

Nothing is published by merging. Schema 2 replaces the manifest's schema 1, so open branches that read the old lists (#239, #248) need a rebase.

Blast Radius: releases

Every catalog build, signing and promotion goes through these checks, and edge runs stop until the app floor moves. Rolling edge back to an image without M4 support needs those Macs lowered to developer first (docs/catalog-release.md).

All three channels trust one key and the signed manifest said nothing about
which channel it was for, so a valid edge envelope published to the stable URL
was accepted by a fresh client. Harmless while all three carry the same models;
the moment the sets differ it would hand stable an edge payload.

The manifest now carries `channel`, and the verifier is told which channel's
URL the bytes came from. A declared channel that contradicts the destination is
refused. The verifier never learns the channel list: it compares two strings it
was given, so ReleaseChannel stays the only place the names live, and the
portable target keeps building without the macOS-only enum.

The field is optional and absent means "published before the field existed".
Stripping it is not an attack, because the payload is signed. The app carries
the destination from the fetch into every later re-verification, through
PreparedInstallerRelease, so plan review and execution check the same bytes
against the same channel the catalog was fetched from.

Promotion now rewrites the channel to its destination, which is why `channel`
joins PROMOTION_FIELDS, and check_same_pins proves both that the result names
the target and that the source's own channel comes earlier in edge-rc-stable.
That refuses a backwards or sideways promotion that previously only the CLI
argument order prevented.

Not covered: make-unsigned-catalog.py emits no channel, so developer catalogs
keep today's behaviour and are accepted anywhere. Tightening that, and making
the field mandatory once every channel has republished, both want their own
change.
One list of 35 boards plus a rule that every channel's catalog must enable
exactly it meant edge had no way to carry a board rc and stable did not. That
is why the M4 Pro and M5 Air bring-up boards sit in `developer`, unreachable
from any channel: there was nowhere else to put them.

The manifest now records, per board, the highest channel it has qualified for
(developer, edge, rc, stable) or the reason it is refused. A channel offers
every board qualified at or above it, so edge's set contains rc's, which
contains stable's. The shape cannot express a Mac that stable offers and edge
does not, which a set of three parallel lists could, and needed a check to
catch.

The direction matters and the plan had it backwards: the field is the highest
channel reached, not the lowest a board may appear in. Every offered board may
appear in edge, so "lowest" distinguishes nothing.

`untested` is gone rather than renamed. It was a notes dictionary whose
docstring claimed the testing team qualifies those Macs on edge, but it only
attached a previewNote to the model in every channel's catalog. Qualifying for
edge is now the gate that enforces that claim, and `note` is just the text a
catalog shows for a board short of stable. A board that has reached stable may
not carry one.

Promotion needed more than the floor, contrary to how this was planned.
Promotion copies the source's models array, so promoting an edge catalog that
carried an edge-only board would have carried it into stable. It now filters to
the target's set, and check_promoted_models refuses a promotion that keeps a
board the target has not qualified for, adds one the source lacks, changes what
a surviving board pins, or empties the channel. Withdrawing a channel's last Mac
is refused outright: the coverage check accepts an empty catalog because that is
how "no release yet" is written, but reaching it by withdrawal is a mistake.

Per-board app_minimum lands with it, so a channel cannot offer a Mac that the
oldest app its catalog admits would refuse before planning starts.

A catalog that names no channel is a private or developer one and is judged by
the private rules, which want the widest channel's whole set. So a channel
catalog that somehow lost its channel fails closed rather than passing under
looser rules. check-catalog therefore needed no new argument, because step one
made the catalog name its own channel.

Migration is a no-op. All 35 boards are qualified for stable, every channel
offers the same set, and no published catalog changes; a test asserts it.

The loader fails closed on an unknown key, a malformed identifier, a note on a
stable board, a bad version or both qualified and refused. It accepts
apple,k116c, with a test saying why: the M5 Pro and Max boards are k-prefixed,
so nothing may assume the j prefix.
apple,j616s moves from developer to qualified-for-edge, the first use of the
floor to make a channel's set differ. Edge offers 36 Macs, rc and stable 35,
and the next promotion drops it on the way to rc.

It carries app_minimum 2.3.17, the first app whose native Recovery includes
AuraStage1. Without that an M4 install cannot enrol a Mach-O Stage 1, and the
engine's own floor does not catch it: the engine declares 2.3.0 because the
engine is fine, and it is the older app's Recovery that lacks the capability.
This is the case per-board app minimums exist for.

So this commit cannot publish edge yet, by design rather than by accident.
Building an edge catalog now refuses with "apple,j616s needs app 2.3.17 or
newer, but the catalog admits 2.3.9", because .github/mac-release-pipeline.json
still names 2.3.9, and that floor cannot move to 2.3.17 while latestVersion is
2.3.16: check_installer refuses a minimum newer than the latest. The order is
publish the 2.3.17 app, let mac-pipeline-pins.yml move latestVersion, then raise
minimumVersion in a pull request of its own, as docs/mac-release-pipeline.md
requires. rc and stable are unaffected at either floor.

Private catalogs are now tied to the narrowest channel rather than the widest.
They owe the fully qualified Macs and may add any other board the manifest
names, developer boards included. Tying them to edge would have broken every
private catalog the moment a board reached edge, which is exactly what this
commit does.

The two release-inputs templates still list the 35 fully qualified Macs, so
nothing about the private or developer path changes here.
The 12 M4, M4 Pro and M4 Max boards are qualified for edge, each with app
minimum 2.3.17, the first app that can enrol a Mach-O Stage 1. apple,j614s
joins them; apple,j575d stays refused, and apple,j616s keeps its own note while
the others say no install has been qualified on the model. rc and stable keep
their 35, and promotion drops the M4s.

The trust policy lists the 12 boards' device trees as edge_device_trees, which
apple,j616s lacked, and verify_payloads requires them on the edge lane, as
inspection does. A candidate set names no lane, so it still asks only for the
fully qualified boards' trees. The pipeline checks the app floor of the lane's
Macs before anything is uploaded, and make-unsigned-catalog checks it for
private catalogs.

Boards, device trees and the pre-upload check come from Scott Jones's #239.
Three defects the audit of this branch found.

Naming the 2024 Mac minis gave them a family, and the family sent them to the
rear power button their enclosure does not have: Apple moved that button to the
underside. The underside test now runs before the family switch, so the branch
it was written for is reachable again, and the test uses the boards rather than
a Mac that has no name.

A developer group left a board short of stable out of the list its app floor is
checked against, so a group was a way for an M4 to be offered to an app with no
AuraStage1. Every Mac a group takes now counts, and the M5 Air names the app it
needs for the same reason the M4s do.

The device-tree buckets now follow the whole ladder instead of its two ends. A
board qualified for rc had to be in no bucket for one test and in device_trees
for another, so the middle rung could not be used at all. One function maps a
lane to the rungs it carries, and inspection reads it rather than repeating it.
Finder rewrites it whenever anything reads the directory, so it turned up
modified again as soon as the test suites ran, and a broad git add would carry
it into a commit. The file itself is still on disk; only the repository stops
following it.
… edge alone

sign and publish refuse a catalog whose signed channel is not the destination,
and os-promote and publish refuse a Mac the destination does not offer, a
preview note off edge and an app floor below what a listed Mac needs. A
rollback to an older catalog with fewer Macs still promotes.

Edge must warn on each Mac it alone offers; promotion strips the note. A
promotion is judged by the target's set alone, so an edge catalog signed before
edge gained a Mac still promotes.
A repeated Mac, a malformed row or a repeated JSON key refuses the catalog
instead of passing or crashing. Signing checks the channel's Macs first, so a
refused catalog leaves no signature. A private catalog takes a developer board
only in a developer group.

The host inspection test accepts a k-series board.
@greptile-apps

greptile-apps Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The reviewed updates appear safe to merge; both earlier findings are fixed.

Summary

Adds per-Mac qualification levels and offers 12 M4 boards on edge. Catalog signing, publishing, promotion, and app checks now enforce channel boundaries.

  • Edge catalogs can offer M4 Macs at their own qualification rung.
  • Release tools keep each signed catalog within its channel’s Mac set.
  • The installer rejects a signed catalog labeled for a different channel.
  • Edge image checks now include the M4 device trees.
  • Mac model names and power-button guidance show the updated Mac details.

Reviews (5) · Last reviewed commit: "tests: keep the promotion tests' OpenSSL..." · Reviewed by Greptile

Comment thread image-builder/test/fixtures.py Resolved
Comment thread scripts/tests/test_catalog_release.py Resolved

This branch has not been deployed

No deployments
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