Skip to content

fix(deploy): fail closed on public build drift - #9828

Merged
Git-on-my-level merged 2 commits into
BasedHardware:mainfrom
Git-on-my-level:codex/issue-9824-public-build-guard
Jul 15, 2026
Merged

Git-on-my-level merged 2 commits into
BasedHardware:mainfrom
Git-on-my-level:codex/issue-9824-public-build-guard

Conversation

@Git-on-my-level

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

Copy link
Copy Markdown
Member

Summary

Closes the immediate drift class behind #9820 without treating it as a one-off persona fix.

  • Adds one checked-in public-build contract for admin, app, frontend, and personas; deterministic CI validates the classification, Docker ARGs, deploy build arguments, and Docker empty-value guards together.
  • Adds a read-only GitHub configuration preflight before every affected deploy and a production daily/PR check. It requires actions: read, reports names/scopes only, and fails on missing, empty, or wrong-precedence variables.
  • Restores the two missing browser-public personas repository variables from the currently served personas artifact, adds the omitted app VAPID build argument, and quotes raw Docker build args so prompt rules cannot be word-split.
  • Makes image builds reject empty required public inputs.

The preflight has also confirmed that the production configuration satisfies the contract. A pre-existing development API_URL gap remains intentionally unfilled because its prior secret value cannot be read safely; a development frontend deploy now fails explicitly instead of producing a broken artifact.

Root cause and durable guard

The recent secret-to-variable migration (#9670) changed external configuration without a canonical build-input inventory or an effective-value check. This PR creates the shared static and live gates; it deliberately does not close the wider architecture work in #9824 (canonical build interface and candidate-artifact verification).

Related: #9820, #9824, #9670, #9690, #9691, #9732, #9745, #9774.

Verification

  • make preflight
  • actionlint for all five affected workflows
  • focused public-build and deployment-boundary fixtures
  • live read-only production preflight for all four targets
  • Docker ARG guard exercised with configured and missing inputs

Review in cubic

Git-on-my-level added a commit that referenced this pull request Jul 15, 2026
## Summary

Fixes #9824.

This is stacked on #9828. Its base is `main` because the parent branch
is in the contributor fork; merge #9828 first, then GitHub will reduce
this PR to the candidate-verification commit.

- Makes the complete browser-public build input set a checked-in,
versioned configuration source for development and production. No
browser build input may fall back to a GitHub variable or a console-only
value.
- Replaces per-workflow ad hoc argument assembly with one preparation
action that reads the configuration at the exact deploying commit
through a read-only GitHub API request.
- Extends the deterministic contract check to reject unclassified
inputs, missing or empty reviewed values, Docker/workflow bypasses,
missing input coverage, missing Docker guards, and missing client
canaries.
- Deploys admin, app, frontend, and personas as uniquely tagged Cloud
Run revisions with zero traffic. It resolves the exact candidate
endpoint, runs a headless-browser smoke against its client
initialization marker, verifies it is still the latest revision, and
only then shifts traffic to that exact revision.
- Adds scheduled and PR validation plus documentation for the source,
candidate, and promotion contract.

## Root cause and durable guard

The issue class was not a single missing environment variable:
browser-delivered values were independently named, stored, injected, and
verified across Dockerfiles and deployment workflows. That made a green
build insufficient evidence that the served client initialized with the
intended configuration.

The durable boundary is now explicit: one reviewed configuration
document defines every declared browser input, the static contract binds
it to the Dockerfiles/workflows/client canaries, and deployment
promotion is gated by a smoke of the exact no-traffic candidate. A
deploy cannot silently substitute a console value, skip a newly added
input, or promote an artifact whose real browser client failed to
initialize.

## Verification

- `make preflight`
- `actionlint` for all five public-build workflows
- public-build contract fixtures and static check
- deployment secret-boundary and concurrency checks
- targeted client lint/type checks; the existing `web/app` `next lint`
command is incompatible with its installed Next version, while its
TypeScript check passes
- live read-only configuration preflight for all four targets on the
pushed branch in both `development` and `prod` (values not logged)

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9831?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. -->
@Git-on-my-level
Git-on-my-level merged commit 3aed894 into BasedHardware:main Jul 15, 2026
21 of 23 checks passed
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