From 76cd245e8e63277cc0b928fa76017155fdcf7545 Mon Sep 17 00:00:00 2001 From: haelyra <49814733+haelyra@users.noreply.github.com> Date: Fri, 6 Nov 2026 00:26:21 -0500 Subject: [PATCH] fix: fetch Grok pin history in coverage job --- .github/workflows/ci.yml | 2 ++ tests/ci/coverage-grok-history.test.js | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/ci/coverage-grok-history.test.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62d0f7c66..cdafbc878 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -482,6 +482,8 @@ jobs: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: + # Grok source-pin tests inspect a historical commit during coverage. + fetch-depth: 0 persist-credentials: false - name: Setup Node.js diff --git a/tests/ci/coverage-grok-history.test.js b/tests/ci/coverage-grok-history.test.js new file mode 100644 index 000000000..d16861225 --- /dev/null +++ b/tests/ci/coverage-grok-history.test.js @@ -0,0 +1,16 @@ +'use strict'; + +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const test = require('node:test'); +const yaml = require('js-yaml'); + +test('coverage checkout includes pinned Grok source history', () => { + const workflowPath = path.join(__dirname, '..', '..', '.github', 'workflows', 'ci.yml'); + const workflow = yaml.load(fs.readFileSync(workflowPath, 'utf8')); + const checkout = workflow.jobs.coverage.steps.find(step => step.name === 'Checkout'); + assert.ok(checkout, 'coverage job must check out source'); + assert.equal(checkout.with['fetch-depth'], 0, + 'coverage tests verify historical Grok source pins and need complete Git history'); +});