Repository navigation
fix: unblock search session recovery and preserve installer IO errors - #3974
Merged
kev1n77 merged 3 commits intoNov 19, 2026
Merged
Conversation
Clone the cached session before probing daemon health so stale-session recovery can acquire the write lock. Add a real-daemon regression covering reopening and subsequent shutdown.
Attach file and directory context to extraction and copy failures and retain the full error chain at the command boundary. Cover real filesystem conflicts, legacy ZIP payloads, and Windows file sharing violations.
Contributor
Author
|
这个bug有时会导致应用无法正常退出,只能在任务管理器中结束,希望能关注一下 |
Update the activity epoch while the cache read lock is held, and release the lock before daemon IO. Add a real-daemon regression for a pending idle release. AI-assisted. Verified on Windows with 30 workspace search unit tests and 6 contract tests, including ignored real-daemon cases.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3973.
Type and Areas
Type: Bug fix.
Areas: Shared workspace-search service; installer Rust backend.
Motivation / Impact
With Rust 2021 temporary lifetimes, the cached-session
if letretains its read lock throughout the branch. After a failed health check, acquiring the write lock deadlocks recovery and prevents desktop shutdown cleanup from acquiring the same lock. Cloning the cached entry in a separate statement releases the read lock before daemon IO and recovery.Installer IO failures now identify the affected file/directory and retain the original system error code. Existing payload validation, symlink rejection, and installation transactions retain their behavior.
Verification
AI-assisted implementation and review; focused tests executed on Linux/WSL.
The new daemon test failed on the original implementation with
Elapsed(())at the five-second recovery deadline and passed after the fix. The three new filesystem diagnostic tests also failed before the fix and passed afterward.Passed:
node scripts/prepare-flashgrep-resource.mjs --target x86_64-unknown-linux-muslFLASHGREP_DAEMON_BIN="$PWD/resources/flashgrep/flashgrep-x86_64-unknown-linux-musl" cargo test --locked -p openbitfun-services-integrations --no-default-features --features workspace-search --lib workspace_search:: -- --include-ignored --nocapture— 29 passed, including recovery and subsequent shutdown against the real daemon.cargo test --locked -p openbitfun-services-integrations --no-default-features --features workspace-search --test workspace_search_contracts— 5 passed; existing content-indexing E2E ignored.cargo test --offline --manifest-path OpenBitFun-Installer/src-tauri/Cargo.toml --lib installer::extract::tests— 4 passed, including legacy ZIP compatibility.cargo test --offline --manifest-path OpenBitFun-Installer/src-tauri/Cargo.toml --lib installer::commands::tests— 9 passed.cargo check --offline --manifest-path OpenBitFun-Installer/src-tauri/Cargo.tomlpnpm --dir OpenBitFun-Installer run type-checkpnpm run fmt:rs,pnpm run fmt:rs -- --check,pnpm run i18n:audit, andgit diff --check.The full installer build with
--skip-app-buildcould not proceed becausetarget/release/openbitfun-desktop.exeis absent. Windows exclusive-handle tests and GUI exit/install acceptance were not run.Reviewer Notes
No persisted shapes, commands, or wire contracts changed. Local Linux service and installer filesystem behavior were exercised; remote workspace, remote control, Peer Device Mode, and Detached Dispatch were not exercised end to end.
Checklist