Skip to content

fix(deploy): centralize public build release contract - #9845

Merged
Git-on-my-level merged 1 commit into
mainfrom
codex/issue-9820-centralize-jit-deploy
Jul 15, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
codex/issue-9820-centralize-jit-deploy

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

  • centralize all four public-browser deployments in one checked-in composite action
  • extend the public-build contract with each target's Cloud Run region, build context, resource flags, and runtime secret references
  • run a JIT control-plane preflight before image builds: enabled Secret Manager versions plus existing Cloud Run binding type/reference checks
  • remove the scheduled reconciliation job; keep reviewed-source validation on PRs and deployments
  • prevent direct per-workflow build/deploy/promotion bypasses, and teach the deployment-lock policy to recognize the shared writer

Failure class and durable guard

The four browser workflows independently owned deploy settings, while the existing build contract only covered browser inputs. That allowed missing secret versions and literal-versus-secret binding conflicts to reach no-traffic deployment and produced divergent behavior by target. The deployment shape now has one authoritative contract and reusable path:

reviewed contract → live preflight → immutable image → no-traffic candidate → browser acceptance → promotion

Static checks reject bypasses; the JIT preflight rejects known runtime-binding failures before build. A failed candidate never changes serving traffic.

Relates to #9820.

Verification

  • python3 .github/scripts/check_public_build_contract.py
  • python3 .github/scripts/test_check_public_build_contract.py — 14 passed
  • python3 .github/scripts/check-deployment-concurrency.py --self-test
  • python3 .github/scripts/check-deployment-concurrency.py
  • actionlint -shellcheck='' .github/workflows/gcp_{admin,app,frontend,personas}.yml .github/workflows/public-build-config-preflight.yml
  • make preflight — 12 selected checks passed

No live deployment was run; that would create Cloud Run revisions and use production deployment credentials.

Review in cubic

@mintlify

mintlify Bot commented Jul 15, 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 15, 2026, 8:53 PM

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

@mintlify

mintlify Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Project Status Preview Updated (UTC)
omi 🟡 Building – Jul 15, 2026, 8:52 PM

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

@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: 74880d4868

ℹ️ 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".

service: ${{ steps.contract.outputs.service }}
region: ${{ steps.contract.outputs.region }}
image: ${{ steps.candidate.outputs.image }}
no_traffic: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Overwrite secrets from the contract

When a runtime secret is removed from config/public-build-contract.json (or for a target like app where the contract declares none), this deploy still leaves the old Cloud Run secret bindings in place because google-github-actions/deploy-cloudrun defaults secrets_update_strategy to merge and ignores an empty secrets input. That makes the new deployment contract non-authoritative for exactly the cleanup path it is meant to centralize; stale secrets remain available to the service until manually removed. Pass an overwrite strategy (and {} for empty secret maps) so Cloud Run matches the checked-in contract.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit 3849659 into main Jul 15, 2026
22 of 25 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/issue-9820-centralize-jit-deploy branch July 15, 2026 22:05
undivisible pushed a commit to undivisible/omi that referenced this pull request Sep 29, 2026
…9845)

## Summary
- centralize all four public-browser deployments in one checked-in
composite action
- extend the public-build contract with each target's Cloud Run region,
build context, resource flags, and runtime secret references
- run a JIT control-plane preflight before image builds: enabled Secret
Manager versions plus existing Cloud Run binding type/reference checks
- remove the scheduled reconciliation job; keep reviewed-source
validation on PRs and deployments
- prevent direct per-workflow build/deploy/promotion bypasses, and teach
the deployment-lock policy to recognize the shared writer

## Failure class and durable guard
The four browser workflows independently owned deploy settings, while
the existing build contract only covered browser inputs. That allowed
missing secret versions and literal-versus-secret binding conflicts to
reach no-traffic deployment and produced divergent behavior by target.
The deployment shape now has one authoritative contract and reusable
path:

`reviewed contract → live preflight → immutable image → no-traffic
candidate → browser acceptance → promotion`

Static checks reject bypasses; the JIT preflight rejects known
runtime-binding failures before build. A failed candidate never changes
serving traffic.

Relates to BasedHardware#9820.

## Verification
- `python3 .github/scripts/check_public_build_contract.py`
- `python3 .github/scripts/test_check_public_build_contract.py` — 14
passed
- `python3 .github/scripts/check-deployment-concurrency.py --self-test`
- `python3 .github/scripts/check-deployment-concurrency.py`
- `actionlint -shellcheck=''
.github/workflows/gcp_{admin,app,frontend,personas}.yml
.github/workflows/public-build-config-preflight.yml`
- `make preflight` — 12 selected checks passed

No live deployment was run; that would create Cloud Run revisions and
use production deployment credentials.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9845?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. -->

This branch was successfully deployed

1 active deployment
staging - docs — 74880d48 Deployed Jul 15, 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