| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568 |
- name: CI
- on:
- push:
- branches: [main, master]
- pull_request:
- workflow_dispatch:
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- permissions:
- contents: read
- env:
- PRIMARY_NODE_VERSION: '24'
- jobs:
- node-24:
- if: github.event_name != 'workflow_dispatch'
- runs-on: ubuntu-latest
- name: node 24 / ${{ matrix.lane }}
- env:
- DSH_GATE_CONCURRENCY: ${{ matrix.gate_concurrency }}
- DSH_PUBLINT_CONCURRENCY: ${{ matrix.publint_concurrency }}
- DSH_ARTIFACT_SHARD: ${{ matrix.artifact_shard }}
- DSH_COVERAGE_MAX_WORKERS: ${{ matrix.coverage_max_workers }}
- DSH_COVERAGE_SHARD: ${{ matrix.coverage_shard }}
- DSH_LINT_SHARD: ${{ matrix.lint_shard }}
- DSH_SNAPSHOT_LANE: ${{ matrix.snapshot_lane }}
- DSH_STATIC_SHARD: ${{ matrix.static_shard }}
- DSH_SNAPSHOT_MAX_CONCURRENCY: ${{ matrix.snapshot_max_concurrency }}
- DSH_SNAPSHOT_PREBUILT: ${{ matrix.snapshot_prebuilt }}
- DSH_ESLINT_CACHE: ${{ matrix.eslint_cache }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - lane: static-foundation
- command: pnpm run check:ci:static
- gate_concurrency: '4'
- static_shard: foundation
- - lane: static-doc-types
- command: pnpm run check:ci:static
- gate_concurrency: '1'
- static_shard: doc-types
- - lane: static-api-contracts
- command: pnpm run check:ci:static
- gate_concurrency: '4'
- static_shard: api-contracts
- - lane: static-catalogs
- command: pnpm run check:ci:static
- gate_concurrency: '4'
- static_shard: catalogs
- - lane: static-prose
- command: pnpm run check:ci:static
- gate_concurrency: '4'
- static_shard: prose
- - lane: static-site-projection
- command: pnpm run check:ci:static
- gate_concurrency: '1'
- static_shard: site-projection
- - lane: static-site-mpa
- command: pnpm run check:ci:static
- gate_concurrency: '1'
- static_shard: site-build
- - lane: typecheck
- command: pnpm run typecheck
- - lane: lint-package-sources
- command: pnpm run check:ci:lint
- gate_concurrency: '1'
- eslint_cache: '1'
- lint_shard: package-sources
- - lane: lint-package-tests
- command: pnpm run check:ci:lint
- gate_concurrency: '1'
- eslint_cache: '1'
- lint_shard: package-tests
- - lane: lint-repository
- command: pnpm run check:ci:lint
- gate_concurrency: '1'
- eslint_cache: '1'
- lint_shard: repository
- - lane: coverage-core-loop
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: core-loop
- - lane: coverage-state-session
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: state-session
- - lane: coverage-models-integrations
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: models-integrations
- - lane: coverage-sdk-capabilities
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: sdk-capabilities
- - lane: coverage-interfaces
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: interfaces
- - lane: coverage-execution
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: execution
- - lane: coverage-workflow
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: workflow
- - lane: coverage-workflow-worker
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: workflow-worker
- - lane: coverage-delegation
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: delegation
- - lane: coverage-repository
- command: pnpm run check:ci:coverage
- gate_concurrency: '1'
- coverage_max_workers: '4'
- coverage_shard: repository
- - lane: snapshot-support
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: support
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: snapshot-agents
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: agents
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: snapshot-acp-1
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: acp-1
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: snapshot-acp-2
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: acp-2
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: snapshot-acp-3
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: acp-3
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: snapshot-acp-4
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: acp-4
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: snapshot-acp-5
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: acp-5
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: snapshot-acp-6
- command: pnpm run check:ci:snapshot
- gate_concurrency: '1'
- snapshot_lane: acp-6
- snapshot_max_concurrency: '5'
- snapshot_prebuilt: '1'
- - lane: artifacts-metadata
- command: pnpm run check:ci:artifacts
- gate_concurrency: '3'
- publint_concurrency: '8'
- artifact_shard: metadata
- - lane: artifacts-smoke
- command: pnpm run check:ci:artifacts
- gate_concurrency: '1'
- artifact_shard: smoke
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack and resolve pnpm store path
- id: pnpm-store
- run: |
- corepack enable
- echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- # The snapshot lanes REPLAY the sandbox example's recorded scenarios,
- # re-executing their bash calls under a real runner. ubuntu-latest has
- # no bubblewrap preinstalled and no built Landlock launcher, so without
- # this the confined executions fail closed (SANDBOX_UNAVAILABLE). Same
- # install as sandbox.yml's bwrap leg (incl. the Ubuntu 24.04 AppArmor
- # userns knob). Building does not depend on bubblewrap, so overlap them.
- - name: Prepare built snapshot runtime and bubblewrap
- if: startsWith(matrix.lane, 'snapshot-')
- run: |
- pnpm run build &
- build_pid=$!
- (
- sudo apt-get install -yq --no-install-recommends bubblewrap
- sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 \
- || echo "apparmor userns knob absent — the functional probe decides"
- ) &
- sandbox_pid=$!
- build_status=0
- sandbox_status=0
- wait "$build_pid" || build_status=$?
- wait "$sandbox_pid" || sandbox_status=$?
- if (( build_status != 0 )); then exit "$build_status"; fi
- exit "$sandbox_status"
- - uses: actions/cache@v4
- if: startsWith(matrix.lane, 'lint-')
- with:
- path: .cache/eslint
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-
- - name: Run gates
- run: ${{ matrix.command }}
- node-compat:
- if: github.event_name != 'workflow_dispatch'
- runs-on: ubuntu-latest
- name: node ${{ matrix.node }}
- env:
- DSH_GATE_CONCURRENCY: '2'
- DSH_NODE_COMPAT_SKIP_TYPECHECK: ${{ matrix.skip_typecheck }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - node: '22.19'
- skip_typecheck: '1'
- - node: 24
- skip_typecheck: '1'
- - node: 26
- skip_typecheck: '1'
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ matrix.node }}
- - name: Enable corepack and resolve pnpm store path
- id: pnpm-store
- run: |
- corepack enable
- echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ matrix.node }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ matrix.node }}-pnpm-
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - name: Run compatibility gates
- run: pnpm run check:node-compat
- python-sdk:
- if: github.event_name != 'workflow_dispatch'
- runs-on: ubuntu-latest
- name: python 3.10 / keyless SDK
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-python@v6
- with:
- python-version: '3.10'
- cache: pip
- - name: Install uv
- run: python -m pip install uv==0.11.23
- - name: Run complete keyless Python suite
- run: uv run --python 3.10 --group test --project python/sdk pytest
- # Blocking Windows build and production-site lanes keep the already-green
- # native outputs protected without putting both critical paths in one job.
- # The broader observational gate matrix below exposes the remaining
- # portability work without blocking mainline merges.
- windows-build:
- if: github.event_name != 'workflow_dispatch'
- runs-on: windows-2025
- name: windows / build
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Install (immutable)
- run: |
- corepack enable
- pnpm install --frozen-lockfile
- - name: Build (tsc -b + tsdown)
- run: pnpm run build
- windows-site:
- if: github.event_name != 'workflow_dispatch'
- runs-on: windows-2025
- name: windows / production site
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Install (immutable)
- run: |
- corepack enable
- pnpm install --frozen-lockfile
- - name: Build documentation site (production SPA)
- run: pnpm run docs:build
- # Observational, non-blocking Windows static, lint, and artifact lanes. Coverage
- # and snapshot stay Linux-only until their platform-specific runtime failures
- # have dedicated support. Run the gates from native PowerShell: an MSYS parent
- # would change the environment being measured. This job intentionally stays
- # out of all-checks-passed.needs.
- windows-gates:
- if: github.event_name != 'workflow_dispatch'
- continue-on-error: true
- runs-on: windows-2025
- name: windows node 24 / ${{ matrix.lane }}
- env:
- DSH_GATE_CONCURRENCY: ${{ matrix.gate_concurrency }}
- DSH_PUBLINT_CONCURRENCY: ${{ matrix.publint_concurrency }}
- DSH_ARTIFACT_SHARD: ${{ matrix.artifact_shard }}
- DSH_LINT_SHARD: ${{ matrix.lint_shard }}
- DSH_STATIC_SHARD: ${{ matrix.static_shard }}
- DSH_ESLINT_CACHE: ${{ matrix.eslint_cache }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - lane: static-general
- command: pnpm run check:ci:static
- gate_concurrency: '4'
- static_shard: 'foundation,catalogs,prose'
- - lane: static-contracts
- command: pnpm run check:ci:static
- gate_concurrency: '4'
- static_shard: 'doc-types,api-contracts'
- - lane: lint-package-sources
- command: pnpm run check:ci:lint
- gate_concurrency: '1'
- eslint_cache: '1'
- lint_shard: package-sources
- - lane: lint-package-tests
- command: pnpm run check:ci:lint
- gate_concurrency: '1'
- eslint_cache: '1'
- lint_shard: package-tests
- - lane: lint-repository
- command: pnpm run check:ci:lint
- gate_concurrency: '1'
- eslint_cache: '1'
- lint_shard: repository
- - lane: artifacts-metadata
- command: pnpm run check:ci:artifacts
- gate_concurrency: '3'
- publint_concurrency: '8'
- artifact_shard: metadata
- - lane: artifacts-smoke
- command: pnpm run check:ci:artifacts
- gate_concurrency: '1'
- artifact_shard: smoke
- steps:
- - uses: actions/checkout@v6
- - name: Enable Developer Mode (symlink support)
- shell: pwsh
- run: >-
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
- /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack and resolve pnpm store path
- id: pnpm-store
- shell: pwsh
- run: |
- corepack enable
- "path=$(pnpm store path --silent)" >> $env:GITHUB_OUTPUT
- - uses: actions/cache@v4
- with:
- path: ${{ steps.pnpm-store.outputs.path }}
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-pnpm-
- - name: Install (immutable)
- shell: pwsh
- run: pnpm install --frozen-lockfile
- - uses: actions/cache@v4
- if: startsWith(matrix.lane, 'lint-')
- with:
- path: .cache/eslint
- key: ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-${{ hashFiles('pnpm-lock.yaml', 'eslint.config.mjs', 'tsconfig.json', 'packages/*/*/tsconfig.json', 'examples/*/tsconfig.json') }}
- restore-keys: |
- ${{ runner.os }}-node-${{ env.PRIMARY_NODE_VERSION }}-eslint-
- - name: Run gates
- shell: pwsh
- run: ${{ matrix.command }}
- # Manual reference runs deliberately avoid the optimized matrices above.
- # Each host executes the complete, unsharded primary Node aggregate with one
- # gate worker, giving reviewers a simple cross-platform oracle for completeness
- # and timing.
- serial-linux:
- if: github.event_name == 'workflow_dispatch'
- name: serial / linux
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack (pnpm)
- run: corepack enable
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - name: Install bubblewrap (unrestrict userns)
- run: |
- sudo apt-get update -q
- sudo apt-get install -yq --no-install-recommends bubblewrap
- sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 \
- || echo "apparmor userns knob absent — the functional probe decides"
- - name: Run complete unsharded primary Node CI serially
- env:
- DSH_COVERAGE_MAX_WORKERS: '1'
- DSH_E2E_MAX_WORKERS: '1'
- DSH_GATE_CONCURRENCY: '1'
- DSH_PUBLINT_CONCURRENCY: '1'
- DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
- run: pnpm run check:ci
- serial-macos:
- if: github.event_name == 'workflow_dispatch'
- name: serial / macos
- runs-on: macos-latest
- steps:
- - uses: actions/checkout@v6
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack (pnpm)
- run: corepack enable
- - name: Install (immutable)
- run: pnpm install --frozen-lockfile
- - name: Run complete unsharded primary Node CI serially
- env:
- DSH_COVERAGE_MAX_WORKERS: '1'
- DSH_E2E_MAX_WORKERS: '1'
- DSH_GATE_CONCURRENCY: '1'
- DSH_PUBLINT_CONCURRENCY: '1'
- DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
- run: pnpm run check:ci
- serial-windows:
- if: github.event_name == 'workflow_dispatch'
- name: serial / windows
- runs-on: windows-2025
- steps:
- - uses: actions/checkout@v6
- - name: Enable Developer Mode (symlink support)
- shell: pwsh
- run: >-
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock"
- /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
- - uses: actions/setup-node@v6
- with:
- node-version: ${{ env.PRIMARY_NODE_VERSION }}
- - name: Enable corepack (pnpm)
- shell: pwsh
- run: corepack enable
- - name: Install (immutable)
- shell: pwsh
- run: pnpm install --frozen-lockfile
- - name: Run complete unsharded primary Node CI serially
- shell: pwsh
- env:
- DSH_COVERAGE_MAX_WORKERS: '1'
- DSH_E2E_MAX_WORKERS: '1'
- DSH_GATE_CONCURRENCY: '1'
- DSH_PUBLINT_CONCURRENCY: '1'
- DSH_SNAPSHOT_MAX_CONCURRENCY: '1'
- run: pnpm run check:ci
- # Single stable required check for branch protection: require "all checks
- # passed" instead of enumerating matrix legs whose names change as lanes and
- # node versions evolve. Every blocking job in THIS workflow must be listed in
- # `needs`; explicitly observational jobs such as windows-gates stay out
- # (`needs` cannot reach across workflow files; e2e.yml stays its own check).
- # `if: always()` is load-bearing: without it a failed dependency
- # would SKIP this job, and GitHub counts a skipped required check as passing
- # — so this job always runs and fails on any non-success result, including
- # 'cancelled' and 'skipped'.
- all-checks-passed:
- name: all checks passed
- runs-on: ubuntu-latest
- needs: [node-24, node-compat, python-sdk, windows-build, windows-site]
- if: always() && github.event_name != 'workflow_dispatch'
- steps:
- - name: Fail if any needed job did not succeed
- if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
- run: |
- echo "::error::Needed job results: ${{ join(needs.*.result, ', ') }}"
- exit 1
- - name: All checks passed
- run: echo "All needed jobs succeeded (${{ join(needs.*.result, ', ') }})"
|