Skip to content

ci(preview): temporarily unblock external macOS Preview signing - #10223

Merged
Git-on-my-level merged 2 commits into
mainfrom
fix/preview-credentials-temporary
Jul 21, 2026
Merged

Git-on-my-level merged 2 commits into
mainfrom
fix/preview-credentials-temporary

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 21, 2026 •

Copy link
Copy Markdown
Member

Summary

Temporarily unblocks external macOS Preview publishing by giving the already-isolated Preview workflow access to the existing signing/notarization and desktop secret groups.

The live preview build failed before source compilation while importing its Developer ID certificate because desktop_preview_secrets contained only the Preview registry/GCS credentials, not the shared signed-artifact inputs.

  • Retains the exact Preview workflow, immutable SHA dispatcher, Preview registry, and previews/** GCS path.
  • Does not alter Beta or Stable pointers, publication, or promotion logic.
  • Updates the locked Codemagic contract and guard to allow only this exact temporary group list.
  • Repairs the current-main INV-DATA-1 routing guard baseline: the shipped canonical macOS identity is com.omi.computer-macos, with Beta represented by its channel pointer rather than a separate bundle identity.
  • Creates follow-up #10221 to restore least-privilege signing/release/preview capability groups.

Verification

$HOME/workspace/omi/backend/.venv/bin/python -m pytest -q .github/scripts/test_check_release_process_guards.py
81 passed

python3 .github/scripts/check-release-process-guards.py
release process guard checks passed

git diff --check
passed

Failure-Class

Failure-Class: none

Product invariants affected

  • INV-AUTH-1: temporary exception exposes the Preview workflow to existing secure release groups; the exact group list is locked, Preview publication still exits before GitHub release/Beta/Stable handling, and cleanup is tracked in Restore least-privilege credentials for external macOS Preview publishing #10221.
  • INV-DATA-1: Preview continues to use its existing explicitly declared production-compatible runtime URLs; this change does not modify endpoint selection or customer data-plane routing.

Review in cubic

@mintlify

mintlify Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
omi 🟢 Ready View Preview Jul 21, 2026, 7:43 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@Git-on-my-level
Git-on-my-level merged commit 33d4d59 into main Jul 21, 2026
30 of 33 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/preview-credentials-temporary branch July 21, 2026 19:44

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: acb5042216

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codemagic.yaml
Comment on lines +2871 to +2872
- appstore_credentials
- desktop_secrets

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep release secrets out of preview source builds

When an approved preview source SHA is not already trusted as main, this workflow checks out that SHA in the first shared step and then runs repo scripts/build commands from that checkout (scripts/prepare-agent-runtime.sh, scripts/test-tool-surfaces.sh, Swift build, etc.). Adding appstore_credentials and desktop_secrets here therefore makes the Developer ID/App Store keys plus BETA_PROMOTION_TOKEN/GitHub token available to preview branch code, so a malicious or compromised preview branch can exfiltrate release credentials or reserve/promote candidates before the guarded release steps exit. Keep preview on a signing-only/preview-only credential set or run all secret-bearing commands from trusted main-controlled scripts.

Useful? React with 👍 / 👎.

undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…dHardware#10223)

## Summary

Temporarily unblocks external macOS Preview publishing by giving the
already-isolated Preview workflow access to the existing
signing/notarization and desktop secret groups.

The live preview build failed before source compilation while importing
its Developer ID certificate because `desktop_preview_secrets` contained
only the Preview registry/GCS credentials, not the shared
signed-artifact inputs.

- Retains the exact Preview workflow, immutable SHA dispatcher, Preview
registry, and `previews/**` GCS path.
- Does not alter Beta or Stable pointers, publication, or promotion
logic.
- Updates the locked Codemagic contract and guard to allow only this
exact temporary group list.
- Repairs the current-main `INV-DATA-1` routing guard baseline: the
shipped canonical macOS identity is `com.omi.computer-macos`, with Beta
represented by its channel pointer rather than a separate bundle
identity.
- Creates follow-up
[BasedHardware#10221](BasedHardware#10221) to restore
least-privilege signing/release/preview capability groups.

## Verification

```text
$HOME/workspace/omi/backend/.venv/bin/python -m pytest -q .github/scripts/test_check_release_process_guards.py
81 passed

python3 .github/scripts/check-release-process-guards.py
release process guard checks passed

git diff --check
passed
```

## Failure-Class

Failure-Class: none

## Product invariants affected

- **INV-AUTH-1:** temporary exception exposes the Preview workflow to
existing secure release groups; the exact group list is locked, Preview
publication still exits before GitHub release/Beta/Stable handling, and
cleanup is tracked in BasedHardware#10221.
- **INV-DATA-1:** Preview continues to use its existing explicitly
declared production-compatible runtime URLs; this change does not modify
endpoint selection or customer data-plane routing.


<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/10223?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
aryanorastar added a commit that referenced this pull request Sep 29, 2026
…17844)

Fixes #17845.

`_publish_preview_transaction` reads the manifest, stages
`transaction.create` for a new build, and only then reads the slug
pointer. Firestore does not allow a transactional read after a write,
and google-cloud-firestore raises `ReadAfterWriteError` before sending
it. So publishing any new build fails, the manifest is never created,
and a retry fails the same way. The route only catches `ValueError`, so
`POST /v2/desktop/previews/publish` answers 500, and the Codemagic
preview step that calls it with `curl --fail` fails.

#10145 found the preview lane had never completed end to end and #10223
unblocked its Codemagic signing stage; this registry call is the step a
build reaches after that.

The pointer read now sits next to the manifest read, before any write.
This is the same fix #9783 made for the memory ledger (#9780).

With the real google-cloud-firestore 2.20.0 client and `@transactional`
decorator, only the gRPC API stubbed:

| publish a new build | main | this branch |
|---|---|---|
| `POST /v2/desktop/previews/publish` | 500 | 201 |
| Firestore | `ReadAfterWriteError`, rolled back | committed, pointer at
generation 1 |

`TestPreviewPublish` in `test_desktop_previews.py` runs
`publish_preview` against the repo's `StrictFirestore`, which enforces
the same rule. The first-publish test fails on main with its
`ReadAfterWriteError`; the second pins that republishing the same build
writes nothing.

```
$ cd backend && BACKEND_UNIT_TEST_FILE_LIST=<test_desktop_previews.py, test_desktop_updates.py> bash test.sh
155 passed, 0 failed
$ cd backend && MEMORY_MODE=read python -m pytest testing/e2e/
120 passed, 3 skipped, 2 xfailed
```

Failure-Class: none

This branch was successfully deployed

1 active deployment
staging - docs — acb50422 Deployed Jul 21, 2026 by mintlify[bot]
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