Skip to content

fix(v0.9.4): Session-1 bridge resilience, bounded virtual-drive timeouts, and Select/Unselect any folder - #103

Merged
oyesanyf merged 1 commit into
mainfrom
pr/solo-quorumrag-20261125-032042
Nov 25, 2026
Merged

oyesanyf merged 1 commit into
mainfrom
pr/solo-quorumrag-20261125-032042

Conversation

@oyesanyf

Copy link
Copy Markdown
Owner

Summary

Fixes live Windows LocalSystem (Session 0 -> Session 1) Google Drive (G:\My Drive) bridging, stops virtual-drive Dokan timeout respawn storms, and adds full Select & Unselect ANY Folder support across every folder picker modal, inline explorer, and Cloud Drives card.

Root Causes Addressed

  1. Cross-Integrity Bridge Watchdog Premature Exit (session_bridge_server.rs):
    • spawn_parent_watchdog(parent_pid) previously ran before READY <port> and called OpenProcess(PROCESS_SYNCHRONIZE) on the Session-0 LocalSystem service PID, returning ERROR_ACCESS_DENIED and terminating the Session-1 helper in <100 ms.
  2. Dokan Virtual-Drive Timeout Respawn Storm & False 404s (session_fs_bridge.rs, session_bridge_server.rs, handlers/settings.rs, handlers/cloud_drives.rs):
    • When Google Drive for Desktop (G:\) momentarily blocked on Dokan IRPs, call_bridge_with_retry blindly called clear_bridge_endpoint() and respawned a new Session-1 bridge process on every timeout, compounding load on GoogleDriveFS.exe and turning slow virtual-drive probes into false 404 Directory does not exist on disk: G:\ or Failed to fetch errors.
    • std::fs::canonicalize (GetFinalPathNameByHandleW) could also fail on virtual drive roots (G:\) even when metadata succeeded.
  3. One-Way Folder Selection (app.js, styles.css, handlers/cloud_drives.rs):
    • The Select Folder modal previously lacked checkboxes, selected-state indicators, selected-folder summary chips, and unselect controls, and POST /api/cloud-drives/config (action: "remove_folder") only removed custom_paths rather than also allowing unselection of a drive's root_path.

