From cd6a0fbcf5d98e47e9266591729772fa674ae156 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 31 Oct 2026 11:16:24 +0000 Subject: [PATCH] ci: run nix ci on merge groups so the merge queue sees its required check Co-authored-by: dezren39 <11225574+dezren39@users.noreply.github.com> --- .github/workflows/nix-ci.yml | 52 +++++++++++++++--------------------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/.github/workflows/nix-ci.yml b/.github/workflows/nix-ci.yml index 3570190afd..4b2248ef06 100644 --- a/.github/workflows/nix-ci.yml +++ b/.github/workflows/nix-ci.yml @@ -5,6 +5,12 @@ on: push: branches: [main] pull_request: + # Merge queue pilot (see .github/ci-policy.md): the queue validates + # the combined merge-group head, and this workflow's PR-tier job + # (basic: proxy port fallbacks) is main's required status check — + # it must run on merge groups too, or the queue can never see its + # required context and stalls. + merge_group: schedule: # Nightly backstop: the full flake check runs on main + nightly, not PRs. - cron: "17 8 * * *" @@ -26,44 +32,28 @@ concurrency: cancel-in-progress: true jobs: - treefmt: - name: treefmt check + # Basic tier: the proxy ports' fallback copies (bin/*.mjs script + # defaults and the {env:VAR:-port} defaults in + # .opencode/opencode.jsonc) must match the single definitions in + # home/common/default.nix, or a non-shell launch silently dials + # the wrong — or an empty — port (#434, #435). Pure bash/grep: no + # Nix needed, runs on every PR. This job used to also run the + # treefmt format check; formatting is no longer a merge gate — + # it is auto-fixed on main by .github/workflows/auto-format.yml + # (see .github/ci-policy.md). + proxy-port-fallbacks: + name: "basic: proxy port fallbacks" runs-on: ubuntu-latest - timeout-minutes: 15 + timeout-minutes: 5 steps: - uses: actions/checkout@v7 - with: - fetch-depth: 0 - # The proxy ports' fallback copies (bin/*.mjs script defaults and - # the {env:VAR:-port} defaults in .opencode/opencode.jsonc) must - # match the single definitions in home/common/default.nix, or a - # non-shell launch silently dials the wrong — or an empty — port - # (#434, #435). Pure bash/grep: no Nix needed. - name: Check proxy port fallbacks match their definitions run: .github/scripts/check-proxy-port-fallbacks.sh - - uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23 - - name: Check formatting for changed files - env: - BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} - run: | - set -euo pipefail - base_sha="$BASE_SHA" - if [[ "$base_sha" =~ ^0+$ ]]; then - base_sha="$(git rev-parse HEAD^)" - fi - changed_files_file="$(mktemp)" - trap 'rm -f "$changed_files_file"' EXIT - git diff --name-only --diff-filter=ACMR -z "$base_sha...$GITHUB_SHA" > "$changed_files_file" - mapfile -d '' changed_files < "$changed_files_file" - if ((${#changed_files[@]} == 0)); then - echo "No changed files to format-check." - exit 0 - fi - nix run .#format-check -- "${changed_files[@]}" flake-check: - name: Nix flake evaluation - # Main tier only (Phase 2, #1781): PRs keep the treefmt/format gate above. + name: "full (main tier): Nix flake evaluation" + # Main tier only (Phase 2, #1781): PRs keep the basic proxy-port + # fallback check above; formatting is auto-fixed on main, never a gate. if: github.event_name != 'pull_request' runs-on: ubuntu-latest timeout-minutes: 15