Validation and Delivery Evidence
Validate the exact source being proposed with the relevant focused checks. Record the commands and their outcomes, and distinguish local checks, CI, deployment identity and production behavior. A successful source check alone is not evidence of a deployment. Keep independent review and applicable release gates. Deliver each verified change as soon as its required checks pass, and treat release schedules as latest-by times. After a deployment, a regression is fixed forward in the next deploy; roll back only when a fix cannot ship quickly or an active exploit or secret leak is involved. Independent apps and services deploy in parallel; serialize only for a proven dependency, such as a migration before the code that needs it, and record which dependency forced it. Production migration prerequisites verify deployment-marker provenance separately from marker status. The verifier binds the exact planner run and attempt to its successful nested platform deployment job, marker-recording step and reviewed producer contracts. Reusable workflows share their caller’s run identity; they do not supply a separate producer run. Staging source proof retains exact-source and tree-equal direct-parent checks. These checks do not grant migration approval or widen the existing manual recovery policy. A denied proof emits a fixed guard code and phase in its result receipt; unavailable or changed evidence blocks apply. Production planner callees with workflow-level concurrency use distinct literal group prefixes. GitHub supplies the planner’s workflow name to every callee, so a shared name can cause pending deployments to replace each other. The planner workflow contract checks direct group collisions and caller-name dependencies through the nested call graph. Public build and merged-main test dispatches qualify the immutable dispatch revision. The requestedsource_sha must equal that revision; a new dispatch
cannot select an older merged commit under newer workflow controls. Requalify a
historical source by rerunning its original workflow run. Fresh operator,
repository, run and current-policy checks still apply, so a policy change can
deny a historical rerun. Source jobs use hosted runners and read-only permissions;
this does not establish complete runtime-token isolation.
Production migration dispatch
Protected runners for small production jobs
Thetuturuuu-protected runner label targets the dedicated macOS ARM64 pool.
Restrict that pool to the reviewed workflow paths and trusted branch refs in
the runner group settings. Use one-job runner isolation so production
credentials and workspace files cannot carry across jobs. Review runner
routing with Hydrogen before landing changes.
The runner policy allowlists individual jobs by workflow, dispatch trigger,
repository, ref, full job condition, and runner labels. In
supabase-production.yaml, only the hosted prerequisite evaluator uses
workflow_run. The secret writer selects the protected pool for
production and GitHub-hosted Ubuntu for staging. Run
node --test scripts/ci/self-hosted-policy.test.js after routing changes.
Keep Git, Bash, curl, GitHub CLI, OpenSSL and the PostgreSQL client on the
runner service PATH. Grant admission and migration recovery use GitHub CLI.
Recovery and Worlds Labs inventory require psql. The workflows install
Node.js 24 where needed and the migration jobs use the pinned Supabase CLI
setup action. Confirm the tools through the runner service account before
enabling the pool.
Production migration eligibility is evaluated for the workflow’s target SHA.
A successful staging completion re-evaluates the current production tip.
That can be an older revision than the staging run. Read TARGET_SHA and
DATABASE_AFFECTED in Evaluate production prerequisites before interpreting
a skipped apply job. A successful planner completion evaluates its own
production SHA.
For an approved migration, use workflow_dispatch on refs/heads/production
with the user_ok_record_id and a 40-hex migration_patch_id. The automatic
path checks for pending database paths at its target. Both paths require an
accepted staging migration marker and a successful Web deployment marker from
the matching production planner.
- Before promotion, require the manifest to state
migrations: yes → dispatch at markerormigrations: none. For a migration promotion, include the precomputed 40-hexmigration_patch_idfromgit patch-id --stableover the migration diff covered by the approval. - As soon as the exact-SHA
cloudflare-production-webdeployment marker has been recorded and the Production Deployment Planner concludessuccess, dispatchsupabase-production.yamlonrefs/heads/productionwith the approveduser_ok_record_idand the manifest’smigration_patch_id. - Confirm the apply job succeeded, verify the applied migration list against the manifest, and smoke-test the affected endpoints.
e38d3061d1 verifies a sanitized HTTP 503 when a required
object is absent.
Release bot sign-off for definer records
Ask for sign-off when an integration commit adds or rebinds records inscripts/ci/security-definer-verified-findings.json. Review the exact commit’s
ledger and migration changes. Use a single-commit integration push for this
workflow so the target’s first parent is the base used by Security Checks.
GitHub must already be able to resolve the target commit. If it exists only
locally, dispatch after the authorized push and rerun the Definer execution
policy job on the original push run after sign-off.
From a checkout containing the integration commit, compute the required
description with the admission helper. Set head to the full integration SHA.
vhpx checks the
displayed SHA against the reviewed integration commit, selects Review
deployments, checks release-bot-signoff, and selects Approve and deploy.
The job recomputes the description from the two commit trees using the trusted
admission helper. The status links back to the approved workflow run.
Wait for the workflow to succeed before rerunning the original definer check.
The guard authenticates the workflow path and main dispatch, checks GitHub’s
record of vhpx approving the protected environment, and verifies the immutable
run artifact that binds the status ID and ledger digest to the exact commit.
A copied run URL alone cannot satisfy admission.
Admission covers the new ledger records. The push check still uses the SQL
guard and static proof pins from its resolved trusted base. If the independently
reviewed push also introduced a proof pin needed by that check, replay the full
definer scan with the reviewed guard and record any findings. Use the audited
base recovery below for a subsequent main push once the omitted range and
trusted guard have both been approved. Keep the original run’s result in the
release evidence.
If the integration SHA changes, recompute the description and dispatch again.
For a failed submission or expired receipt, check the status and workflow run
before starting a fresh dispatch and approval. Sign-off is limited to the
first attempt of each dispatch so that its approval history is unambiguous.
In repository settings, restrict the release-bot-signoff environment to the
main branch with vhpx as required reviewer and administrator bypass disabled.
The sign-off job uses its short-lived GitHub Actions token with read access
to contents and write access to commit statuses. No environment secret is
required. If the environment is recreated, update the pinned environment ID
in the admission verifier through the security review process.
Label-gated heavy PR CI (ready-for-ci)
Heavy PR workflows require the ready-for-ci label. Non-draft pull requests from the same repository are eligible on opened and ready_for_review; forks are excluded from automatic admission. Independent review and green exact-head CI remain separate merge requirements. Run focused pre-push checks on an admitted development machine to reduce avoidable first-run failures. Skipped checks are not executed verification.
auto-ready-for-ci.yaml labels eligible pull requests using live pull-request metadata. It runs hosted metadata-only code from the base branch, without checking out or executing PR code. It is always-on admission automation rather than an affected-path validation job. Configure CI_ADMISSION_TOKEN as a token scoped only to this repository, with issues write and pull requests read permissions. A GitHub App installation token requires an existing rotation supplier; a fine-grained token requires expiry and renewal ownership. No token is created or installed by the workflow. Do not reuse the release administrator token.
The separate token is required because labels written with GITHUB_TOKEN do not trigger the labeled CI event. A missing admission token fails visibly; there is no fallback that adds a label without starting CI. Already-labelled PRs are unchanged. Before activation, the token supplier and independent workflow review must be accepted. An operator may add the label through the existing authenticated GitHub route while that supplier is unavailable.
Public pull-request jobs use GitHub-hosted runners. Self-hosted CI is restricted to trusted push or workflow_dispatch jobs on main; it must not execute fork PR code or receive production secrets. Machine admission and production-host headroom remain mandatory.
Authorized CI Queue Cleanup
Cancellation needs explicit authorization for its scope. Identify each run and its source before acting, preserve required release and deployment work, and record the observed outcome. A branch name alone does not establish that a run is redundant. During queue cleanup, cancel only supersededmain runs of the workflows in
scripts/ci/main-supersession.json; preserve every other main run. GitHub can
replace a pending run in a shared group even when cancel-in-progress is false.
A cancelled run with no jobs at the next push is consistent with pending
replacement. Check job history and timing before attributing it to an operator
or fleet task.
Main-push concurrency
By default a main push keeps its own validation group, keyed by commit SHA, run ID and run attempt, and an active run is never cancelled. Pushes to production never cancel an active run. PR and feature-branch validation still supersede earlier revisions where configured. Reruns and release-candidate dispatches keep their separate qualification groups. Stateful operations retain their own locks. The staging migration job uses a shared non-cancelling lock withqueue: max across main pushes and repair
dispatches. The SDK dev channel retains its expanded workflow queue for
ordered publication.
Main-push supersession
Validation workflows inscripts/ci/main-supersession.json share one group
per workflow for ordinary main pushes. A newer push cancels an older run.
Every workflow that can run on a main push must appear in that list or have a
reason in scripts/ci/main-supersession-exemptions.json. The inventory test
covers branch and path-filtered triggers and rejects missing or duplicate
entries.
- Range. A push’s
before..afterrange omits changes from cancelled pushes. Incremental validation compares the new head to the last green main push for the same workflow. Full-snapshot validation checks the new head directly. When the lookup cannot establish a range, affected checks run in full where possible. Security Checks requires a base for its trusted policies and audit diff. Main Fast Checks requires a base to check docs deletion markers for each commit in the range. - Pinned evidence. Dispatches, production pushes, generated Release Please refs, and reruns keep isolated groups. Reusable artifact producers apply supersession only to direct main pushes.
- Exemptions. Publication, migration, release, and repository mutation workflows retain their existing locks. Oxc’s branch cleanup closes PRs and deletes refs under a serialized job lock. CodeQL keeps its running audit and coalesces pending pushes. Exact-artifact consumers and paused or specialized workflows have individual reasons in the inventory.
Recover Security Checks with an audited base
Security Checks on a main push can use the repository Actions variableSECURITY_TRUSTED_BASE_OVERRIDE for a one-push recovery. The resolver first
requires a normal last-green base, then accepts a full 40-hex commit SHA only
when it is a strict descendant of that base and a strict ancestor of the push
head. An invalid value leaves the normal base in effect. A head-equal value
would produce an empty scan range and is rejected.
- Land the reviewed resolver with the variable unset. The range step loads
the resolver from the push’s
beforecommit, so a subsequent push whosebeforeincludes the resolver is required. - Before setting the variable, record the exact normal base, audited base and intended push head. Include the complete set of commits and changes omitted by moving the base, independent security review evidence for that set, and approval to use the audited commit’s trusted security scripts and policy. Check that the audited base still strictly advances the latest green base.
- With other main pushes paused, set and read back the variable to the exact reviewed SHA. Make one qualifying main push and check the Audited Security Checks base override warning on that exact run. It records the normal base, the base used and the head. Use the warning to confirm capture before clearing the variable, and compare all three SHAs with the review record. A successful Git push alone does not establish that the workflow captured the variable.
- Unset the variable immediately after that confirmation and verify it is absent before allowing more main pushes. If the resolver finishes without the warning, the run ends before the resolver can execute, or the warning’s SHAs differ, clear the value and investigate before another attempt. Verify the recovery run is green and that a subsequent main push is green with the normal base and no override warning. Record both exact run IDs and heads.
Protect a promotion pin
Automations sets the repository Actions variablePROMOTION_PIN_SHAS to the
comma-separated full 40-hex SHAs of all active promotion pins, with no spaces.
Serialize updates with the promotion owner so adding or removing a pin preserves
the others. Set and read back the variable before allowing a newer main push,
including when the pinned push has already started.
A nonempty value makes every incoming main push in the supersession list use
its own SHA, run ID and attempt group with cancellation disabled. This also
protects an earlier push in the shared latest group. GitHub evaluates
cancellation on the incoming run and can replace a pending run in a shared
group even when active cancellation is disabled.
Keep each SHA listed until its promotion is complete or abandoned. Delete the
repository variable after the last pin is released to restore normal main
supersession. For example, use the authorized repository settings surface or
gh variable set PROMOTION_PIN_SHAS -R tutur3u/platform --body "$pin_shas",
then verify the value with
gh variable get PROMOTION_PIN_SHAS -R tutur3u/platform. To clear the last pin,
use gh variable delete PROMOTION_PIN_SHAS -R tutur3u/platform.
An already cancelled run needs an exact-SHA rerun or
release-candidate dispatch. The workflow
contract in scripts/ci/main-supersession-workflows.test.js covers protection
for pins recorded before and after run creation.
Draft PR runner admission
Draft status defers heavy verification where configured. Security eligibility and required checks follow the checked-in workflows. Moving a PR out of draft does not itself establish review approval or successful verification.Hosted runner reservation and PR queue pressure
Batch reviewable changes and use authorized local or development-runner checks to reduce PR queue pressure. Queue position and concurrency settings do not guarantee release capacity. Preserve the source identity and evidence for every reported result.Meet, Lettin, and Parley Cloudflare validation
App validation covers the affected application and its dependencies. Verify build metadata against the candidate source where required. Local tests, emitted artifacts and deployed behavior are distinct evidence; passing one does not establish the others.Pinned Meet release admission
Meet release admission (used byproduction-ref runs and standalone
release=true dispatches with source_sha) admits a source only when the
newest main push or dispatch run of Security Checks and of Meet Cloudflare
succeeded on that exact commit. RELEASE_EXCEPTIONS in
scripts/ci/meet-standalone-release.mjs can cover Test, TypeScript Type Check
and Oxc Check for one named source; it never covers those two.
Meet Cloudflare is path-filtered, so a pin whose newest commits fall outside
Meet’s paths has no run on it and admission refuses it. Dispatch the workflow on
main without inputs while main still points at the pin. That run validates
and deploys nothing.
A standalone main release dispatch (--ref main -f release=true -f source_sha=...)
cannot publish while MEET_DEDICATED_PRODUCTION_ENV_READY=true targets
meet-cloudflare-production and both meet-cloudflare-production and
meet-production enforce a production-only deployment branch policy with no
required reviewers: it passes validate and restored-artifact, then GitHub
Actions rejects its deploy job before any step runs. Release Meet through the
normal production-ref promotion instead (see
Meet standalone Cloudflare release).
The production-ref Meet deploy job deploys Realtime (meet-realtime)
before it stages, verifies and assigns the frontend in the same job. Restore
both captured versions together when the room protocol changed between them.
Parley production deploys
Parley’s deploy job runs only on theproduction ref; there is no pinned-source
release from main. Its OpenNext cache population starts a temporary Worker
(open-next-cache-populate) in a remote dev session and posts each cache entry
to it. The deploy credential therefore needs permission to create Workers on
the account. A token limited to named Workers cannot start that helper: every
write waits out its 60-second timeout and the job refuses before the Worker
upload, leaving the serving version unchanged.
PR runner pool: variable, canary and kill switch
PR verification can use a separately admitted runner pool. Routing follows trusted workflow policy and must preserve isolation for untrusted contributions. Pool routing does not replace the PR label gate or independent review. Operator configuration and recovery procedures are maintained privately.Report-only Web E2E
The report-only Web browser workflow runs smoke or broader browser verification according to its trigger. It supplies browser evidence; it does not deploy the application. Its workflow-specific runtime exception does not resume other paused runtimes. The job runs on GitHub-hosted Ubuntu and installs Chromium with its Linux system dependencies. The scoped launcher admits only the trusted main workflow on GitHub-hosted Linux. The launcher carries only allowlisted nonsecret admission fields through the synthetic BuildKitweb_env. The build entrypoint rechecks those fields before selecting Turbo Web build:docker with dependency builds at concurrency 1; missing context retains the paused root alias and invalid context is rejected. Keep fleet verification static; Docker and browser execution belong to the hosted job.
Inspect the Smoke or Nightly step and its reports for browser acceptance. A successful report-only workflow can contain a failed job, and a provisioning failure does not prove that browser tests ran. The dependency image must copy every workspace manifest and file-backed dependency before its frozen install; the focused CI dependency-context test checks that inventory.
The E2E launcher and image bundle log the failed phase and any available
allowlisted OS code, nonzero-exit marker, or registry HTTP status category. Registry response
bodies and subprocess exception text can contain credentials and stay out of
these diagnostics.
The admitted job restores E2E-owned Bun and Chromium download caches using exact
lockfile, platform and dependency inputs without fallback keys. Bun also includes
its pinned version, workspace manifests and patches. Frozen dependency install
and Chromium’s Linux system-dependency install run on both hits and misses.
Only non-Dependabot main pushes save these archives, after successful installs;
the uncompressed limits are 512 MiB for Bun and 1 GiB for Chromium. Missing,
oversized or malformed size measurements skip the save. Scheduled and manual
runs restore matching archives without creating new generations.
These caches contain downloaded dependencies, not built applications, credentials,
browser auth state or database volumes. Runtime setup, disposable identities,
database reset and health checks remain required. Inspect restore hit outputs and
the individual install-step durations when comparing cold and warm runs. A cache
hit does not establish browser acceptance or a measured performance improvement.
Repository cache budget
CI caches reduce repeated downloads and setup work. Cache availability is not guaranteed, and eviction can require fresh downloads. Reusing a cache never substitutes for checking the candidate source and dependency identity. Fixed Supabase seed-catalog callers can opt intopin-cache-key to bind image
pins as well as the service list and platform; default producer/consumer keys
remain compatible. Fixed-catalog restores verify the source-pinned image config
digest and Linux/amd64 platform before use. That config digest identifies runtime
settings and filesystem-layer content under the
OCI image configuration model.
Registry pulls additionally require the pinned registry manifest reference.
Docker save/load does not guarantee preserved registry references,
so archive verification uses the content identity instead of relying on tag
presence or restored RepoDigests. The local image Id must be one of the
pinned digests: the config under the classic image store, or, under the
containerd image store (Docker 29 on the ubuntu-26.04 runner images), the
pinned index for a tag pull or the pinned amd64 manifest for a pull by platform
digest. Ordinary non-catalog consumers retain their
existing cache behavior. Hosted restore acceptance is separate from static tests.
Frozen workflow installs
Workflow dependency installs usebun install --frozen-lockfile, and the retry helper adds the flag to project installs. Deliberate lockfile regeneration and pinned global CLI installs must match an exact workflow file, step name and full command in scripts/ci/frozen-bun-install-exceptions.json, and every exception disables lifecycle scripts. Run node --test scripts/ci/frozen-bun-install-guard.test.js to check the policy. Release credentials are scoped to the steps that push; operator details are maintained privately.
CI summary
TheCI summary check is one check run on the pull request head. .github/workflows/ci-summary-poster.yml computes it from the default branch. The workflow token is contents: read. It is not a workflow_run consumer. The dedicated CI admission App installation token posts the check. The job checks out the default branch only and does not run pull request code.
The check stays in progress while the pull request is a draft, an expected workflow has not started, or a run or check is still open. A completed workflow fails the summary when its conclusion is not success, including skipped and neutral. A completed check fails the summary unless its conclusion is success, skipped, or neutral. The summary succeeds only when every expected run is success and no other completed run or check on that head is failing. Expected workflows are the active default-branch workflows whose pull_request trigger matches the base branch, labels, and changed paths. An unreadable trigger stays expected. The summary’s own check and workflow run are ignored. Path matching can over-match, which waits for more workflows instead of going green early.
pull_request_target posts the current picture. A schedule at minutes 7, 22, 37, and 52 refreshes every open pull request. GitHub may delay or drop a scheduled run, so a settled result can lag.
When vars.CI_ADMISSION_APP_ID and secrets.CI_ADMISSION_APP_PRIVATE_KEY are both absent, the poster job skips and logs “App not configured”. It posts nothing and does not borrow another app’s credentials. A partial or malformed configuration still fails closed, and the poster script refuses an installation token that lacks Checks write permission:
vars.CI_ADMISSION_APP_ID: the dedicated CI admission App’s numeric id.secrets.CI_ADMISSION_APP_PRIVATE_KEY: that app’s PEM private key.
checks: write on the shared Actions token. Install it on tutur3u/platform with Actions read, Checks read and write, Contents read, Metadata read, and Pull requests read. Store CI_ADMISSION_APP_ID as a repository variable and CI_ADMISSION_APP_PRIVATE_KEY as an Actions secret. The deleted workflow id 407998590 stays deleted; this poster is a different file.
Test and Type Check draft admission
Test and Type Check defer every validation job while a pull request is a draft, even ifready-for-ci remains present. ready_for_review admits validation once
the readiness label is present; converted_to_draft cancels superseded PR work
and starts a skipped run. Protected branch pushes retain validation. Check names
and aggregate failure assertions remain stable. Regression coverage:
scripts/ci/test-type-draft-admission.test.js.
The trusted App admission path must keep opened and ready_for_review: its App
label write generates the real pull_request:labeled event. Security classification
continues on drafts and bot-authored PRs. Summary metadata events retain draft and
label transitions so the displayed readiness state stays accurate.
Type Check runtime budget
The Type Check step runs at most two Turbo tasks concurrently to limit runner pressure. Turbo streams output with task labels as packages start and report results. If a job reaches its 20-minute limit, use the last task labels in the retained log to narrow the investigation. Admin’s type check reads the Ops Hub protocol from source. Its Turbo task keeps dependency type checks and builds its required package declarations. The root type-check graph test rejects executable app builds in the Type Check workflow’s full Turbo scope.Pull request runners
PR validation uses GitHub-hosted runners across direct and reusable workflows. The required Test root-script job checks the runner routes withscripts/ci/self-hosted-policy.js.
Calendar owning-suite timings
Thecalendar-native job in mail-calendar-tasks-builds.yaml reports Calendar,
Web and shared Tasks UI tests as three sequential steps after supplier builds,
the native Calendar build and the tracked route-tree drift guard. Each suite
inherits the job’s production profile and CI fixtures. Default success conditions
keep emitted-config qualification, binding and consumer type checks, artifact
sealing, runtime acceptance and restore qualification behind successful tests.
Step separation has zero expected green-path saving. Measure each suite on the
same exact-commit CI run before proposing parallelism, including supplier/build
and artifact-transfer costs. Preserve the generated route tree used by the accepted
build in any future handoff. OAuth tests skipped without integration credentials
provide no integration coverage. Regression coverage is in
scripts/ci/calendar-suite-steps.test.mjs, loaded by the artifact regressions.
Disposable Redis for web unit shards
scripts/ci/run-test-shard.js owns one disposable Redis lifecycle when its
computed shard includes @tuturuuu/web. Both Test workflow shard jobs and the
public merged-main unit path call this runner; neither needs a separate service.
Non-web shards and paused runtimes do not provision a fixture.
Direct bun run --cwd apps/web test calls use scripts/ci/run-web-tests.js,
which applies the same fixture boundary before forwarding Vitest arguments.
This covers Web-owning tests in the Mail/Calendar/Tasks workflow without a
workflow service. An inherited explicitly opted-in endpoint is reused by local
and Turbo-filtered child environments; direct hosted calls provision their own
disposable fixture.
Automatic provisioning requires GitHub-hosted Linux. The helper pulls the official
library/redis image by immutable digest, publishes only an ephemeral loopback
port, disables persistence, and caps Redis memory at 16 MiB inside a 64 MiB
container. Readiness has 30 bounded attempts. Cleanup matches the random owner
name and label, removes only that container and its volumes, and fails the run
when cleanup fails. SIGINT/SIGTERM terminate the owned test process group before
cleanup. Forced host termination still relies on the ephemeral runner teardown.
Local execution requires an independently owned fixture and explicit
LIVE_MINT_TEST_REDIS_DISPOSABLE=1, plus exactly one
LIVE_MINT_TEST_REDIS_PORT (loopback) or absolute
LIVE_MINT_TEST_REDIS_SOCKET. Production Redis URLs and credentials never select
this endpoint. Local execution does not start Docker or pull an image. Turbo
hashes the disposable opt-in and passes the ephemeral endpoint to test tasks.
The real Redis suite retains its refusal without explicit opt-in.
Verify lifecycle controls with node --test scripts/ci/disposable-redis.test.js scripts/ci/test-shards.test.js. On an admitted local fixture, run the real web
src/lib/live/mint-cap.redis.test.ts suite with one worker. Docker startup and
signal cleanup require an ephemeral Linux CI receipt before claiming live
container coverage; injected command tests cover local failure paths.
Image provenance: official Redis image and
Docker port publication.
The helper pins the SHA-256 verified from the registry manifest index for
7.4-alpine; review and reverify the digest before updating it.
Web Vercel route budget
The Web preview and production workflows count routing rules in.vercel/output/config.json after the Vercel build. The maximum is 2,000,
leaving 48 rules below Vercel’s deployment limit. Web production is served from
Cloudflare; the Vercel build remains only as the legacy platform deploy and
marker, so do not grow toward the limit. The count appears in the
Check Web route budget step. Treat the Route (app) listing as a source
inventory because one Next.js endpoint can produce several routing rules.
Keep the URL and method contracts when consolidating workspace APIs. Selected
legacy resource groups share generated catch-all wrappers. Update the underlying
handlers and regenerate wrappers with
node scripts/generate-web-api-route-wrappers.js --write.