Repository navigation
ci(preview): temporarily unblock external macOS Preview signing - #10223
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
💡 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".
| - appstore_credentials | ||
| - desktop_secrets |
There was a problem hiding this comment.
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 👍 / 👎.
…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. -->
…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
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_secretscontained only the Preview registry/GCS credentials, not the shared signed-artifact inputs.previews/**GCS path.INV-DATA-1routing guard baseline: the shipped canonical macOS identity iscom.omi.computer-macos, with Beta represented by its channel pointer rather than a separate bundle identity.Verification
Failure-Class
Failure-Class: none
Product invariants affected