Skip to content

fix: v0.2.0-v0.2.1 stability & robustness fixes (roadmap #1-#3, #4, #7-#9, #11-#13, #15, #16) - #4

Merged
Reamd7 merged 8 commits into
mainfrom
fix/v0.2.0-stability
Apr 21, 2026
Merged

Reamd7 merged 8 commits into
mainfrom
fix/v0.2.0-stability

Conversation

@Reamd7

@Reamd7 Reamd7 commented Apr 21, 2026 •

Copy link
Copy Markdown
Owner

Summary

v0.2.0-v0.2.1 稳定性与健壮性修复批次,覆盖路线图 P0-P2 共 13 项(#1-#3, #4, #7-#9, #11, #12, #13, #15, #16)。Rebased onto main (includes a757e52).

Changes (8 commits)

8c4398c - v0.2.0 stability fixes (P0 + P1-4)

  • #P0-1 Tray Lock: Wire tray Lock menu to vault lock logic (clear keys, clear pending 2FA, emit lock-state-changed)
  • #P0-2 Approval timeout: 30s timeout on SSH approval requests - auto-reject stale requests instead of blocking agent indefinitely
  • #P0-3 Token refresh: Refresh token before sync_vault in 3 paths: Reunlock, periodic sync, manual sync
  • #P1-4 Mutex recovery: Replace 3x expect("lock poisoned") with graceful mutex recovery + warning log

cdd0832 - Robustness improvements (13 sub-fixes)

# Change
#1 access_log.record wrapped in spawn_blocking - prevent tokio thread starvation
#2 Consolidate sequential mutex locks in auth.rs ensure_unlocked
#3 Keys length assertion - prevent slice panics on malformed data
#4 Log dropped approval responses instead of silently discarding
#5 Log DB migration failures instead of silently ignoring
#6 8 event emission sites: let _ = to if let Err(e) = warn
#7 Debug logs for decryption failures in key listing
#9,#10 Extract approval_timeout_secs + max_login_attempts to Config
#11 State lock hold time reduced in ssh_agent.rs by snapshotting state
#12,#13 region::lock fallback + Unix socket cleanup logging

18841f7 - Roadmap status update

  • Mark v0.2.0 and v0.2.1 items as completed/accepted

f414294 - 32-bit Windows PEB offset + SSH op parsing

  • #8: Replace hardcoded 64-bit PEB offsets with runtime pointer-size detection (supports 32-bit Windows)
  • #9: Verify SSH op parsing covers 6+ operations (git sign, ls-remote, plain SSH, etc.)

0024d57 - Panic handler + roadmap updates

  • #12: std::panic::set_hook writes crash.log with timestamp + panic message to LOCALAPPDATA/bw-agent/
  • #11: Git config parsing evaluated as acceptable for current use case

10fae99 - Process lists + globset + roadmap

  • #15: Expanded HARD_STOP_LIST (docker, podman, code, cursor, gnome-shell...) and TRANSPARENT_LIST (tmux, screen, nu, node, python, cargo, npm, CI runners...)
  • #16: Replace hand-written glob matching with globset crate - standard ** and [a-z] support

2319210 - Cargo.lock for globset

201f664 - CI fix

  • Remove String::display() call on Unix-only code path (compilation fix for #[cfg(unix)] block)

Files Changed

  • crates/bw-agent/src/{access_log,approval,auth,config,lib,process,routing,ssh_agent}.rs
  • crates/bw-agent/Cargo.toml - added globset dependency
  • crates/bw-core/src/locked.rs - Keys length assertion + region::lock fallback
  • src-tauri/src/{commands,main,tray}.rs
  • Cargo.lock
  • docs/product-roadmap.md

Test Plan

  • cargo test - all tests pass
  • cargo clippy -- -D warnings - zero warnings
  • cargo fmt --check - clean
  • CI: Lint & format, Frontend build, Test (macOS/Ubuntu/Windows)
  • Rebased onto latest main (resolves conflict with a757e52)

Reamd7 added 8 commits April 22, 2026 01:37
…esh, panic recovery

- Wire tray Lock menu to vault lock logic (was disabled placeholder)

- Add 30s timeout to SSH approval requests (prevents indefinite agent hang)

- Implement token refresh before sync_vault in Reunlock, periodic sync, and manual sync paths

- Replace 3x expect(lock poisoned) with graceful mutex recovery
…rable timeouts

- Log dropped approval responses instead of silently discarding

- Log DB migration failures instead of silently ignoring

- Wrap access_log.record in spawn_blocking to prevent tokio thread starvation

- Add Keys length assertion to prevent slice panics on malformed data

- Consolidate sequential mutex locks in auth.rs ensure_unlocked

- Add warning logs for all event emission failures (8 locations)

- Add debug logs for decryption failures in key listing

- Extract approval timeout and login retry count to Config

- Reduce state lock hold time in ssh_agent.rs by snapshotting state

- Graceful fallback for region::lock failure instead of unwrap panic

- Log Unix socket cleanup failure

- Extract SYNC_INTERVAL_TICKS constant replacing magic number
…done

- Replace hardcoded 64-bit PEB offsets with runtime pointer-size detection

- #9 SSH op parsing already covers git sign, ls-remote, plain SSH beyond the 3 map entries
- Install std::panic::set_hook that writes crash.log with timestamp and panic message

- #11 git config parsing evaluated as acceptable for current use case

- #12 crash dump now writes to LOCALAPPDATA/bw-agent/crash.log
…oadmap

- Add tmux/docker/vscode/node/python/cargo etc to process black/whitelists

- Replace hand-written glob with globset crate for standard ** and [a-z] support

- Roadmap: #15 #16 fixed, #11 accepted, #17 already absent
@Reamd7
Reamd7 force-pushed the fix/v0.2.0-stability branch from 31e30dc to 201f664 Compare April 21, 2026 17:40
@Reamd7 Reamd7 changed the title fix: v0.2.0 stability fixes fix: v0.2.0-v0.2.1 stability & robustness fixes (roadmap #1-#3, #4, #7-#9, #11-#13, #15, #16) Apr 21, 2026
@Reamd7
Reamd7 merged commit dcf9d76 into main Apr 21, 2026
6 checks passed
Reamd7 added a commit that referenced this pull request Apr 22, 2026
…7-#9, #11-#13, #15, #16) (#4)

* fix: v0.2.0 stability fixes - tray lock, approval timeout, token refresh, panic recovery

- Wire tray Lock menu to vault lock logic (was disabled placeholder)

- Add 30s timeout to SSH approval requests (prevents indefinite agent hang)

- Implement token refresh before sync_vault in Reunlock, periodic sync, and manual sync paths

- Replace 3x expect(lock poisoned) with graceful mutex recovery

* fix: robustness improvements - silent failures, panic guards, configurable timeouts

- Log dropped approval responses instead of silently discarding

- Log DB migration failures instead of silently ignoring

- Wrap access_log.record in spawn_blocking to prevent tokio thread starvation

- Add Keys length assertion to prevent slice panics on malformed data

- Consolidate sequential mutex locks in auth.rs ensure_unlocked

- Add warning logs for all event emission failures (8 locations)

- Add debug logs for decryption failures in key listing

- Extract approval timeout and login retry count to Config

- Reduce state lock hold time in ssh_agent.rs by snapshotting state

- Graceful fallback for region::lock failure instead of unwrap panic

- Log Unix socket cleanup failure

- Extract SYNC_INTERVAL_TICKS constant replacing magic number

* docs: update roadmap with v0.2.0 and v0.2.1 completion status

* fix: add 32-bit Windows PEB offset support, mark roadmap items #8 #9 done

- Replace hardcoded 64-bit PEB offsets with runtime pointer-size detection

- #9 SSH op parsing already covers git sign, ls-remote, plain SSH beyond the 3 map entries

* fix: add panic handler for crash logging, mark roadmap #11 #12

- Install std::panic::set_hook that writes crash.log with timestamp and panic message

- #11 git config parsing evaluated as acceptable for current use case

- #12 crash dump now writes to LOCALAPPDATA/bw-agent/crash.log

* fix: expand process lists, use globset for pattern matching, update roadmap

- Add tmux/docker/vscode/node/python/cargo etc to process black/whitelists

- Replace hand-written glob with globset crate for standard ** and [a-z] support

- Roadmap: #15 #16 fixed, #11 accepted, #17 already absent

* chore: update Cargo.lock for globset dependency

* fix: remove String::display() call on Unix-only code path
Reamd7 added a commit that referenced this pull request Apr 22, 2026
…7-#9, #11-#13, #15, #16) (#4)

* fix: v0.2.0 stability fixes - tray lock, approval timeout, token refresh, panic recovery

- Wire tray Lock menu to vault lock logic (was disabled placeholder)

- Add 30s timeout to SSH approval requests (prevents indefinite agent hang)

- Implement token refresh before sync_vault in Reunlock, periodic sync, and manual sync paths

- Replace 3x expect(lock poisoned) with graceful mutex recovery

* fix: robustness improvements - silent failures, panic guards, configurable timeouts

- Log dropped approval responses instead of silently discarding

- Log DB migration failures instead of silently ignoring

- Wrap access_log.record in spawn_blocking to prevent tokio thread starvation

- Add Keys length assertion to prevent slice panics on malformed data

- Consolidate sequential mutex locks in auth.rs ensure_unlocked

- Add warning logs for all event emission failures (8 locations)

- Add debug logs for decryption failures in key listing

- Extract approval timeout and login retry count to Config

- Reduce state lock hold time in ssh_agent.rs by snapshotting state

- Graceful fallback for region::lock failure instead of unwrap panic

- Log Unix socket cleanup failure

- Extract SYNC_INTERVAL_TICKS constant replacing magic number

* docs: update roadmap with v0.2.0 and v0.2.1 completion status

* fix: add 32-bit Windows PEB offset support, mark roadmap items #8 #9 done

- Replace hardcoded 64-bit PEB offsets with runtime pointer-size detection

- #9 SSH op parsing already covers git sign, ls-remote, plain SSH beyond the 3 map entries

* fix: add panic handler for crash logging, mark roadmap #11 #12

- Install std::panic::set_hook that writes crash.log with timestamp and panic message

- #11 git config parsing evaluated as acceptable for current use case

- #12 crash dump now writes to LOCALAPPDATA/bw-agent/crash.log

* fix: expand process lists, use globset for pattern matching, update roadmap

- Add tmux/docker/vscode/node/python/cargo etc to process black/whitelists

- Replace hand-written glob with globset crate for standard ** and [a-z] support

- Roadmap: #15 #16 fixed, #11 accepted, #17 already absent

* chore: update Cargo.lock for globset dependency

* fix: remove String::display() call on Unix-only code path
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