Repository navigation
catalog: require every channel's catalog to declare that channel - #213
Conversation
…moted without it A catalog's signature binds it to a channel only when the catalog declares one. empty-catalog wrote no channel, and os-promote accepted a catalog that declared none on stable, rc and testing, so the same signed bytes could be served on any of them. empty-catalog now takes --channel and writes it. os-promote refuses a catalog that declares no channel, as it already refused one declaring another. A release set bound for more than one channel stages one signed catalog for each as releases/TAG/catalog.CHANNEL.signed.json, which os-promote reads first; publish-r2 uploads those beside catalog.signed.json. channel-status prints the declared channel and compares stable with rc by what they offer, since their bytes now always differ. prepare-distribution-release.py still reads an undeclared delivery as Testing: the development deliveries published today predate the field. Tests pin that it refuses a delivery signed for any other channel. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The app accepted a signed catalog with no channel field on Stable and RC without any check, and an empty undeclared one on Edge. Such a catalog verifies on every channel alike, so one channel's catalog, or an old one, could be served on another. Stable, RC and Edge now accept only a catalog whose signed channel is that channel, an empty catalog included. Testing keeps one exception, because the development deliveries published today carry no channel: an undeclared catalog is read as Testing only when it lists models and every one is of that delivery lineage. An undeclared empty catalog is no longer accepted there. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Review at ffad3f5. The app side is right.
The Testing exception stays fail-open until aurora-distributions publishes Testing with Still owed at this head: the macOS checks leg. The five new Swift tests have never been compiled, and it was pending when I looked. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist review at ffad3f556a389e9fc78488eafb7c15e4cb71cec8:
Requiring signed channel declaration on Stable, RC, and Edge (including empty catalogs) and blocking promotion of undeclared catalogs closes the cross-channel catalog replay gap cleanly. However, adversarial review confirms four real policy/fail-closed gaps across publish-channels, ReleaseCatalogChannelPolicy.swift, prepare-distribution-release.py, and publish-m1-release that should be fixed before merge.
Checklist summary:
- §1 No model gating: Pass (no chip/board/model gates).
- §2 Production-ready, no hacks: Pass.
- §3 Safety: Needs fixes (see Blockers #1–#4 below).
- §4 Clean-room & attribution: Pass (both commits carry human author/committer
Ryan Murray <ryan@aurorasilicon.org>, humanSigned-off-by:only, zero AI trailers in commits; PR body includesAssisted-by:disclosure). - §5 Evidence: Pass for test/live-catalog read-only verification (
Portable checks+macOS checksgreen; live published R2 catalogs verified read-only; release-tooling review requested). - §6 Naming: Pass.
CI verification at ffad3f556a:
Portable checks: SUCCESSmacOS checks: SUCCESSConformance matrix: FAILURE — verified in job137435061121logs to fail solely on the unrelated repo-wide42x FAIL branch pins: aura 56299352d9f4, pin 3ff778945672(#196) plus the 8 pre-existing-shrunk-syntheticFAIL planrows. Zero PR-specific failures.
Blockers before merge
-
Silent fallback on non-404 errors in
os_promote(macOS/scripts/publish-channels:351-356):if ! fetch_public "releases/$tag/catalog.$channel.signed.json" ...falls back toreleases/$tag/catalog.signed.jsonon any failure (HTTP 5xx, timeout, connection reset, TLS error), not only HTTP404.- If
catalog.<channel>.signed.jsonfails transiently whilecatalog.signed.jsonhappens to exist and declare the same channel,os-promotesilently promotes the fallback instead of failing closed.fetch_status(publish-channels:262-273) already distinguishes200,404, and transport/HTTP errors — fall back tocatalog.signed.jsononly on404and die on any other status.
-
Explicit cross-channel catalog substitution on Edge misclassified as
.notPublished(macOS/Sources/AuroraAppleInstaller/ReleaseCatalogChannelPolicy.swift:47-50):- On Stable, RC, and Testing, a catalog signed for another channel throws
InstallerReleaseConfigurationError.invalidCatalogChannel(verification failure). On Edge, lines 47–50 throw.edgeAlphaUnavailable(rendered as.notPublished/ "Edge isn't available yet") even whendeclaredexplicitly names"stable","rc", or"testing", andtestAnEmptyEdgeCatalogMustDeclareEdgelocks in that behavior. - Reserve
.edgeAlphaUnavailablefor undeclared/unqualified legacy catalogs, and throw.invalidCatalogChannelwheneverdeclared != nil && declared != "edge"so a mis-served or replayed catalog surfaces as a verification failure on all four channels.
- On Stable, RC, and Testing, a catalog signed for another channel throws
-
Bundled Testing validation is weaker than the app's runtime check (
macOS/scripts/prepare-distribution-release.py:69-72):prepare-distribution-release.pyaccepts any catalog wherecatalog.get("channel") in (None, "testing"), without enforcingReleaseCatalogChannelPolicy's requirement that an undeclared Testing catalog be non-empty and satisfyisLegacyDevelopment.- A sealed build passing
prepare-distribution-release.pywith an undeclared empty or non-legacy catalog will fail verification at runtime with no working offline default. Mirror the non-empty + lineage check or require"channel": "testing"for new sealed bundles.
-
Per-channel catalogs uploaded to immutable R2 keys without channel validation (
macOS/scripts/publish-m1-release:446-451):publish_r2_releaseuploadscatalog.<channel>.signed.jsonto immutablereleases/<tag>/keys without checking that each envelope's signed payload declares the channel matching its filename. A mislabeled file burns the immutable tag beforeos-promotecatches it. Validate each per-channel catalog's declaredchannelbefore upload.
Non-blocking notes
macOS/Sources/AuroraInstallerUXCore/PlainLanguage.swift:1211-1226: add.invalidCatalogChannelto the.invalidCatalogEnvelope, .invalidCatalogSignature, .oversizedDocumentverification-failure case rather than falling through to the generic"The release is unavailable"default.- Track removal of the undeclared Testing fallback (and note that
isLegacyDevelopmentatReleaseCatalogChannelPolicy.swift:92returnstruefor all-disabledmodels) in a follow-up issue onceaurora-distributionsstops strippingchannel.
Assisted-by: LLM (Gemini 4 Neon)
os-promote read releases/<tag>/catalog.<channel>.signed.json and, on any failure to fetch it, promoted releases/<tag>/catalog.signed.json instead. A 5xx, a reset or a truncated body for the channel's own catalog could therefore promote the other file without a word, when that file also declared the channel. The fetch now goes through fetch_status: only a 404 falls back, and any other result stops the promotion and names the status. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On Stable, RC and Testing a catalog signed for another channel fails verification. On Edge the same catalog was reported as edgeAlphaUnavailable, which the app shows as "Edge isn't available yet", so a mis-served or replayed catalog looked like a quiet empty channel. Edge now throws invalidCatalogChannel when the catalog declares any other channel. Only an undeclared catalog still reads as not published. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…undled catalog The bundled catalog replaces the fetch for the default channel, but the release preparation accepted any catalog declaring no channel or Testing. A build could pass it with an undeclared catalog the app then refuses, leaving that build with no working default. The bundled catalog of each profile, and the root one, now pass the rule the app applies: a declared channel must be the descriptor's default channel, and an undeclared catalog is accepted only as Testing and only as a development delivery. The lineage test is ported from ReleaseCatalogChannelPolicy, and a shared vector file pins the Swift and Python implementations to the same cases. Two changes to the app's rule make the port exact and close gaps: - An undeclared catalog must list at least one Mac that is not disabled. A catalog of only disabled models matched the lineage test and read as an empty Testing channel. - The payload source must be the canonical release URL byte for byte, and the file name ASCII letters, digits, '.', '_', '+' and '-'. URL parsing let a port, percent-encoding, doubled slashes and a '..' file name through, which a string check in Python would not mirror. Every published Testing catalog still passes both implementations. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…pload publish-r2 uploaded catalog.<channel>.signed.json to the immutable releases/<tag>/ keys without reading it. os-promote refuses a catalog that declares the wrong channel, but by then the key cannot be replaced for that tag. Each per-channel envelope is now decoded and its signed catalog must declare the channel in its file name; otherwise nothing is uploaded. The reader, catalog_declared_channel, is shared with publish-channels os-promote, which sources this script, in place of its inline copy. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
… failure invalidCatalogChannel, which now covers undeclared Stable and RC catalogs and another channel's catalog on Edge, fell through to the generic "The release is unavailable" text. It is a verification failure, so it now reads "The release couldn't be verified", as a bad envelope or signature does. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Five new commits (1f1232b..11a0ef8) address both reviews:
Tests:
Removing the Testing exception is tracked in #220. Assisted-by: LLM (Claude:Opus 5.5) |
|
Review at 11a0ef8.
New code: I found no issues. One small difference that fails safe: the Python lineage test checks against the requested profile set (Omarchy only when enabled), while Swift uses Verdict: APPROVE. Owed: the macOS checks leg at this head (still queued), because the new and changed XCTests have only been compiled on Linux against the fixture. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR re-review at 11a0ef8f2166a4d45e7518d1f7930927e77d1b27 (following REQUEST_CHANGES at ffad3f556a38).
Verdict: APPROVE.
Verified Resolved from ffad3f556a38
- 404-only fallback in
os_promote()(macOS/scripts/publish-channels:353-369, commit1f1232b3): Resolved. Usesfetch_statusso only HTTP404falls back tocatalog.signed.json; HTTP 5xx and truncated 200 / curl failures abort without touching any channel (covered by newCURL_UNAVAILABLEandCURL_TRUNCATEDshell test cases). - Cross-channel catalog on Edge (
macOS/Sources/AuroraAppleInstaller/ReleaseCatalogChannelPolicy.swift:30-37, commitb82866c9): Resolved. Undeclared catalogs on Edge still throw.edgeAlphaUnavailable, while any catalog declaring another channel (empty or non-empty) now throws.invalidCatalogChannel(verification failure), covered by updated and new XCTests. - Bundled default parity & tightened legacy predicate (
macOS/scripts/prepare-distribution-release.py:79-120,164-172&ReleaseCatalogChannelPolicy.swift:24-27,101-140, commite7a7f0ce): Resolved.check_bundled_default()validates every profile and rootrelease.jsonbefore emitting output, mirroring the app's rule. Both Swift and Python enforce byte-exact canonical GitHub release URLs, restricted ASCII file names, and at least one non-disabled model, pinned together by the shared 35-vector fixture (Fixtures/legacy-testing-catalog-vectors.json). - Pre-upload per-channel check in
publish-m1-release(macOS/scripts/publish-m1-release:66-92,470-488, commita3a64020): Resolved. Sharedcatalog_declared_channeldecodes eachcatalog.<channel>.signed.jsonenvelope and verifiesdeclared_channel == named_channelbefore anyaws s3 cpupload (covered by newapple-installer-r2-catalog-channel-test.sh). - Non-blocking notes resolved (
11a0ef8fÜ):PlainLanguage.swift:1212maps.invalidCatalogChannelto the"The release couldn’t be verified"failure display (tested inPlainLanguageTests.swift), and removal of the Testing exception is tracked in#220.
Checklist & CI Verification at 11a0ef8f2166
- §1–§3, §6: Pass — fresh audit of all 5 new commits found no fail-open paths or regressions.
- §4 Clean-room & attribution: Pass — all 7 commits (
4622cce6..11a0ef8f) carry human author/committer (Ryan Murray <ryan@aurorasilicon.org>) and humanSigned-off-by:only, zero AI trailers in commits; PR body carriesAssisted-by:. - §5 Evidence & CI: Pass —
Portable checks,macOS checks,policy, andselftestare all SUCCESS.Conformance matrix(FAILURE, run45106648479) verified in logs to fail solely on the unrelated repo-wide42x FAIL branch pins: aura 56299352d9f4, pin 3ff778945672(#196) plus the 8 pre-existing-shrunk-syntheticFAIL planrows (0 PR-specific failures). Live R2 catalogs (Stable/RC/Edge + all 10 Testing catalogs) verified read-only, and release-tooling owner reviewed at11a0ef8f.
Assisted-by: LLM (Gemini 4 Neon)
Problem. On Stable and RC the app accepted a signed catalog that carries no
channelfield, with no further check. On Edge it accepted an empty undeclared catalog. The publisher still wrote empty catalogs withoutchanneland could promote an undeclared catalog to any channel. The same signed bytes therefore verified on every channel.Change.
ReleaseCatalogChannelPolicy):channelis that channel, empty catalogs included.publish-channels):empty-catalogrequires--channeland writes it.os-promoterefuses a catalog that declares no channel.os-promoteprefers a per-channel stagedcatalog.<channel>.signed.jsonand falls back tocatalog.signed.json.publish-m1-release publish-r2uploads those per-channel files when present.channel-statuscompares stable and rc on content, ignoringchannel/issuedAt.Published state, checked read-only on 2026-11-23. Every published Stable, RC and Edge catalog (base plus 9 profiles) already declares its channel, so this breaks no current user and needs no republish first. All Testing catalogs are undeclared, which is why the exception stays. Removing it needs aurora-distributions to publish Testing with
channel: testingfirst; it currently strips the field inbuild-payload.yml.Testing.
apple-installer-channel-publish-test.sh: 40 ok on main, 42 ok here. The new case fails on main.python3 -m unittest discover -s scripts/tests: 103 OK on main, 106 OK here.ReleaseChannelAvailabilityTests, not compiled locally (no Swift on the buildbox); macOS CI is the first compile.Still to run. macOS CI, and a release-tooling review from whoever runs promotions (review requested from the
publish-channelsowner).Assisted-by: LLM (Claude:Opus 5.5)