Repository navigation
fix(os-ota): guard os-pilot against cross-key release-keys publication (#2391) - #2399
Draft
NubsCarson wants to merge 1 commit into
Draft
NubsCarson wants to merge 1 commit into
NubsCarson wants to merge 1 commit into
Conversation
#2391) Prevent user/release-keys OS OTAs from overwriting the live os-pilot channel while Nov 18 userdebug/test-keys pilot phones remain enrolled on it, and support dedicated os-* release channel tags (such as os-stable) for user/release-keys OTAs. - Parse 3-segment Android build fingerprints and refuse cross-key or cross-type transitions in publishOsRelease before uploading assets or moving alpha-os-update.json (failing closed on missing buildFingerprint). - Add os-* channel tag validation, --tag support across os-manifest, os-publish, os-status, and pixel-bundle, plus --enrollment checks against aosp/pilot-system-update-enrollment.json. - Wire optional channel_tag and pilot enrollment guard into .github/workflows/release-os-ota-publish.yml. - Add dedicated unit tests in apps/app/test/os-ota-guard.test.ts and packages/cli/test/pixel-bundle-channel.test.ts.
NubsCarson
requested a deployment
to
turbo-cache-read
December 4, 2026 20:28 — with
GitHub Actions
In progress
NubsCarson
requested a deployment
to
turbo-cache-read
December 4, 2026 20:28 — with
GitHub Actions
In progress
NubsCarson
temporarily deployed
to
turbo-cache-read
December 4, 2026 20:28 — with
GitHub Actions
Inactive
NubsCarson
temporarily deployed
to
turbo-cache-read
December 4, 2026 20:28 — with
GitHub Actions
Inactive
NubsCarson
temporarily deployed
to
turbo-cache-read
December 4, 2026 20:28 — with
GitHub Actions
Inactive
NubsCarson
temporarily deployed
to
turbo-cache-read
December 4, 2026 20:28 — with
GitHub Actions
Inactive
This branch was previously deployed
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.
Summary
Prevents
user/release-keysOS OTAs from overwriting the liveos-pilotchannel while Nov 18userdebug/test-keyspilot phones remain enrolled on it, and enables publishinguser/release-keysOTAs to a dedicatedos-*channel tag (such asos-stable). Addresses #2391 (context: #672, #673).Changes
apps/app/scripts/release.ts):osBuildVariant(fingerprint)andisCompatibleOsBuildTransition(live, candidate)parsing the 3-segment AndroidBuild.FINGERPRINT(<brand>/<product>/<device>:<release>/<id>/<incremental>:<type>/<tags>) and refusing any cross-type or cross-key transition (such asuserdebug/test-keys<->user/release-keys).readOsPointerandpublishOsReleaseto inspect the livealpha-os-update.jsonbuildFingerprint(failing closed if missing or incompatible) before uploading any archive or mutating the channel manifest or ledger.os-*tag support (apps/app/scripts/release.ts,.github/workflows/release-os-ota-publish.yml,packages/cli/src/commands/pixel-bundle.ts):osChannelTagValid(^os-[A-Za-z0-9][A-Za-z0-9._-]{0,124}$),createGithubOsChannel(tag), tag-awareosKept(url, asset, tag), and--tagsupport acrossos-manifest,os-publish,os-status,publishOsRelease, andcheckOsChannelStatus.assertOsChannelEnrollmentCompatibleandos-publish --enrollment FILEso publishing auser/release-keyscandidate ontoos-pilotis refused wheneveraosp/pilot-system-update-enrollment.jsonpinsos-pilottouserdebug/test-keyswithrotatePlatformOrAVBKeys: false(even if livealpha-os-update.jsonis temporarily absent), while permittinguser/release-keyspublication to a dedicated production tag such asos-stable.channel_taginput (defaultos-pilot) and--enrollment aosp/pilot-system-update-enrollment.jsonto.github/workflows/release-os-ota-publish.yml, while preserving allota doctorinvariants.packages/cli/src/commands/pixel-bundle.tsto validate and extract anyos-*channel tag frommanifest.urlinstead of hardcodingos-pilot.apps/app/test/os-ota-guard.test.ts,packages/cli/test/pixel-bundle-channel.test.ts):os-pilotupdates, dedicatedos-stablepublication and status verification, CLI--enrollment/--tagrefusal, workflow contract assertions, andpixel-bundleos-*tag validation.Companion
elizaOS/elizaOn-Device Guard Noteai.eliza.systemupdater.PackageVerifierlives inelizaOS/elizaatpackages/os/aosp/system-updater/src/ai/eliza/systemupdater/PackageVerifier.java(lines 64-71), not in this repository. That verifier checksota-type=AB,pre-device,post-build,productOf(expectedFingerprint),ota-wipe,ota-downgrade,pre-build(incremental),post-timestamp, andpost-security-patch-level, but does not compare the build-type/signing-keys suffix (:user/release-keysvs:userdebug/test-keys) againstBuild.FINGERPRINT. A companionelizaOS/elizaPR adds that on-devicePackageVerifier.javacheck so both publish-time and device-side defenses are enforced independently.Verification
pnpm --filter @repo/app exec vitest run test/os-ota-guard.test.ts test/image.test.ts: 2/2 files PASS (os-ota-guard.test.ts6/6 PASS,image.test.ts33/33 PASS, 2 skipped)pnpm --filter @repo/cli exec vitest run test/pixel-bundle-channel.test.ts test/cli.test.ts: 2/2 files, 32/32 tests PASSpnpm exec node vibestack/spec.ts tasks @repo/app#typecheck @repo/cli#typecheck: 10/10 tasks PASSNODE_OPTIONS=--max-old-space-size=4096 pnpm exec eslint --max-warnings 0on all 4 touched/added.tsfiles: PASS (0 errors, 0 warnings)pnpm exec jscpd --silent --exit-code 1 --threshold 0across all 4 touched/added.tsfiles plusapps/app/test/image.test.tsandpackages/cli/test/cli.test.ts: PASS (0 clones, 0.00%)pnpm run no-bunandgit diff --check: PASS