Changes

  1. Zero-Privilege Kernel Stdin-EOF Keepalive + Toolhelp32 Fallback (crates/quorum-daemon/src/session_bridge_server.rs, crates/quorum-daemon/src/win_native.rs, crates/quorum-daemon/src/main.rs, crates/quorum-daemon/src/desktop_main.rs):
    • Added --keepalive-stdin pipe-EOF keepalive from QuorumRAGDaemon plus unprivileged CreateToolhelp32Snapshot fallback started strictly after READY <port> flush.
  2. Bounded Dokan Timeouts, Non-Respawn Health Gate & Per-Drive Circuit Breaker (crates/quorum-types/src/session_fs_bridge.rs, crates/quorum-daemon/src/session_bridge_server.rs, crates/quorum-ingest/src/cloud_drives.rs, crates/quorum-ingest/src/config.rs, crates/quorum-daemon/src/handlers/settings.rs, crates/quorum-daemon/src/handlers/cloud_drives.rs):
    • Classified socket timeouts separately from transport disconnects; on timeout, probes /bridge/health (1 s) and never respawns a healthy bridge.
    • Added a 30-second per-drive-letter timeout circuit breaker (DRIVE_TIMEOUT_BACKOFF) and bounded local virtual-drive probes (is_local_virtual_drive_path, local_is_dir_bounded, local_is_file_bounded, local_canonicalize_bounded) so neither Session-0 services nor interactive Session-1 daemon startups ever hang when Google Drive for Desktop (G:\) is busy or applying pending changes — returning HTTP 504 with actionable guidance instead of false 404.
    • Added resolve_safe_existing_path (canonicalize with validated metadata fallback for Dokan roots) and bounded worker threads (3.5 s for /bridge/stat, 5.5 s for /bridge/browse, capped at MAX_BLOCKED_FS_OPS = 12).
    • Surfaced Google Drive (G:\My Drive) in Quick Access directly from cached Session-1 drive discovery (0 ms) and eliminated redundant double-probing on bridged drives.
  3. Select & Unselect ANY Folder (crates/quorum-ui/assets/app.js, crates/quorum-ui/assets/styles.css, crates/quorum-ui/assets/index.html, crates/quorum-daemon/src/handlers/cloud_drives.rs):
    • Enhanced POST /api/cloud-drives/config (action: "remove_folder") to unselect both custom_paths and root_path (disabling the drive and purging/unwatching safely when no folders remain) while respecting unselected roots in merged_entries_in_order and reconcile_discovered_cloud_drives.
    • Upgraded the universal Select Folder modal (modal-pure-rust-folder-picker in both index.html and app.js) with accessible native checkboxes (.folder-checkbox-hit + :focus-visible), stateful ✓ Selected — Unselect toggle buttons (aria-pressed), a Selected Folders summary chip bar with one-click ✕ removal (#pure-rust-picker-selected-bar), stateful footer Select/Unselect + Done button, and Escape-key dismissal across all contexts (cloud-drives, mesh, mkt/general, newdoc/storage, dlp, artemis, reindex).
    • Updated inline folder explorers and Cloud Drives cards with explicit Unselect controls.
  4. Version Bump (0.9.3 -> 0.9.4) & Regression Tests:
    • Added bridge_survives_privileged_local_system_parent_pid_and_exits_on_stdin_eof, bridge_504_timeout_preserves_endpoint_and_trips_drive_circuit_breaker, and test_folder_picker_select_and_unselect_any_folder_controls.
    • Bumped version to 0.9.4 and WebUI asset cache-buster to ?v=20261124f.

Verification

  • node --check crates/quorum-ui/assets/app.js — PASS
  • quorum-types (session_fs_bridge tests 3/3 including 504 non-respawn & circuit breaker) — PASS
  • quorum-ui (cloud_drives_ui_tests 9/9 including static modal #pure-rust-picker-selected-bar & Done assertions) — PASS
  • quorum-ingest (cloud_drives tests 7/7) — PASS
  • quorum-daemon (packaging_invariants_tests 4/4, session_fs_bridge_tests 3/3 including PID 4 + --keepalive-stdin) — PASS
  • Live /browser verification on rebuilt v0.9.4 (http://127.0.0.1:3041/): verified 1.3 s startup even with wedged G:\, Drives: C:\ D:\ G:\, HTTP 504 busy guidance on G:\, and full Select/Unselect via checkboxes, ✓ Selected — Unselect, #pure-rust-picker-selected-bar ✕ chips, footer ✕ Unselect Folder, and Done across Cloud Drives & Mesh — PASS
  • Signed QuorumRAG-0.9.4-x86_64.msi (82,448,384 bytes, Authenticode sign parity, ICE63, Zero-Touch PATH, Defender CLEAN) — PASS

@gitguardian

gitguardian Bot commented Nov 25, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
41099822 Triggered Generic High Entropy Secret dd122c6 crates/quorum-daemon/tests/session_fs_bridge_tests.rs View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@github-actions github-actions 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.

[PASS] QuorumRAG Solo-Developer Invariant Gate & Review Bot: Verified repository owner (@oyesanyf, OWNER), commit dd122c6 (21 file(s)), Zero-Touch PATH compliance, zero private keys, and hermetic build scripts.

true,
std::time::Duration::from_millis(800),
) {
Ok(true) | Err(_) => push_unique_drive(&mut out, p),
true,
std::time::Duration::from_millis(800),
) {
Ok(true) | Err(_) => push_unique_drive(&mut out, p),
@oyesanyf
oyesanyf merged commit 7a5cb6c into main Nov 25, 2026
3 of 6 checks passed
@oyesanyf
oyesanyf deleted the pr/solo-quorumrag-20261125-032042 branch November 25, 2026 09:29
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.

2 participants