diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07241e15..db8885d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -751,6 +751,24 @@ jobs: throw 'converge.ps1 must run user-path.ps1 as a named step.' } + # Native Windows dotfiles linking is not canonical yet: the user-level + # agent configuration is owned by the WSL side until the Windows link + # adapter is enabled. A failing link step must not fail the machine + # convergence. + - name: Validate the Windows dotfiles link step stays non-fatal + shell: pwsh + run: | + Set-StrictMode -Version Latest + $ErrorActionPreference = 'Stop' + + $converge = Get-Content -LiteralPath ./platforms/windows-11/converge.ps1 -Raw + if ($converge -notmatch "Add-Step 'dotfiles-link' 'pending'") { + throw 'the Windows dotfiles link step must be recorded as pending, not as an error.' + } + if ($converge -match "Add-Step 'dotfiles-link' 'error'") { + throw 'the Windows dotfiles link step must not be recorded as an error.' + } + - name: Validate converge survives a step error and always reports shell: pwsh run: | diff --git a/platforms/windows-11/converge.ps1 b/platforms/windows-11/converge.ps1 index 0f5bb5d9..2d2c42ff 100644 --- a/platforms/windows-11/converge.ps1 +++ b/platforms/windows-11/converge.ps1 @@ -284,7 +284,7 @@ function Invoke-DotfilesSync { } $link = Join-Path (Join-Path $DotfilesDir 'script') 'link.ps1' if (-not (Test-Path -LiteralPath $link)) { - Add-Step 'dotfiles-link' 'error' ($link + ' is missing') + Add-Step 'dotfiles-link' 'pending' ($link + ' is missing; native Windows dotfiles linking is not canonical yet') return } # -Apply is adoption-first in link.ps1: it creates absent links and never @@ -302,7 +302,12 @@ function Invoke-DotfilesSync { $why = '; ' + ([string]$conflict[0]).Trim() if ($why.Length -gt 200) { $why = $why.Substring(0, 200) } } - Add-Step 'dotfiles-link' 'error' ('link.ps1 exited ' + $LASTEXITCODE + $why + '; see ' + $script:LogFile) + # Native Windows dotfiles linking is not canonical yet: the user-level + # agent configuration is owned by the WSL side until the Windows link + # adapter is enabled (platforms/windows-11/README.md). A failure here is + # therefore recorded as pending instead of failing the machine + # convergence (rebuildup/pc-setup#288). + Add-Step 'dotfiles-link' 'pending' ('link.ps1 exited ' + $LASTEXITCODE + $why + '; native Windows dotfiles linking is not canonical yet; see ' + $script:LogFile) } }