From 87a3eff74b5300e60272b1813df3e397039971d3 Mon Sep 17 00:00:00 2001 From: Agent Date: Mon, 29 Jun 2026 17:26:51 +0000 Subject: [PATCH] ci: add native bash retry for nix flake check cache.nixos.org occasionally drops connections mid-download, causing Nix to exhaust its built-in retries with an HTTP 416 error. A fresh step-level retry (no partial-download state) reliably succeeds on attempt 2. Use a simple bash OR to retry the step once without adding third-party actions. Ticket: AI-679 Session-Id: 52048a79-f64d-4b77-acb6-54b5e396b174 Task-Id: 79e97f6e-3de0-41e0-a072-6cf6bed65b79 --- .github/workflows/format.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index e162b841..54b0e252 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -19,4 +19,10 @@ jobs: - name: Checkout uses: actions/checkout@v7 - - run: nix flake check + - name: Check Nix flake + # Retry once on failure: cache.nixos.org occasionally drops a TCP + # connection mid-download, causing Nix's built-in resume to receive + # HTTP 416 and exhaust all 5 internal retries. A fresh attempt (no + # partial-download state) reliably succeeds. The || idiom runs the + # second attempt only when the first exits non-zero. + run: nix flake check || nix flake check