From 886f7eecd55eb64a27a218e3760aa1ff4cc06fcb Mon Sep 17 00:00:00 2001 From: Asahi Arataki Date: Sun, 15 Nov 2026 14:44:05 +0800 Subject: [PATCH] ci: test the Go floor without racing the MCP source registry --- .github/dependabot.yml | 3 ++- .github/workflows/go.yml | 8 +++++++- main_mcp_test.go | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 37de8dd..e6c524e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,7 +13,8 @@ updates: go-modules: patterns: ["*"] # lipgloss v2.1.0 requires go 1.26.7; the supported minimum stays at - # go 1.26.0 (CI's "Check go directive") until it is raised on purpose. + # go 1.26.0 until it is raised on purpose. CI's minimum leg installs the + # go directive itself (not the patched toolchain line) to test this floor. ignore: - dependency-name: "charm.land/lipgloss/v2" versions: [">= 2.1.0"] diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 81ac068..47a5ede 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,11 +25,17 @@ jobs: with: fetch-depth: 0 + - name: Read Go language minimum + if: matrix.go == 'minimum' + id: go-minimum + shell: bash + run: echo "version=$(sed -n 's/^go //p' go.mod)" >> "$GITHUB_OUTPUT" + - name: Set up Go (go.mod minimum) if: matrix.go == 'minimum' uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7 with: - go-version-file: 'go.mod' + go-version: ${{ steps.go-minimum.outputs.version }} cache: false - name: Set up Go (latest stable) diff --git a/main_mcp_test.go b/main_mcp_test.go index 9441376..dc4c5d4 100644 --- a/main_mcp_test.go +++ b/main_mcp_test.go @@ -197,7 +197,8 @@ func (f fakeSource) Names(context.Context, string) ([]string, error) { return f. // TestE2EMCPScanSources checks that scan seeds candidates from the passive // sources the operator enabled and only those, reporting each one (#268). func TestE2EMCPScanSources(t *testing.T) { - t.Parallel() + // This test replaces the process-wide source registry. Keep it serial so + // parallel MCP sessions cannot read the stub or race with its restoration. zone, err := labzone.Load(filepath.Join("examples", "labs", "lab1-first-scan.zone")) if err != nil { t.Fatal(err)