Skip to content

fix(ci): write WinFsp registry key for winfsp-sys build script#234

Merged
FSM1 merged 2 commits into
mainfrom
fix/winfsp-registry-key
Mar 1, 2026
Merged

fix(ci): write WinFsp registry key for winfsp-sys build script#234
FSM1 merged 2 commits into
mainfrom
fix/winfsp-registry-key

Conversation

@FSM1

@FSM1 FSM1 commented Mar 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • winfsp-sys build.rs reads HKLM\SOFTWARE\WOW6432Node\WinFsp\InstallDir to locate WinFsp headers and libs — there is no env var fallback
  • The MSI install doesn't reliably write this registry key on GitHub Actions runners
  • Fix: explicitly create the registry key after MSI install, then verify lib/ and inc/ directories exist
  • Also removes the WINFSP_INSTALL_DIR env var from the previous PR (fix(ci): fix Windows desktop staging build and add Linux desktop build #232) which winfsp-sys doesn't actually check

Root cause

The winfsp crate's system feature (enabled in Cargo.toml) triggers a registry lookup in winfsp-sys build.rs. CI only runs cargo check/cargo test which use the build-dependency (without system feature, uses bundled libs). The staging tauri build is the first workflow to do a full release build with the system feature.

Test plan

  • Merge and tag a new staging release to verify Windows desktop build succeeds

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved Windows build setup for staging to detect and validate WinFsp installation and required headers/libs, increasing build reliability.
    • Removed reliance on an explicitly passed install-dir environment variable for the desktop build, relying on validated system location instead.

winfsp-sys build.rs reads HKLM\SOFTWARE\WOW6432Node\WinFsp\InstallDir
to find WinFsp headers and libs. The MSI doesn't reliably write this
registry key on GitHub Actions runners. Explicitly create the key after
MSI install, with verification that lib/ and inc/ directories exist.

Also removes WINFSP_INSTALL_DIR env var which winfsp-sys doesn't check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: fdcae8003e0c
@coderabbitai

coderabbitai Bot commented Mar 1, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56caf85 and d109517.

📒 Files selected for processing (1)
  • .github/workflows/deploy-staging.yml

Walkthrough

Modifies the Windows staging deployment workflow to create/validate a WinFsp registry key and InstallDir, verify expected subdirectories, log the path, and remove the explicit WINFSP_INSTALL_DIR environment variable from the desktop tauri build step.

Changes

Cohort / File(s) Summary
WinFsp Registry Configuration
.github/workflows/deploy-staging.yml
Adds Windows registry manipulation to ensure HKLM\SOFTWARE\WOW6432Node\WinFsp exists and sets InstallDir to C:\Program Files (x86)\WinFsp; validates lib and inc subdirectories and logs the path. Removes the explicit WINFSP_INSTALL_DIR env var from the tauri build step.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding WinFsp registry key manipulation in CI for the winfsp-sys build script.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/winfsp-registry-key

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/deploy-staging.yml:
- Around line 195-198: After reading the registry with Get-ItemProperty into
$regVal, explicitly assert that $regVal and $regVal.InstallDir exist and match
the expected $installDir (instead of only Write-Host); if the registry read
returned $null or InstallDir is empty or not equal to $installDir, throw an
error so the step fails fast. Update the block that uses Get-ItemProperty,
$regVal and the InstallDir checks to validate the retrieved value (and consider
removing -ErrorAction SilentlyContinue) before proceeding to the existing
Test-Path checks for "$installDir\lib" and "$installDir\inc".

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c50db68 and 56caf85.

📒 Files selected for processing (1)
  • .github/workflows/deploy-staging.yml

Comment thread .github/workflows/deploy-staging.yml Outdated
Use -ErrorAction Stop and value comparison instead of SilentlyContinue
to fail fast if the registry key wasn't persisted correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 8c7de1c46cb7
@FSM1 FSM1 enabled auto-merge (squash) March 1, 2026 23:16
@FSM1 FSM1 merged commit db84431 into main Mar 1, 2026
23 checks passed
@FSM1 FSM1 deleted the fix/winfsp-registry-key branch March 4, 2026 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant