name: compat # Does the framework still pass on the runtimes it does NOT pin? The gate runs one Bun # (`.bun-version`), one Postgres (the test services' image) and one Solid (the root # `package.json`); this runs the gate's own `unit` and `live` steps — the same `scripts/verify.ts # --only --shard i/n` a `ci.yml` part runs — in one CELL per runtime it does not: # Bun latest and canary, Postgres 16, 17 and 18, Solid's newest 1.x (`scripts/compat.ts`). # # Each red cell files or updates ONE `compat` issue, found again by its title, and a cell's own # green run closes it (`scripts/compat-file.ts`, the ledger `flake-hunt.yml` files through). The # cells below ARE the supported range: `wiki/Stability.md`'s table is generated from this matrix # (`bun run scripts/compat-table.ts --write`; its test refuses drift). Its conclusion is # `scripts/lib/health-compat.ts`'s row. # # Never a `ci` job and never a gate: thirty runners a week, and a red canary is a lead to read, # not a merge to block. Free runners only. on: schedule: # Weekly, Saturday early UTC — clear of the nightly flake hunt (02:23) and Monday's bench. - cron: '41 3 * * 6' workflow_dispatch: concurrency: group: compat cancel-in-progress: false # Read-only by default; the one job that files issues widens it to `issues: write` for itself. permissions: contents: read jobs: cell: name: ${{ matrix.cell.id }} (${{ matrix.part.name }}) runs-on: ubuntu-latest # A runaway kill-switch: a part is one gate part's work (unit-N 200-276 s, live-N ~150 s on # 2026-11-14) plus an uncached install; the verify spawn's own deadline (13 min) fires first. timeout-minutes: 15 env: # The gate's own width rule: one test worker per core on a runner that is the job's alone. ULTIMATE_TEST_MEMORY_BUDGET: 5g strategy: fail-fast: false matrix: # `axis` and `version` are what `scripts/compat-cell.ts` prepares; `support` is the # column `wiki/Stability.md` prints. `watched` is tested, never promised. cell: - { id: bun-latest, axis: bun, version: latest, support: supported } - { id: bun-canary, axis: bun, version: canary, support: watched } - { id: postgres-16, axis: postgres, version: '16', support: supported } - { id: postgres-17, axis: postgres, version: '17', support: supported } - { id: postgres-18, axis: postgres, version: '18', support: supported } - { id: solid-1, axis: solid, version: '1', support: supported } # The gate's `unit` and `live` in the gate's shards, each with the services and URLs its # `ci.yml` part starts (`scripts/ci-workflow-shape-compat.test.ts` holds the two equal). part: - { name: unit-1, only: unit, shard: 1/3, services: postgres, urls: TEST_DATABASE_URL } - { name: unit-2, only: unit, shard: 2/3, services: postgres, urls: TEST_DATABASE_URL } - { name: unit-3, only: unit, shard: 3/3, services: postgres, urls: TEST_DATABASE_URL } - name: live-1 only: live shard: 1/2 services: postgres postgres-standby postgres-tls pooler redis nats s3 urls: TEST_DATABASE_URL|TEST_STANDBY_URL|TEST_POOLER_URL|TEST_REPLICATION_URL|TEST_TLS_REPLICATION_URL|TEST_TLS_ROOT_CERT|TEST_REDIS_URL|TEST_NATS_URL|TEST_S3_URL - name: live-2 only: live shard: 2/2 services: postgres postgres-standby postgres-tls pooler redis nats s3 urls: TEST_DATABASE_URL|TEST_STANDBY_URL|TEST_POOLER_URL|TEST_REPLICATION_URL|TEST_TLS_REPLICATION_URL|TEST_TLS_ROOT_CERT|TEST_REDIS_URL|TEST_NATS_URL|TEST_S3_URL steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false # The tests that read origin/main's tip and the two newest release tags find them, as in the # gate's parts (`ci.yml`); a missing ref would be a red cell that is no compat finding. - name: fetch origin/main's tip and the two newest release tags run: | git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main refs="" for tag in $(git ls-remote --tags --refs origin 'v*' | sed 's#.*refs/tags/##' \ | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -2); do refs="$refs +refs/tags/$tag:refs/tags/$tag" done # shellcheck disable=SC2086 [ -z "$refs" ] || git fetch --no-tags --depth=1 origin $refs # A Bun cell names its channel; every other cell runs the pin the gate runs. - name: the cell's Bun id: bun env: AXIS: ${{ matrix.cell.axis }} VERSION: ${{ matrix.cell.version }} run: | if [ "$AXIS" = bun ]; then want="$VERSION"; else want="$(tr -d '[:space:]' < .bun-version)"; fi echo "version=$want" >> "$GITHUB_OUTPUT" # Not `./.github/actions/setup`: that composite pins `.bun-version` on purpose, and its # install cache is keyed for the pinned runtime. A weekly cold install is the honest one. - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: ${{ steps.bun.outputs.version }} # `--frozen-lockfile` on every cell: a Bun that cannot read this lock is a compat finding. # The Solid cell moves the lock itself, after this (`compat.ts prepare`). - run: bun install --frozen-lockfile # A Postgres cell writes the compose override that retags the three Postgres services; the # Solid cell pins the newest 1.x by `overrides` and installs it. A Bun cell prepares nothing. - name: prepare the cell env: CELL: ${{ matrix.cell.id }} run: bun run scripts/compat.ts prepare --cell "$CELL" --compose-out "$RUNNER_TEMP/compat-compose.yml" # The file a laptop starts, plus the cell's override when it wrote one; `--wait` returns once # every healthcheck passed. Only the part's URLs are exported: an unset one skips its suites. - name: test services, in RAM env: SERVICES: ${{ matrix.part.services }} URLS: ${{ matrix.part.urls }} run: | files=(-f docker/docker-compose.test.yml) [ ! -f "$RUNNER_TEMP/compat-compose.yml" ] || files+=(-f "$RUNNER_TEMP/compat-compose.yml") # $SERVICES is a list of compose service names, split on purpose. # shellcheck disable=SC2086 docker compose "${files[@]}" up -d --wait $SERVICES grep -E "^(${URLS})=" docker/test-services.env >> "$GITHUB_ENV" # `pipefail`: without it `tee` decides the step's exit, a red cell reads green, and the run's # conclusion — what the health row reads — lies. - name: the gate's part, on the cell env: CELL: ${{ matrix.cell.id }} PART: ${{ matrix.part.name }} shell: bash run: | set -o pipefail mkdir -p "$RUNNER_TEMP/compat" bun run scripts/compat.ts run --cell "$CELL" --part "$PART" --json \ | tee "$RUNNER_TEMP/compat/$CELL--$PART.attempt-$GITHUB_RUN_ATTEMPT.json" | jq -r '.summary, (.findings[] | " \(.cause)\n fix: \(.fix)")' # Uploaded when the part is RED too: the red document is the one the filing job reads. A part # that died before this step uploads nothing, and the filing job reads that as red. Named by # the run ATTEMPT, artifact and file both: a re-run keeps the earlier attempt's artifacts in # the run, and the document carries its attempt so the filer reads each part's newest. - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 if: ${{ !cancelled() }} with: name: compat-${{ matrix.cell.id }}--${{ matrix.part.name }}-attempt-${{ github.run_attempt }} path: ${{ runner.temp }}/compat/${{ matrix.cell.id }}--${{ matrix.part.name }}.attempt-${{ github.run_attempt }}.json if-no-files-found: ignore retention-days: 14 file: needs: cell # After red cells too — they are the ones with something to file. if: ${{ !cancelled() }} runs-on: ubuntu-latest timeout-minutes: 10 permissions: contents: read issues: write steps: # `persist-credentials: false`: the job's `issues: write` token would otherwise sit in # .git/config through `bun install`, readable by every dependency's install script. - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: ./.github/actions/setup - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: pattern: compat-* path: ${{ runner.temp }}/compat merge-multiple: true # Every cell of the matrix is judged, the documents or their absence: a cell with a red or a # missing part files its issue, a cell whose every part is green closes its own. - name: one issue per red cell, closed by its green run env: GH_TOKEN: ${{ github.token }} shell: bash run: | shopt -s nullglob bun run scripts/compat.ts file "$RUNNER_TEMP"/compat/*.json