Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 94 additions & 8 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ jobs:
include-hidden-files: true
retention-days: 1

backend:
backend-foundation:
runs-on: ubuntu-latest
timeout-minutes: 12
outputs:
scope: ${{ steps.scope.outputs.scope }}
steps:
- name: Checkout backend candidate and history
- name: Checkout foundation candidate and history
uses: actions/checkout@v7
with:
fetch-depth: 0
Expand Down Expand Up @@ -117,13 +117,97 @@ jobs:
if: ${{ steps.scope.outputs.scope == 'full' }}
run: npm ci

- name: Verify D1, Worker, reference client and security behavior
- name: Verify D1 foundation, authorization and reference clients
if: ${{ steps.scope.outputs.scope == 'full' }}
run: npm run test:d1:core && npm run orbit:test:clients
run: npm run test:d1:core:foundation && npm run orbit:test:clients

- name: Record frontend-only backend decision
- name: Record frontend-only decision
if: ${{ steps.scope.outputs.scope != 'full' }}
run: echo 'No backend/security path changed; the fail-safe classifier selected frontend validation.'
run: echo 'No backend/security path changed; this validation slice is not required.'

backend-site:
runs-on: ubuntu-latest
timeout-minutes: 12
outputs:
scope: ${{ steps.scope.outputs.scope }}
steps:
- name: Checkout site-auth candidate and history
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Classify changed paths independently
id: scope
env:
BEFORE_SHA: ${{ github.event.before }}
EVENT_NAME: ${{ github.event_name }}
run: |
if [[ "$EVENT_NAME" == 'workflow_dispatch' || -z "$BEFORE_SHA" || "$BEFORE_SHA" =~ ^0+$ ]]; then
printf 'scope=full\n' >> "$GITHUB_OUTPUT"
exit 0
fi
git diff --name-only "$BEFORE_SHA" "$GITHUB_SHA" | node scripts/orbit-actions-scope.mjs

- name: Set up Node
if: ${{ steps.scope.outputs.scope == 'full' }}
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install dependencies
if: ${{ steps.scope.outputs.scope == 'full' }}
run: npm ci

- name: Verify site authorization and sign-in behavior
if: ${{ steps.scope.outputs.scope == 'full' }}
run: npm run test:d1:core:site

- name: Record frontend-only decision
if: ${{ steps.scope.outputs.scope != 'full' }}
run: echo 'No backend/security path changed; this validation slice is not required.'

backend-public:
runs-on: ubuntu-latest
timeout-minutes: 12
outputs:
scope: ${{ steps.scope.outputs.scope }}
steps:
- name: Checkout public-core candidate and history
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Classify changed paths independently
id: scope
env:
BEFORE_SHA: ${{ github.event.before }}
EVENT_NAME: ${{ github.event_name }}
run: |
if [[ "$EVENT_NAME" == 'workflow_dispatch' || -z "$BEFORE_SHA" || "$BEFORE_SHA" =~ ^0+$ ]]; then
printf 'scope=full\n' >> "$GITHUB_OUTPUT"
exit 0
fi
git diff --name-only "$BEFORE_SHA" "$GITHUB_SHA" | node scripts/orbit-actions-scope.mjs

- name: Set up Node
if: ${{ steps.scope.outputs.scope == 'full' }}
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install dependencies
if: ${{ steps.scope.outputs.scope == 'full' }}
run: npm ci

- name: Verify public repository and identity behavior
if: ${{ steps.scope.outputs.scope == 'full' }}
run: npm run test:d1:core:public

- name: Record frontend-only decision
if: ${{ steps.scope.outputs.scope != 'full' }}
run: echo 'No backend/security path changed; this validation slice is not required.'

backend-publication:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -212,10 +296,12 @@ jobs:
deploy:
needs:
- frontend
- backend
- backend-foundation
- backend-site
- backend-public
- backend-publication
- backend-platform
if: ${{ needs.frontend.result == 'success' && needs.backend.result == 'success' && needs.backend-publication.result == 'success' && needs.backend-platform.result == 'success' && needs.frontend.outputs.scope != 'docs' && needs.frontend.outputs.scope == needs.backend.outputs.scope && needs.frontend.outputs.scope == needs.backend-publication.outputs.scope && needs.frontend.outputs.scope == needs.backend-platform.outputs.scope }}
if: ${{ needs.frontend.result == 'success' && needs.backend-foundation.result == 'success' && needs.backend-site.result == 'success' && needs.backend-public.result == 'success' && needs.backend-publication.result == 'success' && needs.backend-platform.result == 'success' && needs.frontend.outputs.scope != 'docs' && needs.frontend.outputs.scope == needs.backend-foundation.outputs.scope && needs.frontend.outputs.scope == needs.backend-site.outputs.scope && needs.frontend.outputs.scope == needs.backend-public.outputs.scope && needs.frontend.outputs.scope == needs.backend-publication.outputs.scope && needs.frontend.outputs.scope == needs.backend-platform.outputs.scope }}
runs-on: ubuntu-latest
timeout-minutes: 8
environment:
Expand Down
127 changes: 80 additions & 47 deletions .github/workflows/full-regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,107 @@ concurrency:
cancel-in-progress: false

