Repository navigation
Description
Goal
Enable a maintainer-approved path to ship a temporary, externally installable macOS Desktop preview from an unmerged Omi feature branch/commit.
The preview must be Developer ID-signed, notarized, and stapled so invited testers get the normal low-friction macOS Gatekeeper experience. It must not affect stable, the shared public beta channel, or backend deployment state.
Product decision
Distribution is invitation-by-link, not authenticated download access control. A non-expiring, readable URL is acceptable and may be forwarded by a tester. The security boundary is authorization to publish a signed/notarized artifact, not secrecy of the URL.
Required implementation approach
1. Protected GitHub dispatcher is the control plane
Create a Publish Desktop Preview GitHub Actions workflow that lives on the repository default branch and is manually dispatched.
Inputs should include:
- source ref, resolved and recorded as an immutable commit SHA;
- a validated preview slug; and
- optional tester/release notes.
The workflow must reject:
- refs from forks or any repository other than
BasedHardware/omi; - source refs outside the approved preview convention (initially
preview/*, unless the implementation documents a deliberately safer equivalent); - invalid/path-traversal-like slugs; and
- requests that do not resolve to a concrete commit in the canonical repository.
A branch-prefix convention is routing/intent only; it is explicitly not sufficient authorization by itself.
2. Maintainer approval gates publishing
Use a protected GitHub Environment, e.g. desktop-preview-publish, whose approvers are the release-maintainers team. Secrets and publish authority must become available only after that environment approval.
Do not maintain a hard-coded GitHub username allowlist in workflow YAML unless a team/environment policy cannot meet the requirement. The desired separation is:
- engineers can request a preview build; and
- only designated maintainers can approve publication of an externally installable signed artifact.
The implementation must not expose signing, notarization, storage-upload, or release-control credentials to fork PRs or unapproved branch jobs.
3. Reuse signing/notarization, but create a distinct preview lane
Add a dedicated Codemagic preview workflow (for example omi-desktop-swift-preview) invoked only after GitHub approval. It should build the exact approved SHA and reuse the proven Desktop release steps for:
- Developer ID signing with hardened runtime and the existing required entitlements;
- Apple notarization via
notarytool; - stapling the app/DMG ticket; and
- signed-artifact smoke verification.
Do not route a feature tag through the existing omi-desktop-swift-release workflow unchanged. That workflow currently matches v*-macos, creates a GitHub release candidate, and dispatches trusted beta qualification; it is part of the normal candidate/beta lifecycle and is not the preview lane.
4. Private-preview publication only
Publish the notarized DMG to a preview-only storage prefix, with CI-only write access. Use the already-serving Desktop-updates bucket as the artifact origin:
https://storage.googleapis.com/omi_macos_updates/previews/<preview-slug>/<full-commit-sha>/Omi-Preview.dmg
Give testers an Omi-branded landing/download URL on the existing macOS download host, following the established stable/beta pattern:
https://macos.omi.me/preview/<preview-slug> # current approved preview
https://macos.omi.me/preview/<preview-slug>/<full-commit-sha> # immutable artifact landing page
macos.omi.me already serves stable at / and beta at /beta; /beta is routed to the Desktop download API. Add preview-specific API/URL-map routing with the same landing-page behavior, but backed by a separate preview registry/record rather than the stable/beta release-channel pointers. The landing page may link/redirect to the immutable GCS object.
The immutable SHA URL is canonical. The slug-only URL is convenience only and must not erase traceability of what a tester installed.
downloads.omi.me is not currently provisioned (it does not resolve in public DNS), so it is not part of this design. No new subdomain is required.
Do not:
- create a public GitHub Release for preview artifacts;
- modify the public stable appcast, shared beta appcast/redirect, Firestore release channel, or update cache;
- dispatch beta qualification/promotion; or
- deploy, promote, or otherwise change backend production traffic as a side effect.
The storage bucket/service-account IAM policy must ensure developers cannot upload or overwrite preview artifacts directly; only the approved CI job may write the preview prefix.
5. Prevent production installation collision
Default to a separately installable preview app, e.g. Omi Preview.app with a distinct preview bundle identifier and isolated update/data/Keychain namespaces as needed. It must not silently replace /Applications/Omi.app.
If an implementation proposes sharing the stable bundle identifier, it must explicitly document why replacement is safe for that particular preview and obtain maintainer approval; this is not the default.
6. Backend handling is explicit
Desktop preview publication must not implicitly deploy feature-branch backend code. Each preview must declare one of:
- client-only / production-compatible API behavior; or
- an explicitly provisioned compatible preview/development backend endpoint.
Acceptance criteria
- A maintainer can approve a request for a
preview/*source ref and a specific SHA is recorded in build metadata and tester-facing notes. - A non-maintainer can request but cannot publish without the protected-environment approval.
- A fork or unauthorized/unapproved ref cannot obtain release/signing/notary/upload credentials or publish an artifact.
- The resulting DMG passes
spctl/notarization validation and installs without the unidentified-developer bypass flow. - The preview is separately installable by default and does not replace the normal Omi application.
- The immutable preview URL is available without expiry; a
latestconvenience URL, if implemented, points to a known immutable artifact. - No public GitHub release, stable/beta appcast change, beta promotion, Firestore channel pointer update, cache clear, or backend deployment occurs.
- Artifact metadata includes source SHA, preview slug, build time, signer/notarization result, and checksum.
- Storage writes are limited to the approved CI identity and preview prefix.
- Add focused automated coverage for workflow input/ref validation and a documented end-to-end maintainer runbook.
Non-goals
- Building an authenticated customer download portal or expiring signed URL system.
- Replacing the existing stable or shared beta desktop release process.
- Making arbitrary feature branches self-service external releases.
- Automatically deploying backend code alongside a desktop preview.
Rollout / verification
Start with one internal preview/* branch and a maintainer-approved test artifact. Verify the exact artifact's signature, notarization/stapling, download path, isolated installation behavior, CI authorization boundary, and absence of public appcast/beta/backend side effects before inviting external testers.
Activity
Git-on-my-level commentedon Jul 14, 2026
Validation note
Validated the distribution assumptions before implementation:
downloads.omi.medoes not resolve in public DNS, so it is not an existing delivery surface. The issue now uses the established raw GCS URL shape and makes a branded hostname optional later work.https://storage.googleapis.com/omi_macos_updates/beta/redirect.jsonand.../beta/latest-url.txtare publicly reachable today. The existing release workflow already writesbeta/objects togs://omi_macos_updateswithgcloud storage cp, so publishing a separatepreviews/prefix is an incremental extension of an existing path, not new hosting infrastructure.projects/_/buckets/omi_macos_updates/objects/previews/, and verify both allowed preview writes and denied beta/stable writes before enabling the lane.The current Codemagic release config provides strong source evidence for the existing bucket upload mechanism; IAM scope remains to be verified during implementation.
Git-on-my-level commentedon Jul 14, 2026
Branded URL correction
Validated the existing macOS download host:
https://macos.omi.me/https://macos.omi.me/betaThe beta path resolves successfully to the Desktop download API with
channel=beta. Updated the implementation contract to use the same host for previews (/preview/<slug>and/preview/<slug>/<sha>), backed by separate preview records and immutable objects under the existing GCS bucket. This avoids provisioning a newdownloads.omi.medomain and keeps previews isolated from stable/beta channel pointers.Add maintainer-approved desktop preview publishing (#9735)
skanderkaroui commentedon Jul 15, 2026
@Git-on-my-level the preview publishing lane (#9735) is merged but not yet operational — the
desktop-preview-publishenvironment was never configured, so trusted previews can't actually build.I pushed a
preview/onboardingbranch and dispatched Publish Desktop Preview (run: https://github.com/BasedHardware/omi/actions/runs/29448378877). Theresolvejob passed (ref → immutable SHA, backend contract validated), butpublishfailed at the Codemagic dispatch step:Inspecting the environment confirms it's empty:
protection_rules: []— the maintainer approval gate isn't enforced (the publish job ran straight through instead of pausing for approval)CODEMAGIC_API_TOKENis missingCould you activate it (one-time, needs repo admin)? On Settings → Environments →
desktop-preview-publish:CODEMAGIC_API_TOKENrelease-maintainersOnce that's in, I can re-run the same workflow (branch already pushed) and get a signed + notarized preview at
https://macos.omi.me/preview/onboarding. Thanks!skanderkaroui commentedon Jul 16, 2026
Follow-up: the token is now in place and dispatch works, so the original ask here is resolved. The remaining failure moved into the Codemagic build itself (no signed artifact published) and is tracked separately in #9895.