From 56f67ab13e046a59bcf76468525cabf9d5778cf5 Mon Sep 17 00:00:00 2001 From: CI Date: Wed, 9 Sep 2026 16:59:38 +0800 Subject: [PATCH] ci(windows): add windows-process workflow for OpenProcess liveness verification Follow-up to PR #1911 (fix(util): OpenProcess ERROR_INVALID_PARAMETER means dead, #1723 case 1). CI runs ubuntu-only, so the Windows branch of IsProcessAlive (OpenProcess + non-blocking WaitForSingleObject) never executes in CI; windows-proxy only covers the proxy stack. This workflow runs the IsProcessAlive tests on a real windows-latest kernel, where TestIsProcessAlive_NonExistent is the regression sentinel for the 87 verdict. Mirrors windows-proxy (#761) conventions; per the standing windows-real-machine policy. Co-Authored-By: ggcode --- .github/workflows/windows-process.yml | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/windows-process.yml diff --git a/.github/workflows/windows-process.yml b/.github/workflows/windows-process.yml new file mode 100644 index 000000000..9e0232cdd --- /dev/null +++ b/.github/workflows/windows-process.yml @@ -0,0 +1,42 @@ +name: windows-process + +# Windows process-liveness verification (#1723 case 1 / PR #1911). +# +# IsProcessAlive on Windows goes through OpenProcess + a non-blocking +# WaitForSingleObject, and the ERROR_INVALID_PARAMETER (87) verdict +# (nonexistent pid = dead) only behaves as documented on a real Windows +# kernel: 87 must report dead, ACCESS_DENIED (5) must stay alive, and a +# signaled handle must mean exited. No LAN member has a Windows machine, +# so this runner IS the real-machine test (same standing policy as +# windows-proxy, #761). TestIsProcessAlive_NonExistent is the regression +# sentinel: it turns red on Windows exactly when the 87 branch regresses. + +on: + push: + branches: [main] + paths: + - "internal/util/process*.go" + - ".github/workflows/windows-process.yml" + pull_request: + paths: + - "internal/util/process*.go" + - ".github/workflows/windows-process.yml" + workflow_dispatch: + +permissions: + contents: read + +jobs: + process: + runs-on: windows-latest + timeout-minutes: 15 + env: + GOFLAGS: "-p=1" + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: Process liveness tests + shell: pwsh + run: go test -tags goolm -count=1 -v -run "IsProcessAlive" ./internal/util/