From d44bce8ed8b7d6cbc525ab1074966072ab45a832 Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Sun, 14 Dec 2025 12:06:55 -0500 Subject: [PATCH 1/2] fix(ci): manually install nvm-windows instead of Chocolatey Chocolatey's nvm package runs an async installer that gets orphaned in CI before completing. Switch to manual installation: - Download nvm-noinstall.zip directly from GitHub releases - Extract to user's AppData\Roaming\nvm - Create settings.txt with proper paths - Set NVM_HOME, NVM_SYMLINK env vars and PATH --- ...egration-test-migrate-node-windows-nvm.yml | 37 ++++++++++++++----- 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/integration-test-migrate-node-windows-nvm.yml b/.github/workflows/integration-test-migrate-node-windows-nvm.yml index e1096a6..16b13ef 100644 --- a/.github/workflows/integration-test-migrate-node-windows-nvm.yml +++ b/.github/workflows/integration-test-migrate-node-windows-nvm.yml @@ -40,12 +40,29 @@ jobs: - name: "Install nvm-windows" shell: pwsh run: | - choco install nvm -y - # Get nvm paths from machine environment (set by Chocolatey installer) - $nvmHome = [System.Environment]::GetEnvironmentVariable("NVM_HOME", "Machine") - if (-not $nvmHome) { $nvmHome = "C:\ProgramData\nvm" } - $nvmSymlink = [System.Environment]::GetEnvironmentVariable("NVM_SYMLINK", "Machine") - if (-not $nvmSymlink) { $nvmSymlink = "C:\Program Files\nodejs" } + # Manual installation of nvm-windows (Chocolatey's async installer doesn't work in CI) + $nvmVersion = "1.2.2" + $nvmHome = "$env:USERPROFILE\AppData\Roaming\nvm" + $nvmSymlink = "$env:USERPROFILE\AppData\Roaming\nodejs" + + # Create directories + New-Item -ItemType Directory -Force -Path $nvmHome | Out-Null + New-Item -ItemType Directory -Force -Path $nvmSymlink | Out-Null + + # Download nvm-windows noinstall zip + $nvmZip = "$env:TEMP\nvm-noinstall.zip" + Invoke-WebRequest -Uri "https://github.com/coreybutler/nvm-windows/releases/download/$nvmVersion/nvm-noinstall.zip" -OutFile $nvmZip + + # Extract to NVM_HOME + Expand-Archive -Path $nvmZip -DestinationPath $nvmHome -Force + + # Create settings.txt + $settings = @" + root: $nvmHome + path: $nvmSymlink + proxy: none + "@ + $settings | Out-File -FilePath "$nvmHome\settings.txt" -Encoding UTF8 # Export environment variables for subsequent steps "NVM_HOME=$nvmHome" | Out-File -FilePath $env:GITHUB_ENV -Append @@ -57,13 +74,15 @@ jobs: Write-Host "NVM_HOME: $nvmHome" Write-Host "NVM_SYMLINK: $nvmSymlink" + Write-Host "nvm.exe exists: $(Test-Path "$nvmHome\nvm.exe")" - name: "Install Node.js 20.18.0 via nvm-windows" shell: pwsh run: | - Write-Host "PATH contains NVM_HOME: $($env:PATH -split ';' | Where-Object { $_ -like '*nvm*' })" - nvm install 20.18.0 - nvm use 20.18.0 + Write-Host "NVM_HOME: $env:NVM_HOME" + Write-Host "nvm.exe path: $env:NVM_HOME\nvm.exe" + & "$env:NVM_HOME\nvm.exe" install 20.18.0 + & "$env:NVM_HOME\nvm.exe" use 20.18.0 Write-Host "nvm-windows Node.js version:" node --version From 0b12e9a592ebff6f61afccbeb5cfec3cdc7c028a Mon Sep 17 00:00:00 2001 From: "Calvin A. Allen" Date: Sun, 14 Dec 2025 12:07:49 -0500 Subject: [PATCH 2/2] docs(claude): add rule to check branch status before pushing Add critical rule #11 to verify remote tracking branch exists before pushing. If a PR was merged/deleted, create a new branch from main. --- .claude/CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 112ff94..b259e5f 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -27,6 +27,7 @@ Guidance for Claude Code when working with the dtvem codebase. 8. **Run validation before commits** - Run `npm run check` (format, lint, test) before committing and pushing 9. **Working an issue** - When working an issue, always create a new branch from an updated main branch 10. **Branch Names** - Always use the conventional commit `type` from the issue title as the first prefix, and the `scope` as the second, then a very short description, example `feat/ci/integration-tests` +11. **Check branch status before pushing** - ALWAYS verify the remote tracking branch still exists before pushing. If a PR was merged/deleted, create a new branch from main instead of trying to push to the old one. --- ## Quick Reference