From 6fcb25bcd97f5042d1e93969c6dc94bfd2cd0f25 Mon Sep 17 00:00:00 2001 From: JacobPEvans <20714140+JacobPEvans@users.noreply.github.com> Date: Sun, 15 Mar 2026 11:34:07 -0400 Subject: [PATCH 1/2] feat(ci): add reusable copilot-setup-steps workflow + regression comments Create _copilot-setup-steps.yml reusable workflow for Nix-based Copilot coding agent environment setup. This centralizes the copilot setup that was copy-pasted across nix-home, nix-darwin, and nix-ai repos. Add regression-prevention comments to _nix-build.yml and _nix-validate.yml clarifying that determinate-nix-action@v3 is ONLY a Nix installer and does NOT include flake checking (prevents future AI-assisted regressions from stale training data conflating the two actions). (claude) --- .github/workflows/_copilot-setup-steps.yml | 24 ++++++++++++++++++++++ .github/workflows/_nix-build.yml | 2 ++ .github/workflows/_nix-validate.yml | 3 +++ 3 files changed, 29 insertions(+) create mode 100644 .github/workflows/_copilot-setup-steps.yml diff --git a/.github/workflows/_copilot-setup-steps.yml b/.github/workflows/_copilot-setup-steps.yml new file mode 100644 index 0000000..6139a74 --- /dev/null +++ b/.github/workflows/_copilot-setup-steps.yml @@ -0,0 +1,24 @@ +# Reusable: Copilot Setup Steps (Nix) +# Sets up a Nix development environment for GitHub Copilot coding agents. +# +# IMPORTANT — Action clarification (prevents regression from stale AI training data): +# - determinate-nix-action@v3 is ONLY a Nix installer (replaced nix-installer-action@v21) +# - It does NOT include flake checking — that is a separate action (flake-checker-action) +# - For copilot setup, only the installer is needed (CI handles flake validation) +name: _copilot-setup-steps + +on: + workflow_call: + +jobs: + copilot-setup-steps: + name: Copilot Setup Steps + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v6 + + # Installs Nix only. Does NOT validate flakes. + # Replaced nix-installer-action@v21 (Node.js 20, deprecated June 2026). + - uses: DeterminateSystems/determinate-nix-action@v3 diff --git a/.github/workflows/_nix-build.yml b/.github/workflows/_nix-build.yml index 465169b..4b62fb3 100644 --- a/.github/workflows/_nix-build.yml +++ b/.github/workflows/_nix-build.yml @@ -26,6 +26,8 @@ jobs: - name: Checkout uses: actions/checkout@v6 + # determinate-nix-action@v3 is ONLY a Nix installer (replaced nix-installer-action@v21). + # It does NOT include flake checking — flake validation is in _nix-validate.yml. - name: Install Nix uses: DeterminateSystems/determinate-nix-action@v3 with: diff --git a/.github/workflows/_nix-validate.yml b/.github/workflows/_nix-validate.yml index 365327b..b405574 100644 --- a/.github/workflows/_nix-validate.yml +++ b/.github/workflows/_nix-validate.yml @@ -20,6 +20,9 @@ jobs: - name: Checkout uses: actions/checkout@v6 + # determinate-nix-action@v3 is ONLY a Nix installer (replaced nix-installer-action@v21). + # It does NOT include flake checking — that was a separate action (flake-checker-action). + # Flake evaluation is handled by `nix flake check` below, not by the installer. - name: Install Nix uses: DeterminateSystems/determinate-nix-action@v3 with: From e550b7c811c4074b62fa270b6d4f847e6eac4474 Mon Sep 17 00:00:00 2001 From: Jacob <20714140+JacobPEvans@users.noreply.github.com> Date: Sun, 15 Mar 2026 15:09:13 -0400 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jacob <20714140+JacobPEvans@users.noreply.github.com> --- .github/workflows/_copilot-setup-steps.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/_copilot-setup-steps.yml b/.github/workflows/_copilot-setup-steps.yml index 6139a74..3255f83 100644 --- a/.github/workflows/_copilot-setup-steps.yml +++ b/.github/workflows/_copilot-setup-steps.yml @@ -7,6 +7,10 @@ # - For copilot setup, only the installer is needed (CI handles flake validation) name: _copilot-setup-steps +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + on: workflow_call: