YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(release): remove stale Windows frontend packages before install (#7217)
Louis Beaumont0b344c676125
diff --git a/.github/actions/install-windows-frontend-dependencies/action.yml b/.github/actions/install-windows-frontend-dependencies/action.ymlindex 2eb6b8d80..2712e5b63 100644--- a/.github/actions/install-windows-frontend-dependencies/action.yml+++ b/.github/actions/install-windows-frontend-dependencies/action.yml@@ -25,6 +25,13 @@ runs:Remove-Item -LiteralPath $destination -Recurse -Force}}+ # Bun's frozen install can retain packages removed from the lockfile.+ # Tauri scans installed plugins, so an orphan can fail its version gate.+ # Rebuild the installed tree; the persistent Bun download cache remains.+ $modules = Join-Path (Get-Location) 'node_modules'+ if (Test-Path -LiteralPath $modules) {+ Remove-Item -LiteralPath $modules -Recurse -Force+ }$staged = Join-Path (Get-Location) '.release-workflows-ui'New-Item -ItemType Directory -Force -Path $staged | Out-NullCopy-Item -LiteralPath "$source/package.json" -Destination $staged -Forcediff --git a/.github/workflows/test-release-workflows.yml b/.github/workflows/test-release-workflows.ymlindex 9b936e941..6a2c6f024 100644--- a/.github/workflows/test-release-workflows.yml+++ b/.github/workflows/test-release-workflows.yml@@ -154,3 +154,47 @@ jobs:Expand-Archive -LiteralPath $zip -DestinationPath $tool -Force"CODESIGNTOOL_PATH=$tool" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append- uses: ./.github/actions/refresh-windows-signing-trust++ windows-frontend-dependencies:+ strategy:+ fail-fast: false+ matrix:+ os: [windows-latest, windows-11-arm]+ runs-on: ${{ matrix.os }}+ timeout-minutes: 15+ steps:+ - uses: actions/checkout@v4+ - uses: oven-sh/setup-bun@v2+ with:+ bun-version: "1.3.10"+ - name: Reproduce the persistent runner's removed updater package+ shell: pwsh+ working-directory: apps/screenpipe-app-tauri+ run: |+ $orphan = 'node_modules/@tauri-apps/plugin-updater'+ New-Item -ItemType Directory -Force -Path $orphan | Out-Null+ Set-Content -LiteralPath "$orphan/package.json" -Value '{"name":"@tauri-apps/plugin-updater","version":"2.10.0"}'+ - uses: ./.github/actions/install-windows-frontend-dependencies+ - name: Verify the installed tree matches the release dependencies+ shell: pwsh+ working-directory: apps/screenpipe-app-tauri+ run: |+ $ErrorActionPreference = 'Stop'+ if (Test-Path -LiteralPath 'node_modules/@tauri-apps/plugin-updater') {+ throw 'removed updater package survived the release install'+ }+ if (-not (Test-Path -LiteralPath 'node_modules/@tauri-apps/cli/package.json')) {+ throw 'Tauri CLI was not installed'+ }+ $source = '../../packages/workflows-ui/src'+ $installed = 'node_modules/@screenpipe/workflows-ui/src'+ foreach ($file in Get-ChildItem -LiteralPath $source -Recurse -File) {+ $relative = [IO.Path]::GetRelativePath((Resolve-Path $source), $file.FullName)+ $copy = Get-Item -LiteralPath (Join-Path $installed $relative)+ if ($copy.Attributes -band [IO.FileAttributes]::ReparsePoint) {+ throw "local dependency uses a symlink: $relative"+ }+ if ((Get-FileHash $copy.FullName).Hash -ne (Get-FileHash $file.FullName).Hash) {+ throw "local dependency differs from release source: $relative"+ }+ }