mirror of
https://github.com/ranxianglei/billion-context.git
synced 2026-12-04 02:09:00 +08:00
ci: three-layer pipeline — core matrix on PRs, gated 30-min full cron, ci:full label
CI resource pressure: each PR push fired ~50-70 jobs (24 from ci.yml's 12-leg test matrix + 8 e2e lanes + registry/image/theorem/zcode), and every master merge fired a second full wave that the next merge usually cancelled — #3071 shipped red precisely because a cancelled master run delivers no signal. Three layers (owner-approved 2026-10-15): 1. CORE (blocking, every PR + master push): ci.yml plan job emits a 6-leg test matrix (ubuntu-22 3-shard, ubuntu-24 whole-suite 1-leg, windows-22 2-shard — windows kept per owner) + 1 static leg. ~15 jobs instead of ~24, guards tiering unchanged. 2. FULL (12 test legs + 4 static legs): only when (a) a PR carries the new `ci:full` label, (b) workflow_dispatch full=true, or (c) the 30-min smart cron fires AND master moved since the last green scheduled run — a quiet master costs one ~20s plan job per tick. Lane workflows (e2e/registry/image/theorem/zcode/windows-codex) drop their pull_request/push triggers and follow the same gated cron on staggered minutes (4-16/30), plus the same label gate. 3. ON-DEMAND: `ci:full` label or workflow_dispatch at any time. Check-run names are pinned via explicit job `name:` so the 6 core legs keep the exact legacy `test (os, node, shard)` names — branch protection now requires exactly those 6. CI_TEST_SHARD denominators ride along in the matrix (shardTotal) since scripts/run-ci-tests.mjs partitions totally for any i/N. Master pushes still get the core matrix immediately (real post-merge signal, never cancelled by schedule — concurrency groups are now split by event).
This commit is contained in:
@@ -3,8 +3,10 @@ name: e2e-codex-persona
|
||||
on:
|
||||
# #3085: runs on every PR by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '10/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -14,7 +16,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e-codex-persona.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-codex-persona:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: real codex persona/continuity in BOTH modes (URL + launcher) vs fake upstream (zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -3,8 +3,10 @@ name: e2e-native-dsh
|
||||
on:
|
||||
# #3085: runs on every PR by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '6/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -14,7 +16,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e-dsh-native.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-native-dsh:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: real dsh headless profile lane vs deterministic fake upstream (zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -10,8 +10,10 @@ on:
|
||||
# #2637 plan #3: nightly full regression on master — daily backstop for
|
||||
# the path filter below (schedule ignores paths).
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '5/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
paths:
|
||||
- "src/server.ts"
|
||||
- "src/server/**"
|
||||
@@ -29,7 +31,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e-dsh.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-dsh-plugin-lane:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: dsh plugin lane (fork adoption + side-request isolation + lane truth tables)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -3,8 +3,10 @@ name: e2e-fake-codex
|
||||
on:
|
||||
# #3085: runs on every PR by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '11/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -14,7 +16,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e-fake.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-fake:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: real codex vs deterministic fake upstream (zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -3,8 +3,10 @@ name: e2e-native-opencode
|
||||
on:
|
||||
# #3085: runs on every PR by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '8/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -14,7 +16,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e-native-opencode.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-native-opencode:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: real opencode native lane vs deterministic fake upstream (zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
@@ -70,6 +104,8 @@ jobs:
|
||||
if-no-files-found: ignore
|
||||
|
||||
e2e-opencode-responses-ws:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: OpenCode V2 Responses WebSocket ACP (zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
@@ -3,8 +3,10 @@ name: e2e-native-pi
|
||||
on:
|
||||
# #3085: runs on every PR by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '7/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -14,7 +16,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e-native.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-native-pi:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: real pi package-native lane vs deterministic fake upstream (zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -3,8 +3,10 @@ name: e2e-pi-codex-ws
|
||||
on:
|
||||
# #3085: runs on every PR by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '9/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -14,7 +16,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e-pi-ws.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-pi-codex-ws:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: real pi codex-responses WebSocket lane vs deterministic mock upstream (zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
@@ -5,7 +5,8 @@ on:
|
||||
# the path-filtered PR trigger below (schedule ignores paths, so this run
|
||||
# covers everything regardless of diff).
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '4/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
forge:
|
||||
@@ -18,6 +19,7 @@ on:
|
||||
# src/loop/, adapters, preflight/compact) instead. Everything else stays
|
||||
# covered by the regular test/build workflows.
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
branches: [master]
|
||||
paths:
|
||||
- "src/server.ts"
|
||||
@@ -42,7 +44,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-e2e.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
# Transient runner↔registry blips (ECONNRESET) must not red a PR (#2611):
|
||||
|
||||
@@ -6,6 +6,7 @@ on:
|
||||
# rescue) — it costs nothing to run but there is no reason to spend a
|
||||
# runner on doc-only diffs. Manual dispatch covers everything else.
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
branches: [master]
|
||||
paths:
|
||||
- "src/image-*.ts"
|
||||
@@ -18,6 +19,9 @@ on:
|
||||
# a kernel change IS a pipeline change (#1289-class guard; #2092).
|
||||
- "kernel/**"
|
||||
- "package-lock.json"
|
||||
schedule:
|
||||
- cron: '15/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -25,7 +29,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-image.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
image-billing:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: real-image billing e2e (hermetic corpus, zero tokens)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
@@ -3,8 +3,10 @@ name: e2e-local-registry
|
||||
on:
|
||||
# #3085: runs on every PR by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '12/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
@@ -14,7 +16,39 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-registry.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
e2e-registry:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: hermetic registry e2e (local verdaccio; loopback only, zero secrets)
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 25
|
||||
|
||||
@@ -6,6 +6,7 @@ name: Theorem Lane
|
||||
# same test file with solver subtests skipped by design.
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
branches: [master]
|
||||
paths:
|
||||
- "proof/**"
|
||||
@@ -26,30 +27,45 @@ on:
|
||||
- "kernel/src/block-map.ts"
|
||||
- "kernel/src/ccr.ts"
|
||||
- ".github/workflows/ci-theorem.yml"
|
||||
push:
|
||||
branches: [master]
|
||||
paths:
|
||||
- "proof/**"
|
||||
- "tests/cache-theorem.test.ts"
|
||||
- "src/loop/**"
|
||||
- "src/wire-body.ts"
|
||||
- "src/system-anchor.ts"
|
||||
- "src/chain-checkpoint.ts"
|
||||
- "src/image-note.ts"
|
||||
- "src/server.ts"
|
||||
- "src/session.ts"
|
||||
- "src/fake-completion.ts"
|
||||
- "src/degenerate-retry.ts"
|
||||
- "kernel/src/rebuild.ts"
|
||||
- "kernel/src/render-refs.ts"
|
||||
- "kernel/src/refs.ts"
|
||||
- "kernel/src/segment.ts"
|
||||
- "kernel/src/block-map.ts"
|
||||
- "kernel/src/ccr.ts"
|
||||
- ".github/workflows/ci-theorem.yml"
|
||||
|
||||
# three-layer CI: master signal comes from ci.yml core runs + gated scheduled full runs
|
||||
schedule:
|
||||
- cron: '16/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-theorem.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
theorem:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -3,11 +3,12 @@ name: CI Windows codex overlay (#686)
|
||||
on:
|
||||
# #3085: runs on every master PR + push by default (reverts #2637's hot-file gate, which let untested changes ship).
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
branches: [master]
|
||||
push:
|
||||
branches: [master]
|
||||
# three-layer CI: master signal comes from ci.yml core runs + gated scheduled full runs
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '13/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch: {}
|
||||
|
||||
concurrency:
|
||||
@@ -21,7 +22,39 @@ concurrency:
|
||||
# Headless and key-free because `codex mcp list` reads config.toml only and
|
||||
# never calls a model (the secret-backed ubuntu e2e still covers model round-trip).
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-windows-codex.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
windows-codex-overlay:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: codex accepts CODEX_HOME overlay + registers bili MCP
|
||||
runs-on: windows-latest
|
||||
# Transient runner↔registry blips (ECONNRESET) must not red a PR (#2611):
|
||||
@@ -83,6 +116,8 @@ jobs:
|
||||
# (the deterministic unit twin lives in tests/launcher-sqlite-overlay.test.ts).
|
||||
# Zero tokens: every model call goes to the local fake upstream.
|
||||
windows-codex-sequential-home:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: sequential bili codex launches keep all threads in the real home (#2195)
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
@@ -140,6 +175,8 @@ jobs:
|
||||
# unresolvable via PATH/PATHEXT. Same staged-gate convention as the #686 job
|
||||
# above: continue-on-error until one clean run proves the lane, then promote.
|
||||
windows-codex-profile-routing:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
name: codex -p profile / CLI provider routes through bili (#2197)
|
||||
runs-on: windows-latest
|
||||
timeout-minutes: 20
|
||||
|
||||
@@ -17,7 +17,8 @@ on:
|
||||
# the path filter below (schedule ignores paths; ZCODE_VERSION falls back
|
||||
# to its '3.14.4' default when no dispatch input is present).
|
||||
schedule:
|
||||
- cron: '30 16 * * *'
|
||||
- cron: '14/30 * * * *'
|
||||
# three-layer CI: 30-min smart cron — gate skips when master HEAD is unchanged since the last green scheduled run
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
zcode_version:
|
||||
@@ -25,20 +26,13 @@ on:
|
||||
required: false
|
||||
default: "3.14.4"
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
paths:
|
||||
- .github/workflows/ci-zcode-real.yml
|
||||
- src/zcode/**
|
||||
- tests/zcode-*.test.ts
|
||||
- src/mcp.ts
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- .github/workflows/ci-zcode-real.yml
|
||||
- src/zcode/**
|
||||
- tests/zcode-*.test.ts
|
||||
- src/mcp.ts
|
||||
|
||||
# three-layer CI: master signal comes from ci.yml core runs + gated scheduled full runs
|
||||
concurrency:
|
||||
# #2637 plan #3: 'nightly' keeps scheduled runs out of the per-ref cancel scope.
|
||||
group: zcode-real-${{ github.event_name == 'schedule' && 'nightly' || github.ref }}
|
||||
@@ -52,7 +46,39 @@ env:
|
||||
ZCODE_SHA256: 4b4631987172fd975aa1f85fa0dc1f55ac1c756b26bd8ab18d68592ed9391182
|
||||
|
||||
jobs:
|
||||
# three-layer CI: this lane only runs on demand (ci:full label / dispatch)
|
||||
# or on the 30-min cron when master moved since the last green scheduled run.
|
||||
gate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
run: ${{ steps.g.outputs.run }}
|
||||
steps:
|
||||
- id: g
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
run=true
|
||||
if [ "$EVENT" = "pull_request" ]; then
|
||||
# only the ci:full label itself may trigger; other label events skip
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then run=false
|
||||
elif ! grep -qw ci:full <<<"$PR_LABELS"; then run=false; fi
|
||||
elif [ "$EVENT" = "schedule" ]; then
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci-zcode-real.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then run=false; fi
|
||||
fi
|
||||
echo "run=$run" >> "$GITHUB_OUTPUT"
|
||||
zcode-real:
|
||||
needs: [gate]
|
||||
if: needs.gate.outputs.run == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
|
||||
+137
-19
@@ -12,26 +12,145 @@ on:
|
||||
branches: [master, "*_release-v*"]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
# three-layer CI (#3295): synchronize keeps the CORE matrix blocking on
|
||||
# every push; `labeled` lets the `ci:full` label widen a PR to the FULL
|
||||
# matrix without a re-push (other labels no-op in the plan job).
|
||||
types: [opened, synchronize, reopened, labeled]
|
||||
# Three-layer CI (#3295): PRs and master pushes pay for the CORE matrix
|
||||
# only. Every 30 minutes this cron asks the plan job whether master moved
|
||||
# since the last green scheduled run; only then does the FULL matrix run.
|
||||
# Lane workflows (e2e/registry/image/theorem/zcode) follow the same gated
|
||||
# cron pattern on their own offsets.
|
||||
schedule:
|
||||
- cron: '3/30 * * * *' # :03/:33 — a few seconds ahead of the lanes (:04+)
|
||||
# One-click release fallback: GitHub suppresses push-event delivery for
|
||||
# ref updates made with GITHUB_TOKEN, so the push trigger above never fires
|
||||
# on one-click fallback branches (#1744). release-manual.yml compensates by
|
||||
# explicitly dispatching this workflow on the fallback branch; the check
|
||||
# runs land on the same head sha and make the auto-PR mergeable once green
|
||||
# (#772, #1744).
|
||||
workflow_dispatch: {}
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
full:
|
||||
description: "Run the FULL matrix (12 test legs + 4 static legs) instead of the CORE one"
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
# Same-ref runs cancel superseded in-flight runs: a follow-up push to a
|
||||
# branch (bump -> merge master into a release branch, rapid PR pushes,
|
||||
# back-to-back master merges) no longer queues a full ~30-job matrix
|
||||
# behind its own predecessor. Groups are per workflow+ref, so different
|
||||
# branches and different workflows never cancel each other. Approved by
|
||||
# owner 2026-10-10 after the release-v0.1.191 CI queue piled up behind
|
||||
# same-ref reruns.
|
||||
# behind its own predecessor. Groups are per workflow+event+ref, so different
|
||||
# branches, different workflows, and (crucially) the scheduled full-matrix
|
||||
# runs never cancel each other — a schedule tick landing mid-push-run waits
|
||||
# for its own group instead of killing the push signal (#3071 lesson:
|
||||
# cancelled master runs shipped red). Approved by owner 2026-10-10 after
|
||||
# the release-v0.1.191 CI queue piled up behind same-ref reruns.
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
# Three-layer CI (#3295) plan: decide the matrix scope BEFORE paying for
|
||||
# legs. One cheap ubuntu job picks one of three scopes:
|
||||
# core — every PR (push) and master push: 6 test legs (ubuntu 22 full 3-shard
|
||||
# suite, ubuntu 24 single-leg whole suite, windows 22 2-shard) + 1
|
||||
# static leg. The blocking layer; branch protection requires exactly
|
||||
# these 6 test leg names.
|
||||
# full — `ci:full` label on a PR, workflow_dispatch full=true, or the 30-min
|
||||
# cron when master moved since the last green scheduled run: the
|
||||
# historical 12-leg test matrix + 4-leg static-gates.
|
||||
# skip — a `labeled` event for a label other than ci:full, or a cron tick
|
||||
# where master HEAD == the last green scheduled run's head: nothing
|
||||
# to do, every dependent job skips (run concludes success so the
|
||||
# tick records its head_sha — a quiet master costs ~20s per tick).
|
||||
# Matrix entries carry shardTotal so a scope can run FEWER shards per combo
|
||||
# (partitionAll in scripts/run-ci-tests.mjs is total for ANY i/N); the
|
||||
# explicit job `name:` keeps check-run names identical to the legacy 12-leg
|
||||
# names (branch protection keys off `test (os, node, shard)`).
|
||||
plan:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
outputs:
|
||||
scope: ${{ steps.scope.outputs.scope }}
|
||||
testMatrix: ${{ steps.scope.outputs.testMatrix }}
|
||||
staticMatrix: ${{ steps.scope.outputs.staticMatrix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- id: scope
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EVENT: ${{ github.event_name }}
|
||||
PR_LABELS: ${{ join(github.event.pull_request.labels.*.name, ' ') }}
|
||||
LABEL_EVENT: ${{ github.event.label.name }}
|
||||
HEAD_SHA: ${{ github.sha }}
|
||||
FULL_INPUT: ${{ inputs.full }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
CORE_TEST='{"include":[
|
||||
{"os":"ubuntu-latest","node-version":22,"shard":1,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":22,"shard":2,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":22,"shard":3,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":24,"shard":1,"shardTotal":1},
|
||||
{"os":"windows-latest","node-version":22,"shard":1,"shardTotal":2},
|
||||
{"os":"windows-latest","node-version":22,"shard":2,"shardTotal":2}]}'
|
||||
CORE_STATIC='{"include":[{"os":"ubuntu-latest","node-version":24}]}'
|
||||
FULL_TEST='{"include":[
|
||||
{"os":"ubuntu-latest","node-version":22,"shard":1,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":22,"shard":2,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":22,"shard":3,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":24,"shard":1,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":24,"shard":2,"shardTotal":3},
|
||||
{"os":"ubuntu-latest","node-version":24,"shard":3,"shardTotal":3},
|
||||
{"os":"windows-latest","node-version":22,"shard":1,"shardTotal":3},
|
||||
{"os":"windows-latest","node-version":22,"shard":2,"shardTotal":3},
|
||||
{"os":"windows-latest","node-version":22,"shard":3,"shardTotal":3},
|
||||
{"os":"windows-latest","node-version":24,"shard":1,"shardTotal":3},
|
||||
{"os":"windows-latest","node-version":24,"shard":2,"shardTotal":3},
|
||||
{"os":"windows-latest","node-version":24,"shard":3,"shardTotal":3}]}'
|
||||
FULL_STATIC='{"include":[
|
||||
{"os":"ubuntu-latest","node-version":22},
|
||||
{"os":"ubuntu-latest","node-version":24},
|
||||
{"os":"windows-latest","node-version":22},
|
||||
{"os":"windows-latest","node-version":24}]}'
|
||||
scope=core
|
||||
case "$EVENT" in
|
||||
pull_request)
|
||||
# a `labeled` event fires for EVERY label; only ci:full itself
|
||||
# may (re)run — otherwise a random label would shadow the last
|
||||
# full-matrix result with a core one.
|
||||
if [ -n "$LABEL_EVENT" ] && [ "$LABEL_EVENT" != "ci:full" ]; then
|
||||
scope=skip
|
||||
elif grep -qw ci:full <<<"$PR_LABELS"; then
|
||||
scope=full
|
||||
fi
|
||||
;;
|
||||
workflow_dispatch)
|
||||
[ "$FULL_INPUT" = "true" ] && scope=full || true
|
||||
;;
|
||||
schedule)
|
||||
# Smart cron: pay for the full matrix only when master moved
|
||||
# since the last green scheduled run of this workflow.
|
||||
LAST=$(gh api "repos/${GITHUB_REPOSITORY}/actions/workflows/ci.yml/runs?event=schedule&status=success&per_page=1" --jq '.workflow_runs[0].head_sha // ""' 2>/dev/null || echo "")
|
||||
echo "last green scheduled head: ${LAST:-none}; current: $HEAD_SHA"
|
||||
if [ "$LAST" = "$HEAD_SHA" ]; then scope=skip; else scope=full; fi
|
||||
;;
|
||||
push)
|
||||
;;
|
||||
esac
|
||||
case "$scope" in
|
||||
core) TM="$CORE_TEST"; SM="$CORE_STATIC" ;;
|
||||
full) TM="$FULL_TEST"; SM="$FULL_STATIC" ;;
|
||||
skip) TM='{"include":[]}'; SM='{"include":[]}' ;;
|
||||
esac
|
||||
{
|
||||
echo "scope=$scope"
|
||||
printf 'testMatrix=%s\n' "$(printf '%s' "$TM" | jq -c .)"
|
||||
printf 'staticMatrix=%s\n' "$(printf '%s' "$SM" | jq -c .)"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
echo "plan scope: $scope"
|
||||
|
||||
# #2637 plan #8 (owner-approved): fail-fast tiering — the ~0-1m guards gate
|
||||
# the four platform legs so a broken commit stops in tier 1 instead of
|
||||
# paying 4x(install+typecheck+suites+build). Guards with `if: pull_request`
|
||||
@@ -45,22 +164,21 @@ jobs:
|
||||
# - push/dispatch: PR-only guards skip harmlessly, legs RUN — master gets
|
||||
# a real post-merge test signal (the missing master-push hole, #3197 era)
|
||||
test:
|
||||
needs: [version-guard, kernel-guard, pi-subagents-guard, lane-guard, docs-sync, docs-coverage, unused-exports, lock-sync, test-import-graph]
|
||||
if: ${{ !failure() && !cancelled() }}
|
||||
needs: [plan, version-guard, kernel-guard, pi-subagents-guard, lane-guard, docs-sync, docs-coverage, unused-exports, lock-sync, test-import-graph]
|
||||
if: ${{ !failure() && !cancelled() && needs.plan.outputs.scope != 'skip' }}
|
||||
name: test (${{ matrix.os }}, ${{ matrix.node-version }}, ${{ matrix.shard }})
|
||||
# #3143: the suite outgrew one runner — ~656 top-level files (~190k LOC) now
|
||||
# serialize through c=4 on a single 4-core leg for ~17-20 min (windows slowest;
|
||||
# measured 1225s on the last full green run). Sharding spreads the SAME files
|
||||
# across more legs: each runs a balanced slice (scripts/run-ci-tests.mjs partitions
|
||||
# deterministically + totally, so union of shards == allFiles, nothing skipped,
|
||||
# same tests/assertions/env, c=4 within each shard). Wall drops ~3x (~20 -> ~7min)
|
||||
# with zero coverage loss. To go faster, add entries to the list AND bump the "/3"
|
||||
# below together (they must stay equal).
|
||||
# with zero coverage loss. To go faster, add entries to the FULL_TEST include
|
||||
# list in the plan job above (each entry carries its own shardTotal, so the
|
||||
# legacy "bump the /3" coupling is gone — any denominator works).
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
node-version: [22, 24]
|
||||
shard: [1, 2, 3] # keep in sync with CI_TEST_SHARD "<i>/3" below
|
||||
matrix: ${{ fromJSON(needs.plan.outputs.testMatrix) }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@@ -84,19 +202,19 @@ jobs:
|
||||
- run: node scripts/run-ci-tests.mjs
|
||||
env:
|
||||
ACP_TEST_CLAUDE_NATIVE: "1"
|
||||
CI_TEST_SHARD: "${{ matrix.shard }}/3" # denominator MUST equal matrix.shard length
|
||||
CI_TEST_SHARD: "${{ matrix.shard }}/${{ matrix.shardTotal }}" # denominator carried per-include by the plan job (#3295)
|
||||
|
||||
# #2816: typecheck + the in-repo component suites + the bundle build used
|
||||
# to run sequentially in front of the test job (~90s of critical path per
|
||||
# leg). They are independent of the proxy test suites, so they run as
|
||||
# parallel legs on the same matrix — same commands, off the critical path.
|
||||
static-gates:
|
||||
needs: [version-guard, kernel-guard, pi-subagents-guard, lane-guard, docs-sync, docs-coverage, unused-exports, lock-sync, test-import-graph]
|
||||
needs: [plan, version-guard, kernel-guard, pi-subagents-guard, lane-guard, docs-sync, docs-coverage, unused-exports, lock-sync, test-import-graph]
|
||||
if: ${{ !failure() && !cancelled() && needs.plan.outputs.scope != 'skip' }}
|
||||
name: static-gates (${{ matrix.os }}, ${{ matrix.node-version }})
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
node-version: [22, 24]
|
||||
matrix: ${{ fromJSON(needs.plan.outputs.staticMatrix) }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user