jobs:
full-regression:
frontend:
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 12
steps:
- name: Checkout
uses: actions/checkout@v7
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- name: Verify complete production frontend
run: |
npm run actions:scope:test
npm run verify:frontend:production

- name: Set up Node
uses: actions/setup-node@v7
backend-foundation:
runs-on: ubuntu-latest
timeout-minutes: 12
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test:d1:core:foundation && npm run orbit:test:clients

- name: Install dependencies
run: npm ci
backend-site:
runs-on: ubuntu-latest
timeout-minutes: 12
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test:d1:core:site

- name: Run the complete application regression
run: |
npm run actions:scope:test
npm run check
npm run build
npm run production:config:check
npm run worker:build:production:live
npm run contract:live
backend-public:
runs-on: ubuntu-latest
timeout-minutes: 12
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test:d1:core:public

backend-publication:
runs-on: ubuntu-latest
timeout-minutes: 12
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test:d1:publication

backend-platform:
runs-on: ubuntu-latest
timeout-minutes: 12
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test:d1:platform

live-contract:
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- run: npm ci
- name: Verify the live agent contract
run: npm run contract:live

# Staging provaları hiçbir yerde otomatik koşmuyordu ve bir tanesi üç
# hafta boyunca bozuk kaldı: sunucuya yeni bir yayın kısıtı girdi, betik
# ondan habersiz kaldı, kimse çalıştırmadığı için kimse görmedi.
#
# Bu iş staging'e YENİ KOD DAĞITMIYOR. Staging Samet'in elle kullandığı
# kapı; gece yarısı üzerine yazmak, sabah bakmak için bıraktığı şeyi
# silmek olurdu. Burada aranan şey provaların ürüne ayak uydurup
# uydurmadığı — bunun için o an staging'de ne varsa yeter.
staging-rehearsal:
needs: full-regression
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Node
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

# Eksik bir secret'ın hatası, provanın kendi hatasına benzemesin.
# Kimlik bilgisi olmadan düşen bir iş, gerçekten kırılmış bir
# sözleşmeyle karıştırılırsa görmezden gelinmeye başlar.
- name: Verify the staging credentials are present
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Expand All @@ -77,32 +125,17 @@ jobs:
[ -n "$CLOUDFLARE_API_TOKEN" ] || missing="$missing CLOUDFLARE_API_TOKEN"
[ -n "$ORBIT_SESSION_PEPPER_V1" ] || missing="$missing ORBIT_STAGING_SESSION_PEPPER_V1"
[ -n "$ORBIT_CSRF_PEPPER_V1" ] || missing="$missing ORBIT_STAGING_CSRF_PEPPER_V1"
[ -n "$ORBIT_AGENT_CREDENTIAL_PEPPER_V1" ] \
|| missing="$missing ORBIT_STAGING_AGENT_CREDENTIAL_PEPPER_V1"
[ -n "$ORBIT_AGENT_CREDENTIAL_PEPPER_V1" ] || missing="$missing ORBIT_STAGING_AGENT_CREDENTIAL_PEPPER_V1"
if [ -n "$missing" ]; then
echo "::error::Staging rehearsal cannot run. Missing repository secrets:$missing"
exit 1
fi

- name: Rehearse the staging contract
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
ORBIT_SESSION_PEPPER_V1: ${{ secrets.ORBIT_STAGING_SESSION_PEPPER_V1 }}
ORBIT_CSRF_PEPPER_V1: ${{ secrets.ORBIT_STAGING_CSRF_PEPPER_V1 }}
ORBIT_AGENT_CREDENTIAL_PEPPER_V1: ${{ secrets.ORBIT_STAGING_AGENT_CREDENTIAL_PEPPER_V1 }}
# Buraya yalnız yeşil olduğu ölçülmüş provalar giriyor. Bir provayı
# kırmızı hâlde bağlamak, gecelik işi görmezden gelinen bir işe
# çevirir — düzeltmeye çalıştığımız sorunun ta kendisi.
#
# Bu yüzden slice2 ve slice3 provaları buraya eklenmedi, silindi:
# biri kaldırılmış bir API'ye bakıyordu, diğeri staging büyüdükçe
# kendi kendine bozulan sayılara. Kapsamın nereye düştüğü
# orbit-slice1-tests.ts ve orbit-slice3-tests.ts içinde,
# devraldıkları testin başında yazılı.
#
# Yeni bir staging betiği eklenirse ya buraya girer ya da elle
# çalışacağı orbit-production-config-tests.mjs'de açıkça beyan
# edilir; kilit ikisini de yapmadan geçmiyor.
run: |
npm run staging:verify
npm run staging:slice4:e2e
Loading
Loading