Skip to content

fix(vault): replace blocking_read with block_in_place in ArcAgeVaultProvider#1940

Merged
bug-ops merged 1 commit intomainfrom
fix/vault-blocking-read-in-async
Mar 17, 2026
Merged

fix(vault): replace blocking_read with block_in_place in ArcAgeVaultProvider#1940
bug-ops merged 1 commit intomainfrom
fix/vault-blocking-read-in-async

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Mar 17, 2026

Summary

  • ArcAgeVaultProvider::list_keys() called blocking_read() on a tokio::sync::RwLock, which panics when invoked from within an async runtime
  • list_keys() is a synchronous trait method called inside async fn resolve_secrets(), making the panic reproducible on every TUI startup with vault.backend = "age"
  • Replaced blocking_read() with tokio::task::block_in_place(|| arc.blocking_read()) so tokio can reschedule other tasks while the thread is held

Test plan

  • cargo +nightly fmt --check — passed
  • cargo clippy --workspace --features full -- -D warnings — passed
  • cargo nextest run --workspace --features full --lib --bins — 6117 passed
  • zeph --config .local/config/cloud.toml --tui — no longer panics at startup

…rovider

blocking_read() panics when called from within a tokio async context.
list_keys() is a sync trait method called inside async resolve_secrets(),
so use block_in_place to signal to the runtime that the thread will block.
@github-actions github-actions bot added bug Something isn't working rust Rust code changes core zeph-core crate size/XS Extra small PR (1-10 lines) and removed bug Something isn't working labels Mar 17, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 17, 2026 01:54
@bug-ops bug-ops merged commit 87e455d into main Mar 17, 2026
20 checks passed
@bug-ops bug-ops deleted the fix/vault-blocking-read-in-async branch March 17, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate rust Rust code changes size/XS Extra small PR (1-10 lines)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant